|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataObject
Interface defining a Data Object encapsulating data. DataObject can store data as a singleton object which represents a single item with named field values or DataObject can store data in a recordset-like fashion of rows of singleton DataObjects Furthermore, DataObjects can be hierarchical and maintain a child-parent relationship:
interface.
SQLObject interface provides for loading of data from underlying SQL-based data
sources although this should be refactored to be persistence layer agnostic
and throw a StorageException (@see com.extentech.ExtenXLS.plugin.integration.Storage),
ExtenDataObject,
RelationalObject,
SQLObject| Method Summary | |
|---|---|
void |
activate()
load the data from the underlying persistence layer |
void |
addDataObjectActionListener(DataObjectActionListener e)
add a DataObjectActionListener |
void |
addOrderByItem(int i,
Object o)
|
void |
fireDataObjectActionEvent(DataObject dob)
fires a DataObjectAction event |
boolean |
getCascadeUpdates()
get whether or not to cascade the updates to child dataobjects |
int |
getChangedRowCount()
|
Object[] |
getChangedRows()
|
DataObject |
getChildByName(String name)
|
colinfo[] |
getColinfo()
Returns the column metadata for this row of data. |
colinfo |
getColinfoByName(String colname)
|
Vector |
getColnames()
|
int |
getColNumByName(String colname)
Find the column number in the data array which contains the column represented by this columnname. |
Map |
getData()
|
List |
getDataObjectActionListeners()
retrurns all of the DataObjectActionListeners for this DataObject |
Object[] |
getDataRow(int i)
Get the data fields as an array of objects. |
String |
getDOLookupField()
|
PersistenceEngine |
getFactory()
|
int |
getId()
|
boolean |
getIsMultiple()
|
boolean |
getIsNew()
|
int |
getNumRows()
|
Hashtable |
getOrderByHash()
|
String |
getStringVal(int idx,
String col)
return the String value for the named column (field) at the row index specified ie: '0' for singleton DataObjects |
Object |
getVal(int idx,
String col)
get the value for the object at the row index and the column (field) specified |
Object |
getVal(Object key,
String col)
get the value for the named object at the column (field) specified |
Object |
getVal(String field)
|
void |
init()
Post-data initialization tasks. |
boolean |
isPageable()
|
void |
load()
load the data from the underlying persistence layer |
void |
passivate()
load the data from the underlying persistence layer |
void |
remove()
load the data from the underlying persistence layer |
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 |
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 |
setDOLookupField(String s)
set the lookup (unique id) field for this DataObject |
void |
setFactory(PersistenceEngine fact)
set the DataObject persistence engine (Factory) for this DataObject |
void |
setId(int id)
set the Id for this DataObject |
void |
setIsMultiple(boolean b)
|
void |
setIsNew(boolean b)
|
void |
setVal(int row,
String col,
Object val)
set the value of the field for the named column (field) to the new value object at the specified row index |
void |
setVal(String col,
Object val)
set the value of the field for the named column (field) to the new value object |
void |
store()
load the data from the underlying persistence layer |
| Methods inherited from interface com.extentech.ExtenBean.SimpleDataObject |
|---|
getColNames, getDataObject, getStringVal, isNew |
| Methods inherited from interface com.extentech.ExtenBean.RelationalObject |
|---|
addChildObject, getAllChildrenInHeirarchy, getChildObjects, getLevel, getParentObject, hasChildren, setLevel, setParent |
| Methods inherited from interface com.extentech.ExtenBean.SQLObject |
|---|
beginTrans, getIsUpdateable, getKeyCol, getKeyColName, getParentForeignKey, getParentId, getSQL, getTableName, rollBack, setData, setIsUpdateable, setKeyCol, setKeyCol, setParentForeignKey, setSQL, setTableName |
| Method Detail |
|---|
void activate()
throws SQLException
SQLExceptionvoid addDataObjectActionListener(DataObjectActionListener e)
e -
void addOrderByItem(int i,
Object o)
void fireDataObjectActionEvent(DataObject dob)
dob - boolean getCascadeUpdates()
int getChangedRowCount()
Object[] getChangedRows()
DataObject getChildByName(String name)
colinfo[] getColinfo()
getColinfo in interface SimpleDataObjectcolinfo getColinfoByName(String colname)
getColinfoByName in interface SimpleDataObjectVector getColnames()
int getColNumByName(String colname)
Map getData()
List getDataObjectActionListeners()
Object[] getDataRow(int i)
getDataRow in interface SimpleDataObjectString getDOLookupField()
PersistenceEngine getFactory()
int getId()
boolean getIsMultiple()
getIsMultiple in interface SimpleDataObjectboolean getIsNew()
int getNumRows()
getNumRows in interface SimpleDataObjectHashtable getOrderByHash()
String getStringVal(int idx,
String col)
getStringVal in interface SimpleDataObjectidx - col -
Object getVal(int idx,
String col)
getVal in interface SimpleDataObjectkey - col -
Object getVal(Object key,
String col)
key - col -
Object getVal(String field)
getVal in interface SimpleDataObjectvoid init()
boolean isPageable()
void load()
throws SQLException
load in interface SimpleDataObjectSQLException
void passivate()
throws SQLException
SQLException
void remove()
throws SQLException
remove in interface SimpleDataObjectSQLExceptionvoid removeChangedRow(Object o)
o - void removeChangedRows()
void removeDataObjectActionListener(DataObjectActionListener e)
e - - the dataobject to remvoevoid removeDataObjectActionListeners()
void setCascadeUpdates(boolean b)
void setColinfo(colinfo[] c)
c - void setDOLookupField(String s)
s - void setFactory(PersistenceEngine fact)
fact - void setId(int id)
id - void setIsMultiple(boolean b)
void setIsNew(boolean b)
void setVal(int row,
String col,
Object val)
setVal in interface SimpleDataObjectrow - col - val -
void setVal(String col,
Object val)
setVal in interface SimpleDataObjectcol - val -
void store()
throws SQLException
store in interface SimpleDataObjectSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||