Package org.opensaml.storage.impl
Class JPAStorageRecord<T>
- java.lang.Object
-
- org.opensaml.storage.StorageRecord<T>
-
- org.opensaml.storage.MutableStorageRecord<T>
-
- org.opensaml.storage.impl.JPAStorageRecord<T>
-
- Type Parameters:
T- type of object
@Entity public class JPAStorageRecord<T> extends MutableStorageRecord<T>
Implementation ofMutableStorageRecordannotated for JPA.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJPAStorageRecord.RecordIdComposite key to represent the record id.
-
Constructor Summary
Constructors Constructor Description JPAStorageRecord()Creates a new JPA storage record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContext()Returns the context.LonggetExpiration()Get the record expiration.StringgetKey()Returns the key.StringgetValue()Get the record value.longgetVersion()Get the record version.voidresetVersion()Resets the version of this storage record to 1.voidsetContext(String ctx)Sets the context.voidsetKey(String k)Sets the key.StringtoString()-
Methods inherited from class org.opensaml.storage.MutableStorageRecord
incrementVersion, setExpiration, setValue
-
Methods inherited from class org.opensaml.storage.StorageRecord
getValue, setValue, setVersion
-
-
-
-
Field Detail
-
CONTEXT_SIZE
public static final int CONTEXT_SIZE
Length of the context column.- See Also:
- Constant Field Values
-
KEY_SIZE
public static final int KEY_SIZE
Length of the key column.- See Also:
- Constant Field Values
-
context
private String context
Context string.
-
key
private String key
Key string.
-
-
Method Detail
-
getContext
@Nonnull public String getContext()
Returns the context.- Returns:
- context
-
setContext
public void setContext(@Nonnull @NotEmpty String ctx)
Sets the context.- Parameters:
ctx- to set
-
getKey
@Nonnull public String getKey()
Returns the key.- Returns:
- key
-
getValue
@Nonnull public String getValue()
Get the record value.- Overrides:
getValuein classStorageRecord<T>- Returns:
- the record value
-
getExpiration
@Nullable public Long getExpiration()
Get the record expiration.- Overrides:
getExpirationin classStorageRecord<T>- Returns:
- the record expiration, or null if none
-
getVersion
public long getVersion()
Get the record version.- Overrides:
getVersionin classStorageRecord<T>- Returns:
- the record version
-
resetVersion
public void resetVersion()
Resets the version of this storage record to 1.
-
-