|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.objectwave.persist.examples.DomainObject
|
+--com.objectwave.persist.invert.PersistenceBase
While this class is not directly used by any of the other code in this library, it is used as a template when auto-generating persistence support.
| Nested Class Summary |
| Nested classes inherited from class com.objectwave.persist.examples.DomainObject |
DomainObject.Test |
| Field Summary | |
protected static java.lang.reflect.Field |
_objectIdentifier
|
RDBPersistentAdapter |
adapt
|
ObjectEditingView |
editor
|
java.lang.Integer |
objectIdentifier
|
protected java.lang.String |
printString
|
protected java.lang.String |
xmlInitString
|
| Fields inherited from class com.objectwave.persist.examples.DomainObject |
tableMap |
| Constructor Summary | |
PersistenceBase()
Call the setup method. |
|
| Method Summary | |
protected void |
addDefaultPrimaryAttribute(java.util.ArrayList list)
Add primary attribute type with a column name of databaseIdentifer. |
protected RDBPersistentAdapter |
createAdapter(Persistence persistentObject)
Create the new ObjectEditingView instance that is to be our 'adapter' to the persistent object. |
void |
delete()
|
Persistence |
getAdapter()
Gets the Adapter attribute of the DomainObject object |
java.lang.String |
getBrokerName()
Support for individual instances residing in their own brokers. |
protected java.util.Vector |
getClassDescriptor()
Use an instance method to access a static variable. |
ObjectEditingView |
getObjectEditor()
Gets the ObjectEditor attribute of the DomainObject object |
java.lang.Integer |
getObjectIdentifier()
Gets the ObjectIdentifier attribute of the DomainObject object |
java.lang.Object |
getPrimaryKeyField()
Gets the PrimaryKeyField attribute of the DomainObject object |
java.lang.Object[] |
getPrimaryKeyFields()
Gets the PrimaryKeyField attributes of the DomainObject object |
protected java.lang.String |
getTableName()
Notice the use of instance methods to access static variables. |
protected XMLDecoder |
getXmlDefinition(java.lang.String xmlTag,
java.lang.Object obj)
Create the XMLDecoder object that will allow the creation of all of the map information. |
void |
initDescriptor(java.lang.String xmlTag,
Persistence obj,
RDBPersistentAdapter adapter)
Read in the XML file and populate the persistent map information. |
ObjectEditingView |
initializeObjectEditor(java.lang.String xmlTag)
Called to initialize object editor It will use an XML file for the field match. |
void |
insert()
Force this object to be a part of the changedObjects list. |
boolean |
isDirty()
Gets the Dirty attribute of the DomainObject object |
boolean |
isRetrievedFromDatabase()
Gets the RetrievedFromDatabase attribute of the DomainObject object |
boolean |
isTransient()
Determines if this persistent object is to be considered as transient. |
protected java.lang.String |
locateXmlMap(java.lang.String xmlTag,
java.lang.Object persistentObject)
Find the XML document that contains the persitent map information. |
boolean |
lock(boolean wait)
This method was created in VisualAge. |
void |
markForDelete()
Mark this object to be deleted in this transaction. |
void |
save()
|
void |
setAsTransient(boolean value)
Sets the AsTransient attribute of the DomainObject object |
void |
setBrokerName(java.lang.String aValue)
Support for individual instances residing in their own brokers. |
protected void |
setClassDescriptor(java.util.Vector v)
Use an instance method to access a static variable. |
void |
setObjectEditor(ObjectEditingView e)
For an RDBPersistent system, this will be an RDBPersistentAdapter. |
void |
setObjectIdentifier(java.lang.Integer aValue)
Sets the ObjectIdentifier attribute of the DomainObject object |
void |
setPrimaryKeyField(java.lang.Object obj)
Sets the PrimaryKeyField attribute of the DomainObject object |
void |
setPrintString(java.lang.String value)
A user friendly description. |
void |
setRetrievedFromDatabase(boolean b)
Sets the RetrievedFromDatabase attribute of the DomainObject object |
protected void |
setTableName(java.lang.String table)
Use an instance method to access a static variable. |
protected void |
setup()
Override this method if you wish to setup your object differently. |
java.lang.String |
toString()
|
void |
unlock()
This method was created in VisualAge. |
void |
update(boolean get,
java.lang.Object[] data,
java.lang.reflect.Field[] fields)
Method no longer does anything since setAccessible solves our need for this behavior. |
boolean |
usesAdapter()
|
| Methods inherited from class com.objectwave.persist.examples.DomainObject |
getEntry, getSuperDescriptor, initDescription, initializeObjectEditor, initializeObjectEditor, setEntry |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static java.lang.reflect.Field _objectIdentifier
public java.lang.Integer objectIdentifier
public transient ObjectEditingView editor
public transient RDBPersistentAdapter adapt
protected java.lang.String printString
protected java.lang.String xmlInitString
| Constructor Detail |
public PersistenceBase()
setup()| Method Detail |
protected void setup()
throws java.lang.Exception
java.lang.Exceptionpublic void setBrokerName(java.lang.String aValue)
setBrokerName in interface PersistencesetBrokerName in class DomainObjectaValue - The new BrokerName valuepublic void setAsTransient(boolean value)
setAsTransient in interface TransactionalObjectIFsetAsTransient in class DomainObjectvalue - The new AsTransient valuepublic void setObjectEditor(ObjectEditingView e)
setObjectEditor in interface TransactionalObjectIFsetObjectEditor in class DomainObjecte - The new ObjectEditor valuepublic void setObjectIdentifier(java.lang.Integer aValue)
setObjectIdentifier in class DomainObjectaValue - The new ObjectIdentifier valuepublic void setPrimaryKeyField(java.lang.Object obj)
setPrimaryKeyField in interface PersistencesetPrimaryKeyField in class DomainObjectobj - The new PrimaryKeyField valuepublic void setPrintString(java.lang.String value)
setPrintString in class DomainObjectvalue - The new PrintString valuepublic void setRetrievedFromDatabase(boolean b)
setRetrievedFromDatabase in interface PersistencesetRetrievedFromDatabase in class DomainObjectb - The new RetrievedFromDatabase valueprotected void setTableName(java.lang.String table)
DomainObject
setTableName in class DomainObjecttable - The new tableName valueprotected void setClassDescriptor(java.util.Vector v)
DomainObject
setClassDescriptor in class DomainObjectv - The new classDescriptor valuepublic Persistence getAdapter()
getAdapter in interface PersistencegetAdapter in class DomainObjectpublic java.lang.String getBrokerName()
getBrokerName in interface PersistencegetBrokerName in class DomainObjectpublic ObjectEditingView getObjectEditor()
getObjectEditor in interface TransactionalObjectIFgetObjectEditor in class DomainObjectpublic java.lang.Integer getObjectIdentifier()
getObjectIdentifier in class DomainObjectpublic java.lang.Object getPrimaryKeyField()
getPrimaryKeyField in interface PersistencegetPrimaryKeyField in class DomainObjectpublic java.lang.Object[] getPrimaryKeyFields()
getPrimaryKeyFields in interface PersistencegetPrimaryKeyFields in class DomainObjectpublic boolean isDirty()
isDirty in interface TransactionalObjectIFisDirty in class DomainObjectpublic boolean isRetrievedFromDatabase()
isRetrievedFromDatabase in interface PersistenceisRetrievedFromDatabase in class DomainObjectpublic boolean isTransient()
isTransient in interface TransactionalObjectIFisTransient in class DomainObjectprotected java.lang.String getTableName()
getTableName in class DomainObjectprotected java.util.Vector getClassDescriptor()
DomainObject
getClassDescriptor in class DomainObject
protected XMLDecoder getXmlDefinition(java.lang.String xmlTag,
java.lang.Object obj)
throws java.io.FileNotFoundException,
ConfigurationException
getXmlDefinition in class DomainObjectxmlTag - obj -
java.io.FileNotFoundException
ConfigurationException
public ObjectEditingView initializeObjectEditor(java.lang.String xmlTag)
throws java.io.FileNotFoundException,
ConfigurationException
xmlTag - String The tag name in the initial file
java.io.FileNotFoundException
ConfigurationExceptionlocateXmlMap(java.lang.String, java.lang.Object)
public void initDescriptor(java.lang.String xmlTag,
Persistence obj,
RDBPersistentAdapter adapter)
throws java.io.FileNotFoundException,
ConfigurationException
initDescriptor in class DomainObjectxmlTag - obj - adapter -
java.io.FileNotFoundException
ConfigurationException
public void delete()
throws QueryException
delete in interface Persistencedelete in class DomainObjectQueryException
public void insert()
throws QueryException
Persistence
insert in interface Persistenceinsert in class DomainObjectQueryExceptionpublic boolean lock(boolean wait)
lock in interface Persistencelock in class DomainObjectwait - boolean
public void markForDelete()
throws QueryException
markForDelete in class DomainObjectQueryException
public void save()
throws QueryException
save in interface Persistencesave in class DomainObjectQueryExceptionpublic java.lang.String toString()
toString in class DomainObjectpublic void unlock()
unlock in interface Persistenceunlock in class DomainObject
public void update(boolean get,
java.lang.Object[] data,
java.lang.reflect.Field[] fields)
update in interface TransactionalObjectIFupdate in class DomainObjectget - data - fields - public boolean usesAdapter()
usesAdapter in interface PersistenceusesAdapter in class DomainObjectprotected void addDefaultPrimaryAttribute(java.util.ArrayList list)
addDefaultPrimaryAttribute in class DomainObjectlist - ArrayList The list that was found in the Xml mapprotected RDBPersistentAdapter createAdapter(Persistence persistentObject)
createAdapter in class DomainObjectpersistentObject -
protected java.lang.String locateXmlMap(java.lang.String xmlTag,
java.lang.Object persistentObject)
throws ConfigurationException,
java.io.FileNotFoundException
locateXmlMap in class DomainObjectxmlTag - String The tag name for the xml resource.persistentObject -
ConfigurationException
java.io.FileNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||