|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.objectwave.persist.examples.DomainObject
A possible root Business object for an application.
| Nested Class Summary | |
static class |
DomainObject.Test
|
| Field Summary | |
RDBPersistentAdapter |
adapt
|
ObjectEditingView |
editor
|
java.lang.Integer |
objectIdentifier
|
protected static java.util.HashMap |
tableMap
|
| Constructor Summary | |
DomainObject()
|
|
| 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. |
protected static com.objectwave.persist.examples.DomainObject.TableValueHolder |
getEntry(java.lang.Class currentClass)
While this simplifies the development of Persistent objects, this approach will not peform optimally. |
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 |
static java.util.Vector |
getSuperDescriptor()
A conveince method to get a copy of this static class descriptor. |
protected java.lang.String |
getTableName()
Use an instance method to access a static variable. |
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. |
static java.util.Vector |
initDescription()
|
void |
initDescriptor(java.lang.String xmlTag,
Persistence obj,
RDBPersistentAdapter adapter)
Read in the XML file and populate the persistent map information. |
ObjectEditingView |
initializeObjectEditor()
Subclasses will override this method to return an appropriate instance of a RDBPersistentAdapter; This method will always instantiate the inner adapter found in DomainObject's class definition. |
ObjectEditingView |
initializeObjectEditor(java.lang.String xmlTag,
Persistence obj)
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()
Gets the Transient attribute of the DomainObject object |
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. |
protected static void |
setEntry(java.lang.Class currentClass,
com.objectwave.persist.examples.DomainObject.TableValueHolder entry)
While this simplifies the development of Persistent objects, this approach will not peform optimally. |
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. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static java.util.HashMap tableMap
public java.lang.Integer objectIdentifier
public transient ObjectEditingView editor
public transient RDBPersistentAdapter adapt
| Constructor Detail |
public DomainObject()
| Method Detail |
public static java.util.Vector getSuperDescriptor()
public static java.util.Vector initDescription()
protected static void setEntry(java.lang.Class currentClass,
com.objectwave.persist.examples.DomainObject.TableValueHolder entry)
currentClass - The new Entry valueentry - The new Entry valueprotected static com.objectwave.persist.examples.DomainObject.TableValueHolder getEntry(java.lang.Class currentClass)
currentClass -
public void setBrokerName(java.lang.String aValue)
setBrokerName in interface PersistenceaValue - The new BrokerName valuepublic void setAsTransient(boolean value)
setAsTransient in interface TransactionalObjectIFvalue - The new AsTransient valuepublic void setObjectEditor(ObjectEditingView e)
setObjectEditor in interface TransactionalObjectIFe - The new ObjectEditor valuepublic void setObjectIdentifier(java.lang.Integer aValue)
aValue - The new ObjectIdentifier valuepublic void setPrimaryKeyField(java.lang.Object obj)
setPrimaryKeyField in interface Persistenceobj - The new PrimaryKeyField valuepublic void setPrintString(java.lang.String value)
value - The new PrintString valuepublic void setRetrievedFromDatabase(boolean b)
setRetrievedFromDatabase in interface Persistenceb - The new RetrievedFromDatabase valuepublic Persistence getAdapter()
getAdapter in interface Persistencepublic java.lang.String getBrokerName()
getBrokerName in interface Persistencepublic ObjectEditingView getObjectEditor()
getObjectEditor in interface TransactionalObjectIFpublic java.lang.Integer getObjectIdentifier()
public java.lang.Object getPrimaryKeyField()
getPrimaryKeyField in interface Persistencepublic java.lang.Object[] getPrimaryKeyFields()
getPrimaryKeyFields in interface Persistencepublic boolean isDirty()
isDirty in interface TransactionalObjectIFpublic boolean isRetrievedFromDatabase()
isRetrievedFromDatabase in interface Persistencepublic boolean isTransient()
isTransient in interface TransactionalObjectIF
public ObjectEditingView initializeObjectEditor(java.lang.String xmlTag,
Persistence obj)
throws java.io.FileNotFoundException,
ConfigurationException
xmlTag - String The tag name in the initial fileobj - Object The caller himself
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
xmlTag - obj - adapter -
java.io.FileNotFoundException
ConfigurationException
public void delete()
throws QueryException
delete in interface PersistenceQueryExceptionpublic ObjectEditingView initializeObjectEditor()
public void insert()
throws QueryException
Persistence
insert in interface PersistenceQueryExceptionpublic boolean lock(boolean wait)
lock in interface Persistencewait - boolean
public void markForDelete()
throws QueryException
QueryException
public void save()
throws QueryException
save in interface PersistenceQueryExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void unlock()
unlock in interface Persistence
public void update(boolean get,
java.lang.Object[] data,
java.lang.reflect.Field[] fields)
update in interface TransactionalObjectIFget - data - fields - public boolean usesAdapter()
usesAdapter in interface Persistenceprotected void setTableName(java.lang.String table)
table - The new TableName valueprotected void setClassDescriptor(java.util.Vector v)
v - The new ClassDescriptor valueprotected java.lang.String getTableName()
protected java.util.Vector getClassDescriptor()
protected XMLDecoder getXmlDefinition(java.lang.String xmlTag,
java.lang.Object obj)
throws java.io.FileNotFoundException,
ConfigurationException
xmlTag - obj -
java.io.FileNotFoundException
ConfigurationExceptionprotected void addDefaultPrimaryAttribute(java.util.ArrayList list)
list - ArrayList The list that was found in the Xml mapprotected RDBPersistentAdapter createAdapter(Persistence persistentObject)
persistentObject -
protected java.lang.String locateXmlMap(java.lang.String xmlTag,
java.lang.Object persistentObject)
throws ConfigurationException,
java.io.FileNotFoundException
xmlTag - 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 | |||||||||