com.extentech.ExtenXLS.binder
Class NamedRangeDataObject

java.lang.Object
  extended by com.extentech.ExtenBean.DataObjectImpl
      extended by com.extentech.ExtenXLS.binder.NamedRangeDataObject
All Implemented Interfaces:
DataObject, RelationalObject, SimpleDataObject, SQLObject, Serializable, Runnable

public class NamedRangeDataObject
extends DataObjectImpl

NamedRangeDataObject is an implementation of the DataObject that is intialized off of an ExtenXLS NamedRange

Since:
Version:
Author:
John McMahon -- Copyright ©?2005 Extentech Inc.
See Also:
, Serialized Form

Field Summary
 
Fields inherited from class com.extentech.ExtenBean.DataObjectImpl
dataObjectActionListeners, doparent, EXTENBEAN_LOADER_NAME, props
 
Constructor Summary
NamedRangeDataObject()
          Default constructor
NamedRangeDataObject(DataObject d, NameHandle n)
          Constructor Created off of an XMLDataObject and NameHandle.
 
Method Summary
 void activate()
          load the data from the underlying persistence layer
 void addColinfo(colinfo cifo)
          Adds a colinfo to the list of colinfos if the colinfo doesn't exist.
 Object get(Object key)
           
 colinfo[] getColinfo()
          Returns the column metadata for this row of data.
 colinfo getColinfoByName(String colname)
           
 int getColNumByName(String colname)
          Return the column number by name
 SimpleDataObject getDataObject(int idx)
          Poplulate a new Singular DataObject from this multi-row DataObject.
 Object[] getDataRow(int i)
          get the data Object Array at the specified index.
 int getNumRows()
           
 String getStringVal(int idx, String col)
          Return the string value of the data at the specified location
 Object getVal(int idx, String col)
          Returns the value at the specified location
 void init()
          Post-data initialization tasks.
 void init(DataObject d, NameHandle n)
          Initialize the NRDO with an XML collection DO and a NameHandle
 Object put(Object key, Object val)
           
 void setRowData(Object[] vals, int rownum)
          Sets a complete row of data externally
 void setVal(int row, String col, Object val)
          update the value in the data object array pointed to by the index value
 void setVal(String col, Object val)
          Not used currently, see setVal below!
 
Methods inherited from class com.extentech.ExtenBean.DataObjectImpl
addChildObject, addDataObjectActionListener, addOrderByItem, beginTrans, dumpNameVals, dumpNameVals, fireDataObjectActionEvent, getAllChildrenInHeirarchy, getCascadeUpdates, getChangedRowCount, getChangedRows, getChildByName, getChildObjects, getChildrenByName, getColnames, getColNames, getData, getDataArray, getDataObjectActionListeners, getDOLookupField, getFactory, getId, getIsMultiKey, getIsMultiple, getIsNew, getIsUpdateable, getKeyCol, getKeyColName, getLevel, getOrderByHash, getParentForeignKey, getParentId, getParentObject, getProps, getSQL, getStringVal, getTableName, getVal, getVal, hasChildren, initFromDataObject, isNew, isPageable, load, passivate, remove, removeAll, removeByKey, removeChangedRow, removeChangedRows, removeDataObjectActionListener, removeDataObjectActionListeners, rollBack, run, setCascadeUpdates, setColinfo, setData, setDataRowChanged, setDataRowChanged, setDEBUG, setDOLookupField, setFactory, setHasChildren, setId, setIsMultiple, setIsNew, setIsUpdateable, setKeyCol, setKeyCol, setLevel, setParent, setParentForeignKey, setProps, setSQL, setTableName, setVal, store, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedRangeDataObject

public NamedRangeDataObject(DataObject d,
                            NameHandle n)
Constructor Created off of an XMLDataObject and NameHandle. Populates the colinfos, & calls setNameData.


NamedRangeDataObject

public NamedRangeDataObject()
Default constructor

Method Detail

init

public void init(DataObject d,
                 NameHandle n)
Initialize the NRDO with an XML collection DO and a NameHandle


init

public void init()
Description copied from interface: DataObject
Post-data initialization tasks.


put

public Object put(Object key,
                  Object val)

get

public Object get(Object key)

getColinfo

public colinfo[] getColinfo()
Description copied from interface: DataObject
Returns the column metadata for this row of data.

Specified by:
getColinfo in interface DataObject
Specified by:
getColinfo in interface SimpleDataObject
Overrides:
getColinfo in class DataObjectImpl
Returns:
An array of colinfo objects containing
See Also:
DataObject.getColinfo()

getColinfoByName

public colinfo getColinfoByName(String colname)
Specified by:
getColinfoByName in interface DataObject
Specified by:
getColinfoByName in interface SimpleDataObject
Overrides:
getColinfoByName in class DataObjectImpl
See Also:
DataObject.getColinfoByName(java.lang.String)

getColNumByName

public int getColNumByName(String colname)
Return the column number by name

Specified by:
getColNumByName in interface DataObject
Overrides:
getColNumByName in class DataObjectImpl
See Also:
DataObject.getColNumByName(java.lang.String)

getVal

public Object getVal(int idx,
                     String col)
Returns the value at the specified location

Specified by:
getVal in interface DataObject
Specified by:
getVal in interface SimpleDataObject
Overrides:
getVal in class DataObjectImpl
Parameters:
idx - - The 0 based row index of the value.
col - - the name of the colinfo

getStringVal

public String getStringVal(int idx,
                           String col)
Return the string value of the data at the specified location

Specified by:
getStringVal in interface DataObject
Specified by:
getStringVal in interface SimpleDataObject
Overrides:
getStringVal in class DataObjectImpl

getNumRows

public int getNumRows()
Specified by:
getNumRows in interface DataObject
Specified by:
getNumRows in interface SimpleDataObject
Overrides:
getNumRows in class DataObjectImpl

setVal

public void setVal(String col,
                   Object val)
Not used currently, see setVal below!

Specified by:
setVal in interface DataObject
Specified by:
setVal in interface SimpleDataObject
Overrides:
setVal in class DataObjectImpl

setVal

public void setVal(int row,
                   String col,
                   Object val)
Description copied from class: DataObjectImpl
update the value in the data object array pointed to by the index value

Specified by:
setVal in interface DataObject
Specified by:
setVal in interface SimpleDataObject
Overrides:
setVal in class DataObjectImpl
See Also:
DataObject.setVal(int, java.lang.String, java.lang.Object)

getDataRow

public Object[] getDataRow(int i)
Description copied from class: DataObjectImpl
get the data Object Array at the specified index.

Specified by:
getDataRow in interface DataObject
Specified by:
getDataRow in interface SimpleDataObject
Overrides:
getDataRow in class DataObjectImpl
Returns:
An array of values from a database

addColinfo

public void addColinfo(colinfo cifo)
Adds a colinfo to the list of colinfos if the colinfo doesn't exist. Loops through the array of data, and adds space in the row data arrays for the new data.


setRowData

public void setRowData(Object[] vals,
                       int rownum)
Sets a complete row of data externally

Parameters:
vals -
rownum -

activate

public void activate()
              throws SQLException
Description copied from interface: DataObject
load the data from the underlying persistence layer

Throws:
SQLException

getDataObject

public SimpleDataObject getDataObject(int idx)
Description copied from interface: SimpleDataObject
Poplulate a new Singular DataObject from this multi-row DataObject.



Copyright © 2011 Extentech Inc. All Rights Reserved.