public class CayenneDataObject extends BaseDataObject
DataObject that uses Map to store object fields.
This implementation was pre 4.1 default.
Since 4.1 it is recommended to use BaseDataObject as superclass (and it is actually default now),
as it has better performance and lower memory consumption (much lower for small objects).
You may need to use this class only if you have some generic attributes created at runtime (also
consider HybridDataObject in this case) or if any compatibility issues arise.
BaseDataObject,
HybridDataObject,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
values |
snapshotVersionobjectContext, objectId, persistenceStateDEFAULT_VERSION| Constructor and Description |
|---|
CayenneDataObject() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StringBuffer buffer) |
static String |
makePath(String... pathParts)
Deprecated.
since 4.1, use
Cayenne.makePath(String...) instead |
Object |
readPropertyDirectly(String propName)
Returns mapped property value as curently stored in the DataObject.
|
protected void |
readState(ObjectInputStream in) |
void |
setPersistenceState(int persistenceState) |
void |
writePropertyDirectly(String propName,
Object val)
Modifies a value of a named property without altering the object state in any way,
and without triggering any database operations.
|
protected void |
writeState(ObjectOutputStream out) |
addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toString, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerializedgetMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetObjectContext, getObjectId, getPersistenceState, setObjectIdpublic void setPersistenceState(int persistenceState)
setPersistenceState in interface PersistentsetPersistenceState in class BaseDataObjectpublic Object readPropertyDirectly(String propName)
DataObjectreadPropertyDirectly in interface DataObjectreadPropertyDirectly in class BaseDataObjectpublic void writePropertyDirectly(String propName, Object val)
DataObjectwritePropertyDirectly in interface DataObjectwritePropertyDirectly in class BaseDataObjectprotected void appendProperties(StringBuffer buffer)
appendProperties in class BaseDataObjectprotected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException
readState in class BaseDataObjectIOExceptionClassNotFoundExceptionprotected void writeState(ObjectOutputStream out) throws IOException
writeState in class BaseDataObjectIOException@Deprecated public static String makePath(String... pathParts)
Cayenne.makePath(String...) insteadCayenne.makePath(String...) from
within a DataObject subclass to create a dotted path using the generated
string constants for attributes and relationships.Cayenne.makePath(String...)Copyright © 2001–2019 Apache Cayenne. All rights reserved.