Package net.ontopia.persistence.proxy
Class PersistentObjectAccess
- java.lang.Object
-
- net.ontopia.persistence.proxy.PersistentObjectAccess
-
- All Implemented Interfaces:
ObjectAccessIF
public class PersistentObjectAccess extends Object implements ObjectAccessIF
INTERNAL: Object access for objects implementing the PersistentIF interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected TransactionIFtxn
-
Constructor Summary
Constructors Constructor Description PersistentObjectAccess(TransactionIF txn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdentityIFgetIdentity(Object object)INTERNAL: Returns the identity of the specified object handle.ObjectgetObject(IdentityIF identity)INTERNAL: Returns a handle for the specified value.Class<?>getType(Object object)INTERNAL: Returns the type of the specified object handle.ObjectgetValue(Object object, FieldInfoIF finfo)INTERNAL: Returns the object field value.booleanisDirty(Object object)INTERNAL: Returns true if the specified object is dirty.booleanisDirty(Object object, int field)INTERNAL: Returns true if the specified object field is dirty.intnextDirty(Object object, int start)INTERNAL: Returns the index of the next dirty field from and including the start index.intnextDirty(Object object, int start, int end)INTERNAL: Returns the index of the next dirty field from and including start, up until end, but not including end.voidsetDirtyFlushed(Object object, int field)INTERNAL: Marks the dirty fields as being flushed (stored in the database).
-
-
-
Field Detail
-
txn
protected TransactionIF txn
-
-
Constructor Detail
-
PersistentObjectAccess
public PersistentObjectAccess(TransactionIF txn)
-
-
Method Detail
-
getObject
public Object getObject(IdentityIF identity)
Description copied from interface:ObjectAccessIFINTERNAL: Returns a handle for the specified value. Use this method when you do not know the the object value is. The handle can be used in the other methods to access information about the object. NOTE: an exception is thrown when the identity is unknown.- Specified by:
getObjectin interfaceObjectAccessIF
-
getIdentity
public IdentityIF getIdentity(Object object)
Description copied from interface:ObjectAccessIFINTERNAL: Returns the identity of the specified object handle.- Specified by:
getIdentityin interfaceObjectAccessIF
-
getType
public Class<?> getType(Object object)
Description copied from interface:ObjectAccessIFINTERNAL: Returns the type of the specified object handle. Note that this method returns the same value as getIdentity(object).getType().- Specified by:
getTypein interfaceObjectAccessIF
-
getValue
public Object getValue(Object object, FieldInfoIF finfo)
Description copied from interface:ObjectAccessIFINTERNAL: Returns the object field value.- Specified by:
getValuein interfaceObjectAccessIF
-
isDirty
public boolean isDirty(Object object)
Description copied from interface:ObjectAccessIFINTERNAL: Returns true if the specified object is dirty.- Specified by:
isDirtyin interfaceObjectAccessIF
-
isDirty
public boolean isDirty(Object object, int field)
Description copied from interface:ObjectAccessIFINTERNAL: Returns true if the specified object field is dirty.- Specified by:
isDirtyin interfaceObjectAccessIF
-
nextDirty
public int nextDirty(Object object, int start)
Description copied from interface:ObjectAccessIFINTERNAL: Returns the index of the next dirty field from and including the start index. Method returns -1 if there are no dirty fields.- Specified by:
nextDirtyin interfaceObjectAccessIF
-
nextDirty
public int nextDirty(Object object, int start, int end)
Description copied from interface:ObjectAccessIFINTERNAL: Returns the index of the next dirty field from and including start, up until end, but not including end. Method returns -1 if there are no more dirty fields.- Specified by:
nextDirtyin interfaceObjectAccessIF
-
setDirtyFlushed
public void setDirtyFlushed(Object object, int field)
Description copied from interface:ObjectAccessIFINTERNAL: Marks the dirty fields as being flushed (stored in the database).- Specified by:
setDirtyFlushedin interfaceObjectAccessIF
-
-