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 TransactionIF
txn
-
Constructor Summary
Constructors Constructor Description PersistentObjectAccess(TransactionIF txn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdentityIF
getIdentity(Object object)
INTERNAL: Returns the identity of the specified object handle.Object
getObject(IdentityIF identity)
INTERNAL: Returns a handle for the specified value.Class<?>
getType(Object object)
INTERNAL: Returns the type of the specified object handle.Object
getValue(Object object, FieldInfoIF finfo)
INTERNAL: Returns the object field value.boolean
isDirty(Object object)
INTERNAL: Returns true if the specified object is dirty.boolean
isDirty(Object object, int field)
INTERNAL: Returns true if the specified object field is dirty.int
nextDirty(Object object, int start)
INTERNAL: Returns the index of the next dirty field from and including the start index.int
nextDirty(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.void
setDirtyFlushed(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:ObjectAccessIF
INTERNAL: 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:
getObject
in interfaceObjectAccessIF
-
getIdentity
public IdentityIF getIdentity(Object object)
Description copied from interface:ObjectAccessIF
INTERNAL: Returns the identity of the specified object handle.- Specified by:
getIdentity
in interfaceObjectAccessIF
-
getType
public Class<?> getType(Object object)
Description copied from interface:ObjectAccessIF
INTERNAL: Returns the type of the specified object handle. Note that this method returns the same value as getIdentity(object).getType().- Specified by:
getType
in interfaceObjectAccessIF
-
getValue
public Object getValue(Object object, FieldInfoIF finfo)
Description copied from interface:ObjectAccessIF
INTERNAL: Returns the object field value.- Specified by:
getValue
in interfaceObjectAccessIF
-
isDirty
public boolean isDirty(Object object)
Description copied from interface:ObjectAccessIF
INTERNAL: Returns true if the specified object is dirty.- Specified by:
isDirty
in interfaceObjectAccessIF
-
isDirty
public boolean isDirty(Object object, int field)
Description copied from interface:ObjectAccessIF
INTERNAL: Returns true if the specified object field is dirty.- Specified by:
isDirty
in interfaceObjectAccessIF
-
nextDirty
public int nextDirty(Object object, int start)
Description copied from interface:ObjectAccessIF
INTERNAL: 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:
nextDirty
in interfaceObjectAccessIF
-
nextDirty
public int nextDirty(Object object, int start, int end)
Description copied from interface:ObjectAccessIF
INTERNAL: 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:
nextDirty
in interfaceObjectAccessIF
-
setDirtyFlushed
public void setDirtyFlushed(Object object, int field)
Description copied from interface:ObjectAccessIF
INTERNAL: Marks the dirty fields as being flushed (stored in the database).- Specified by:
setDirtyFlushed
in interfaceObjectAccessIF
-
-