@Entity public class JPAStorageRecord extends MutableStorageRecord
MutableStorageRecord annotated for JPA.| Modifier and Type | Class and Description |
|---|---|
static class |
JPAStorageRecord.RecordId
Composite key to represent the record id.
|
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
context
Context string.
|
static int |
CONTEXT_SIZE
Length of the context column.
|
private java.lang.String |
key
Key string.
|
static int |
KEY_SIZE
Length of the key column.
|
| Constructor and Description |
|---|
JPAStorageRecord()
Creates a new JPA storage record.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContext()
Returns the context.
|
java.lang.Long |
getExpiration()
Get the record expiration.
|
java.lang.String |
getKey()
Returns the key.
|
java.lang.String |
getValue()
Get the record value.
|
long |
getVersion()
Get the record version.
|
void |
resetVersion()
Resets the version of this storage record to 1.
|
void |
setContext(java.lang.String ctx)
Sets the context.
|
void |
setKey(java.lang.String k)
Sets the key.
|
java.lang.String |
toString() |
incrementVersion, setExpiration, setValuegetValue, setValue, setVersionpublic static final int CONTEXT_SIZE
public static final int KEY_SIZE
private java.lang.String context
private java.lang.String key
public JPAStorageRecord()
@Nonnull public java.lang.String getContext()
public void setContext(@Nonnull @NotEmpty
java.lang.String ctx)
ctx - to set@Nonnull public java.lang.String getKey()
public void setKey(@Nonnull @NotEmpty
java.lang.String k)
k - to set@Nonnull public java.lang.String getValue()
getValue in class StorageRecord@Nullable public java.lang.Long getExpiration()
getExpiration in class StorageRecordpublic long getVersion()
getVersion in class StorageRecordpublic void resetVersion()
public java.lang.String toString()
toString in class java.lang.Object