Package net.ontopia.persistence.proxy
Class AbstractROPersistent
- java.lang.Object
-
- net.ontopia.persistence.proxy.AbstractROPersistent
-
- All Implemented Interfaces:
PersistentIF
- Direct Known Subclasses:
ReadOnlyTMObject
public abstract class AbstractROPersistent extends Object implements PersistentIF
INTERNAL: An abstract PersistentIF implementation that handles most of the machinery needed to implement persistent objects. Note that other persistent classes should extend this class.
-
-
Field Summary
Fields Modifier and Type Field Description protected IdentityIF
id
protected TransactionIF
txn
-
Constructor Summary
Constructors Constructor Description AbstractROPersistent()
AbstractROPersistent(TransactionIF txn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdentityIF
_p_getIdentity()
INTERNAL: Returns the identity of the object.TransactionIF
_p_getTransaction()
INTERNAL: Returns the transaction that is responible for managing the object.Class<?>
_p_getType()
INTERNAL: Returns the object.type.void
_p_setIdentity(IdentityIF identity)
INTERNAL: Sets the identity of the object.void
_p_setTransaction(TransactionIF txn)
INTERNAL: Sets the transaction that is responible for managing the object.String
_p_toString()
void
clearAll()
void
detach()
protected Object
executeQuery(String name, Object[] params)
boolean
isDeleted()
boolean
isDirty()
boolean
isDirty(int field)
boolean
isDirtyFlushed()
boolean
isDirtyFlushed(int field)
boolean
isInDatabase()
boolean
isLoaded(int field)
boolean
isNewObject()
boolean
isPersistent()
boolean
isTransient()
protected <F> Collection<F>
loadCollectionField(int field)
protected <F> F
loadField(int field)
INTERNAL: Called when the instance requests the value of the specified field value.protected <F> F
loadFieldNoCheck(int field)
Object
loadValue(FieldInfoIF finfo)
int
nextDirty(int start)
int
nextDirty(int start, int end)
int
nextDirtyFlushed(int start)
int
nextDirtyFlushed(int start, int end)
void
setDeleted(boolean deleted)
void
setDirty(int field, boolean dirty)
void
setDirtyFlushed(int field, boolean dirty)
void
setInDatabase(boolean inDatabase)
void
setNewObject(boolean newObject)
void
setPersistent(boolean persistent)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.ontopia.persistence.proxy.PersistentIF
_p_getFieldCount
-
-
-
-
Field Detail
-
id
protected IdentityIF id
-
txn
protected TransactionIF txn
-
-
Constructor Detail
-
AbstractROPersistent
public AbstractROPersistent()
-
AbstractROPersistent
public AbstractROPersistent(TransactionIF txn)
-
-
Method Detail
-
_p_getIdentity
public IdentityIF _p_getIdentity()
Description copied from interface:PersistentIF
INTERNAL: Returns the identity of the object.- Specified by:
_p_getIdentity
in interfacePersistentIF
-
_p_getType
public Class<?> _p_getType()
Description copied from interface:PersistentIF
INTERNAL: Returns the object.type. This information is used by the transaction to handle the persistent mapping for the object.- Specified by:
_p_getType
in interfacePersistentIF
-
_p_setIdentity
public void _p_setIdentity(IdentityIF identity)
Description copied from interface:PersistentIF
INTERNAL: Sets the identity of the object.- Specified by:
_p_setIdentity
in interfacePersistentIF
-
_p_getTransaction
public TransactionIF _p_getTransaction()
Description copied from interface:PersistentIF
INTERNAL: Returns the transaction that is responible for managing the object.- Specified by:
_p_getTransaction
in interfacePersistentIF
-
_p_setTransaction
public void _p_setTransaction(TransactionIF txn)
Description copied from interface:PersistentIF
INTERNAL: Sets the transaction that is responible for managing the object.- Specified by:
_p_setTransaction
in interfacePersistentIF
-
loadField
protected <F> F loadField(int field)
INTERNAL: Called when the instance requests the value of the specified field value. This call will lead to the value being retrieved from the data repository.
-
loadFieldNoCheck
protected <F> F loadFieldNoCheck(int field) throws IdentityNotFoundException
- Throws:
IdentityNotFoundException
-
loadCollectionField
protected <F> Collection<F> loadCollectionField(int field)
-
detach
public void detach()
- Specified by:
detach
in interfacePersistentIF
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfacePersistentIF
-
isNewObject
public boolean isNewObject()
- Specified by:
isNewObject
in interfacePersistentIF
-
setNewObject
public void setNewObject(boolean newObject)
- Specified by:
setNewObject
in interfacePersistentIF
-
isInDatabase
public boolean isInDatabase()
- Specified by:
isInDatabase
in interfacePersistentIF
-
setInDatabase
public void setInDatabase(boolean inDatabase)
- Specified by:
setInDatabase
in interfacePersistentIF
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interfacePersistentIF
-
setPersistent
public void setPersistent(boolean persistent)
- Specified by:
setPersistent
in interfacePersistentIF
-
isDeleted
public boolean isDeleted()
- Specified by:
isDeleted
in interfacePersistentIF
-
setDeleted
public void setDeleted(boolean deleted)
- Specified by:
setDeleted
in interfacePersistentIF
-
isLoaded
public boolean isLoaded(int field)
- Specified by:
isLoaded
in interfacePersistentIF
-
loadValue
public Object loadValue(FieldInfoIF finfo)
- Specified by:
loadValue
in interfacePersistentIF
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfacePersistentIF
-
isDirty
public boolean isDirty(int field)
- Specified by:
isDirty
in interfacePersistentIF
-
nextDirty
public int nextDirty(int start)
- Specified by:
nextDirty
in interfacePersistentIF
-
nextDirty
public int nextDirty(int start, int end)
- Specified by:
nextDirty
in interfacePersistentIF
-
setDirty
public void setDirty(int field, boolean dirty)
-
isDirtyFlushed
public boolean isDirtyFlushed()
-
isDirtyFlushed
public boolean isDirtyFlushed(int field)
-
nextDirtyFlushed
public int nextDirtyFlushed(int start)
-
nextDirtyFlushed
public int nextDirtyFlushed(int start, int end)
-
setDirtyFlushed
public void setDirtyFlushed(int field, boolean dirty)
- Specified by:
setDirtyFlushed
in interfacePersistentIF
-
clearAll
public void clearAll()
- Specified by:
clearAll
in interfacePersistentIF
-
_p_toString
public String _p_toString()
-
-