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()StringgetKey()Returns the key.StringgetValue()longgetVersion()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()
- Overrides:
getValuein classStorageRecord<T>
-
getExpiration
@Nullable public Long getExpiration()
- Overrides:
getExpirationin classStorageRecord<T>
-
getVersion
public long getVersion()
- Overrides:
getVersionin classStorageRecord<T>
-
resetVersion
public void resetVersion()
Resets the version of this storage record to 1.
-
-