|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.DataEntry
public class DataEntry
Persistent container holding an entity's data in encrypted form.
Nested Class Summary | |
---|---|
protected static class |
DataEntry.NamedQueries
|
Constructor Summary | |
---|---|
protected |
DataEntry()
Internal constructor. |
|
DataEntry(ClassMeta classMeta,
int keyStoreRefID,
String objectID)
Create an instance of DataEntry . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
ClassMeta |
getClassMeta()
Get the type of the entity persisted in this container. |
long |
getDataEntryID()
Get the single primary key field (= object-identifier) of DataEntry . |
long |
getKeyID()
Get the identifier of the encryption-key used to encrypt the value . |
int |
getKeyStoreRefID()
Get the numeric identifier of the key store. |
String |
getObjectID()
Get the String -representation of the entity's identifier. |
protected PersistenceManager |
getPersistenceManager()
|
byte[] |
getValue()
Get the encrypted data of an entity. |
int |
hashCode()
|
void |
jdoPreStore()
|
void |
setKeyID(long keyID)
Set the identifier of the encryption-key used to encrypt the value . |
void |
setKeyStoreRefID(int keyStoreRefID)
Deprecated. Never call this method! It exists only for downward compatibility (needs to be accessible by IntroduceKeyStoreRefID ). |
void |
setValue(byte[] value)
Set the encrypted data of an entity. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DataEntry()
public DataEntry(ClassMeta classMeta, int keyStoreRefID, String objectID)
DataEntry
.
classMeta
- the type of the entity persisted in this container (which must be the entity's concrete type -
not the root-type of the inheritance tree!). See getClassMeta()
for further details.keyStoreRefID
- TODOobjectID
- the String
-representation of the entity's identifier (aka OID or object-ID).
See getObjectID()
for further details.Method Detail |
---|
public long getDataEntryID()
DataEntry
.
public ClassMeta getClassMeta()
Get the type of the entity persisted in this container.
Note, that this is the concrete type of the persisted object and not the root-type of the
persistable hierarchy. For example, if bbb
is persisted and bbb
is an instance of
class BBB
which extends AAA
and both classes are persistable, this will point to class BBB
(and not AAA
).
Therefore, if you want to query all instances of a certain type including subclasses, you have to
ask for the sub-classes via StoreManager.getSubClassesForClass(String, boolean, org.datanucleus.ClassLoaderResolver)
first and then query for all these classes individually.
protected PersistenceManager getPersistenceManager()
public int getKeyStoreRefID()
KeyStoreRef
instances.
@Deprecated public void setKeyStoreRefID(int keyStoreRefID)
IntroduceKeyStoreRefID
).
keyStoreRefID
- the numeric identifier of the key store.public String getObjectID()
Get the String
-representation of the entity's identifier.
For JDO, please read the following (and related) documentation:
For JPA, please read the following (and related) documentation:
JDOHelper.getObjectId(entity).toString()
when using JDO).public long getKeyID()
value
.
DataEntry
's contents.setKeyID(long)
public void setKeyID(long keyID)
value
.
keyID
- the encryption-key used to encrypt this DataEntry
's contents.getKeyID()
public byte[] getValue()
ObjectContainer
which is then serialised using Java native serialisation and finally encrypted.
ObjectContainer
holding the entity's data.setValue(byte[])
public void setValue(byte[] value)
value
- the encrypted serialised data of an ObjectContainer
holding the entity's data.getValue()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void jdoPreStore()
jdoPreStore
in interface StoreCallback
|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |