|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenBean.DataObjectImpl
public abstract class DataObjectImpl
A concrete implementation of DataObject and RelationalObject
DataObjectFactory,
DataObject,
colinfo,
Serialized Form| Field Summary | |
|---|---|
Vector |
dataObjectActionListeners
|
DataObject |
doparent
|
static String |
EXTENBEAN_LOADER_NAME
|
com.extentech.toolkit.ResourceLoader |
props
|
| Constructor Summary | |
|---|---|
DataObjectImpl()
|
|
| Method Summary | |
|---|---|
void |
addChildObject(RelationalObject o)
|
void |
addDataObjectActionListener(DataObjectActionListener e)
add a DataObjectActionListener |
void |
addOrderByItem(int idx,
Object obj)
Maintain a numeric lookup for this DataObject. |
boolean |
beginTrans()
A simple roll-back mechanism copies the data to a backup hashtable, then waits for a commit from factory. |
void |
dumpNameVals()
a convenience method for debugging which outputs all names and values for the data in this object. |
void |
dumpNameVals(PrintStream out)
|
void |
fireDataObjectActionEvent(DataObject dob)
fires a DataObjectAction event |
Vector |
getAllChildrenInHeirarchy()
returns a vector containing all of the children of this object, as well as all of the children of the children objects, their children's children, and any other children hanging about. |
boolean |
getCascadeUpdates()
get whether or not to cascade the updates to child dataobjects |
int |
getChangedRowCount()
|
Object[] |
getChangedRows()
|
DataObject |
getChildByName(String name)
Find a child DataObject |
List |
getChildObjects()
return a Listof all Child Objects |
List |
getChildrenByName(String name)
Find all child DataObjects by name |
colinfo[] |
getColinfo()
Returns the column metadata for this row of data. |
colinfo |
getColinfoByName(String colname)
|
Vector |
getColnames()
|
List |
getColNames()
returns a list of the colnames |
int |
getColNumByName(String colname)
Find the column number in the data array which contains the column represented by this columnname. |
Map |
getData()
|
Object[] |
getDataArray()
This returns only the first row of the data array as an array of objects. |
List |
getDataObjectActionListeners()
retrurns all of the DataObjectActionListeners for this DataObject |
Object[] |
getDataRow(int idx)
get the data Object Array at the specified index. |
String |
getDOLookupField()
|
PersistenceEngine |
getFactory()
provide a handle to the factory for EJB-style persistence. |
int |
getId()
|
boolean |
getIsMultiKey()
|
boolean |
getIsMultiple()
|
boolean |
getIsNew()
|
boolean |
getIsUpdateable()
|
colinfo |
getKeyCol()
|
String |
getKeyColName()
get the key column name for this dataobject |
int |
getLevel()
|
int |
getNumRows()
|
Hashtable |
getOrderByHash()
|
String |
getParentForeignKey()
|
int |
getParentId()
get the unique id of the parent object |
RelationalObject |
getParentObject()
|
com.extentech.toolkit.ResourceLoader |
getProps()
|
String |
getSQL()
|
String |
getStringVal(int idx,
String key)
return the String value for the named column (field) at the row index specified ie: '0' for singleton DataObjects |
String |
getStringVal(String c)
|
String |
getTableName()
This returns the name of the table associated with the DataObject. |
Object |
getVal(int idx,
String key)
Look up the key value, return the String value of the first field. |
Object |
getVal(Object key,
String field)
Get value for field at the specified index. |
Object |
getVal(String key)
Look up the key value, return the String value of the first field. |
boolean |
hasChildren()
|
void |
initFromDataObject(DataObject dobj)
init with an alternate DataObject type |
boolean |
isNew()
|
boolean |
isPageable()
|
void |
load()
A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database. |
void |
passivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. |
void |
remove()
A container invokes this method before it removes the EJB object that is currently associated with the instance. |
void |
removeAll()
|
void |
removeByKey(Object key)
|
void |
removeChangedRow(Object o)
removes a changed row identified by the Object index |
void |
removeChangedRows()
|
void |
removeDataObjectActionListener(DataObjectActionListener e)
remove a DataObjectActionListener |
void |
removeDataObjectActionListeners()
remove a DataObjectActionListener |
boolean |
rollBack()
A simple roll-back mechanism copies the data back from a backup hashtable, then waits for a DB update from factory. |
void |
run()
|
void |
setCascadeUpdates(boolean b)
set whether or not to cascade the updates to child dataobjects |
void |
setColinfo(colinfo[] c)
set the array of colinfos for this DataObject |
void |
setData(Map d)
|
void |
setDataRowChanged(int idx)
|
void |
setDataRowChanged(Object idx)
|
void |
setDEBUG(boolean b)
|
void |
setDOLookupField(String s)
set the lookup (unique id) field for this DataObject |
void |
setFactory(PersistenceEngine f)
provide a handle to the factory for ejb-style persistence. |
void |
setHasChildren(boolean b)
|
void |
setId(int d)
set the Id for this DataObject |
void |
setIsMultiple(boolean b)
|
void |
setIsNew(boolean n)
|
void |
setIsUpdateable(boolean b)
|
void |
setKeyCol(colinfo c)
|
void |
setKeyCol(String c)
Set the key column for this DataObject Manually |
void |
setLevel(int i)
the level indicates the depth of this object in a Relational Heirarchy |
void |
setParent(RelationalObject par)
set the parent DataObject for this child |
void |
setParentForeignKey(String fldname)
set the key name of the parent DataObject |
void |
setProps(com.extentech.toolkit.ResourceLoader loader)
|
void |
setSQL(String sql)
set the SQL for this XDO |
void |
setTableName(String t)
|
void |
setVal(int idx,
String key,
Object val)
update the value in the data object array pointed to by the index value |
void |
setVal(Object idx,
Object key,
Object val)
update the value in the data object array pointed to by the index value |
void |
setVal(String key,
Object val)
update the first value in the data object array pointed to by the index value |
void |
store()
A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.extentech.ExtenBean.DataObject |
|---|
activate, init |
| Methods inherited from interface com.extentech.ExtenBean.SimpleDataObject |
|---|
getDataObject |
| Field Detail |
|---|
public Vector dataObjectActionListeners
public DataObject doparent
public transient com.extentech.toolkit.ResourceLoader props
public static String EXTENBEAN_LOADER_NAME
| Constructor Detail |
|---|
public DataObjectImpl()
| Method Detail |
|---|
public String getStringVal(String c)
getStringVal in interface SimpleDataObjectpublic boolean isNew()
isNew in interface SimpleDataObjectpublic List getColNames()
SimpleDataObject
getColNames in interface SimpleDataObjectSimpleDataObject.getColNames()public void run()
run in interface Runnablepublic String toString()
toString in class Objectpublic int getNumRows()
getNumRows in interface DataObjectgetNumRows in interface SimpleDataObjectpublic int getChangedRowCount()
getChangedRowCount in interface DataObjectpublic void setDEBUG(boolean b)
public void addDataObjectActionListener(DataObjectActionListener e)
DataObject
addDataObjectActionListener in interface DataObjectpublic void removeDataObjectActionListener(DataObjectActionListener e)
DataObject
removeDataObjectActionListener in interface DataObjecte - - the dataobject to remvoepublic void removeDataObjectActionListeners()
DataObject
removeDataObjectActionListeners in interface DataObjectpublic void fireDataObjectActionEvent(DataObject dob)
DataObject
fireDataObjectActionEvent in interface DataObjectpublic void setLevel(int i)
setLevel in interface RelationalObjectpublic int getLevel()
getLevel in interface RelationalObjectpublic boolean hasChildren()
hasChildren in interface RelationalObjectpublic void setFactory(PersistenceEngine f)
setFactory in interface DataObjectpublic PersistenceEngine getFactory()
getFactory in interface DataObject
public void load()
throws SQLException
load in interface DataObjectload in interface SimpleDataObjectSQLException
public void passivate()
throws SQLException
passivate in interface DataObjectSQLException
public void remove()
throws SQLException
remove in interface DataObjectremove in interface SimpleDataObjectSQLExceptionpublic void setCascadeUpdates(boolean b)
setCascadeUpdates in interface DataObjectpublic boolean getCascadeUpdates()
getCascadeUpdates in interface DataObject
public void store()
throws SQLException
store in interface DataObjectstore in interface SimpleDataObjectSQLExceptionpublic boolean getIsNew()
getIsNew in interface DataObjectpublic void setIsNew(boolean n)
setIsNew in interface DataObjectpublic void dumpNameVals()
public void dumpNameVals(PrintStream out)
public String getStringVal(int idx,
String key)
DataObject
getStringVal in interface DataObjectgetStringVal in interface SimpleDataObjectpublic String getKeyColName()
getKeyColName in interface SQLObjectpublic void setKeyCol(colinfo c)
setKeyCol in interface SQLObjectpublic void setParentForeignKey(String fldname)
setParentForeignKey in interface SQLObjectpublic String getParentForeignKey()
getParentForeignKey in interface SQLObjectpublic int getParentId()
getParentId in interface SQLObjectpublic void setParent(RelationalObject par)
setParent in interface RelationalObjectpublic RelationalObject getParentObject()
getParentObject in interface RelationalObjectpublic void setKeyCol(String c)
setKeyCol in interface SQLObjectpublic colinfo getKeyCol()
getKeyCol in interface SQLObjectpublic boolean getIsMultiKey()
public boolean rollBack()
rollBack in interface SQLObjectpublic boolean beginTrans()
beginTrans in interface SQLObject
public void addOrderByItem(int idx,
Object obj)
addOrderByItem in interface DataObjectpublic Hashtable getOrderByHash()
getOrderByHash in interface DataObjectpublic colinfo[] getColinfo()
DataObject
getColinfo in interface DataObjectgetColinfo in interface SimpleDataObjectpublic void setColinfo(colinfo[] c)
DataObject
setColinfo in interface DataObjectpublic Vector getColnames()
getColnames in interface DataObjectpublic Object[] getDataArray()
public void setDataRowChanged(int idx)
public void setDataRowChanged(Object idx)
public Object[] getChangedRows()
getChangedRows in interface DataObjectpublic void removeChangedRow(Object o)
DataObject
removeChangedRow in interface DataObjectpublic void removeChangedRows()
removeChangedRows in interface DataObjectpublic String getTableName()
getTableName in interface SQLObjectpublic void setTableName(String t)
setTableName in interface SQLObjectpublic void setIsUpdateable(boolean b)
setIsUpdateable in interface SQLObjectpublic boolean getIsUpdateable()
getIsUpdateable in interface SQLObjectpublic void setData(Map d)
setData in interface SQLObjectpublic void initFromDataObject(DataObject dobj)
public Map getData()
getData in interface DataObjectpublic String getSQL()
getSQL in interface SQLObjectpublic void setSQL(String sql)
setSQL in interface SQLObject
public Object getVal(int idx,
String key)
getVal in interface DataObjectgetVal in interface SimpleDataObjectpublic Object getVal(String key)
getVal in interface DataObjectgetVal in interface SimpleDataObject
public Object getVal(Object key,
String field)
getVal in interface DataObjectkey - field -
public void setVal(String key,
Object val)
setVal in interface DataObjectsetVal in interface SimpleDataObject
public void setVal(int idx,
String key,
Object val)
setVal in interface DataObjectsetVal in interface SimpleDataObject
public void setVal(Object idx,
Object key,
Object val)
public colinfo getColinfoByName(String colname)
getColinfoByName in interface DataObjectgetColinfoByName in interface SimpleDataObjectpublic int getColNumByName(String colname)
getColNumByName in interface DataObjectpublic Object[] getDataRow(int idx)
getDataRow in interface DataObjectgetDataRow in interface SimpleDataObjectpublic void addChildObject(RelationalObject o)
addChildObject in interface RelationalObjectpublic List getChildObjects()
RelationalObject
getChildObjects in interface RelationalObjectpublic Vector getAllChildrenInHeirarchy()
getAllChildrenInHeirarchy in interface RelationalObjectpublic List getChildrenByName(String name)
name -
public DataObject getChildByName(String name)
getChildByName in interface DataObjectname -
public boolean getIsMultiple()
getIsMultiple in interface DataObjectgetIsMultiple in interface SimpleDataObjectpublic void removeAll()
public void removeByKey(Object key)
public int getId()
getId in interface DataObjectpublic void setId(int d)
DataObject
setId in interface DataObjectpublic String getDOLookupField()
getDOLookupField in interface DataObjectpublic void setDOLookupField(String s)
DataObject
setDOLookupField in interface DataObjectpublic boolean isPageable()
isPageable in interface DataObjectpublic void setIsMultiple(boolean b)
setIsMultiple in interface DataObjectpublic void setHasChildren(boolean b)
public com.extentech.toolkit.ResourceLoader getProps()
public void setProps(com.extentech.toolkit.ResourceLoader loader)
loader - public List getDataObjectActionListeners()
DataObject
getDataObjectActionListeners in interface DataObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||