|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--JProjects.eab.data.PersistentObject
This abstract class defines the standard interface for data access classes. It provides interfaces for adding, deleting, retrieving, and updating a row from a table. The Data Access Builder generates classes that implement this class.
Field Summary | |
protected DAPropertySupport |
_changes
|
protected POCompleteSupport |
_poSupport
|
protected boolean |
_sendingAttributeEvents
|
protected java.sql.PreparedStatement |
_stmt
|
Constructor Summary | |
PersistentObject()
Default constructor. |
|
PersistentObject(DatastoreJDBC ods)
This constructor creates a persistent object with an associated datastore. |
Method Summary | |
abstract void |
_executeAction(java.lang.String action,
java.lang.Object[] params)
|
void |
_handleException(java.lang.Exception ex)
|
protected boolean |
_isSendingAttributeEvents()
|
protected boolean |
_onBackground()
|
protected void |
_putOnBackgroundThread(java.lang.String acnN,
java.lang.Object[] params)
|
protected void |
_setBusy(boolean b)
|
protected void |
_setSendingAttributeEvents(boolean flag)
|
void |
addPOCompleteListener(POCompleteListener l)
Use this method to register a listener for method complete events. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
cancel()
This method cancels the SQL statement currently running on a background thread. |
abstract java.lang.Object |
clone()
This method allows a class that implements PersistentObject to use the clone method. |
protected void |
firePropertyChange(java.lang.String propName,
java.lang.Object oldV,
java.lang.Object newV)
|
abstract java.lang.Object[] |
getAttributes()
|
abstract java.lang.String[] |
getAttributeStrings()
|
abstract DatastoreJDBC |
getCurrentDatastore()
Implemented in subclass wich is generated by Data Access Builder. |
PODataId |
getObjectDataId()
This method, will be overridden in a subclass (such as <class> , which is generated by Data Access Builder) to return the DataId if the current object has a DataId. |
DatastoreJDBC |
getObjectsDatastore()
This method returns the datastore object associated with the current object, or null if one has not been associated with the object. |
boolean |
hasDataId()
This method will be overridden in a subclass (such as <class> , which is generated by Data Access Builder) if the current object has a DataID (and is therefore retrievable). |
boolean |
isAsynchronous()
This method tells you whether methods are set to run on a background thread or not. |
boolean |
isBusy()
This method tells you whether the object is running a method in the background. |
boolean |
isModified()
Use this method to determine whether any of the current PersistentObject's properties has been changed. |
abstract boolean |
isReadOnly()
This method, when implemented in a subclass (such as <class> , which is generated by Data Access Builder), will tell you whether the current object's class is read-only or not. |
void |
removePOCompleteListener(POCompleteListener l)
Use this method to remove the method complete listener on the PersistentObject. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
setAsynchronous(boolean af)
This method lets you set whether the database methods are run on a background thread. |
void |
setModified(boolean mf)
Use this method to change the isModified setting. |
void |
setObjectDataId(PODataId di)
This method will be overridden in a subclass (such as <class>, which generated by Data Access Builder) to set the DataId if the current object has a DataId. |
void |
setObjectsDatastore(DatastoreJDBC obDs)
This method lets you associate a datastore object with the current persistent object. |
java.lang.String |
toString()
This method returns a string made up of the object's attributes. |
abstract java.lang.String |
toString(java.lang.String delim)
This method, when implemented in a subclass (such as <class>, which is generated by Data Access Builder), returns a string made up of the object's attributes. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected transient java.sql.PreparedStatement _stmt
protected DAPropertySupport _changes
protected transient POCompleteSupport _poSupport
protected transient boolean _sendingAttributeEvents
Constructor Detail |
public PersistentObject()
public PersistentObject(DatastoreJDBC ods)
ods
- - a datastore object.Method Detail |
public abstract void _executeAction(java.lang.String action, java.lang.Object[] params) throws java.lang.Exception
public void _handleException(java.lang.Exception ex)
public void addPOCompleteListener(POCompleteListener l)
l
- - a POCompleteListener to listen for method complete events.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void cancel() throws DAException
public abstract java.lang.Object clone()
public abstract DatastoreJDBC getCurrentDatastore()
public PODataId getObjectDataId()
public DatastoreJDBC getObjectsDatastore()
public boolean hasDataId()
public boolean isAsynchronous()
public boolean isBusy()
public boolean isModified()
public abstract boolean isReadOnly()
public void removePOCompleteListener(POCompleteListener l)
l
- - the POCompleteListener you wish to remove.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void setAsynchronous(boolean af)
af
- - a boolean value of true to run methods on
background thread, or false to turn background thread off.public void setModified(boolean mf)
mf
- - a boolean value indicating whether an attribute
from the current PersistentObject has been
modified: true if at least one has
been modified, or false if none has.public void setObjectDataId(PODataId di) throws DAException
di
- - new PODataId object for this one.public void setObjectsDatastore(DatastoreJDBC obDs)
obDs
- - - the DatastoreJDBC object you want to associate
with the current object.public java.lang.String toString()
public abstract java.lang.String toString(java.lang.String delim)
delim
- - a string used to separate the toString
representation of each attribute.public abstract java.lang.Object[] getAttributes()
public abstract java.lang.String[] getAttributeStrings()
protected boolean _isSendingAttributeEvents()
protected void _setSendingAttributeEvents(boolean flag)
protected boolean _onBackground()
protected void _putOnBackgroundThread(java.lang.String acnN, java.lang.Object[] params)
protected void _setBusy(boolean b)
protected void firePropertyChange(java.lang.String propName, java.lang.Object oldV, java.lang.Object newV)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |