|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.binder.CellBinder
public class CellBinder
The CellBinder maintains arbitrary mappings between
WorkBook CellRanges and external data sources such as a SQL Resultset.
The CellBinder uses an XML mapping file to determine which Cells in the
WorkBook to map to which values in the data source.
Cell,
DataBoundCell| Field Summary | |
|---|---|
static int |
CELLBINDER_RUN
|
static int |
CELLBOUND_TEMPLATE
|
| Constructor Summary | |
|---|---|
CellBinder(WorkBook b,
DataObject cn,
com.extentech.toolkit.LogOutputter lgr)
The CellBinder is responsible for managing the data bindings of a single connection (JDBC) with the Cells of a single com.extentech.ExtenXLS.WorkBook. |
|
CellBinder(WorkBook b,
com.extentech.toolkit.LogOutputter lgr)
The CellBinder is responsible for managing the data bindings of a single connection (JDBC) with the Cells of a single com.extentech.ExtenXLS.WorkBook. |
|
| Method Summary | |
|---|---|
void |
bindXMLStream(String workingdir)
Initializes the binding for stream-based DataBoundCellRanges Cell ranges are stored in a vector within a CellRangeDataObject. |
Connection |
getCon()
returns initialized DB Factory connection |
DataObject |
getConnection()
Returns connection DataObject for this cellbinder |
List |
getNewRowTracker()
|
Map |
getOffsetTracker()
|
Collection |
getRESTEmit()
RESTEmit is a representation of changes as a JSON array for use in Sheetstr |
boolean |
getSQLreplaceWithParamName()
|
void |
initDataCellBindings(Map paramvals)
Initializes the binding for database connected DataBoundCellRanges Cell ranges are stored in a vector within a CellRangeDataObject. |
void |
parseNBindXMLStream(String xmlFile,
HashMap cellranges,
boolean auto_convert,
boolean use_namespaces)
Given an xml file and a series of cell ranges mapped to an xpath-type string, use XppPullParsing to traverse thru xml, matching the xpath fieldbindings and inputting values to the mapped cell ranges |
void |
setDebug(boolean d)
|
void |
setNewRowTracker(List newRowTracker)
|
void |
setOffsetTracker(Map offsetTracker)
|
void |
setSQLreplaceWithParamName(boolean b)
|
String |
toString()
|
void |
updateBeanCells(Map parms)
update bound Cells with a Hashtable of values |
void |
updateBeanCells(Map parms,
boolean overwriteFormulas)
update Namedrange bound Cells with a Hashtable of values |
void |
updateDataCells()
Updates the Cells in the WorkBook from the values in the bound data source. |
void |
updateParameterCell(String mapname,
Object val)
Set a single value in the WorkBook based on the XML mapping file. |
void |
updateParameterCells(Map parms)
update bound Cells with a Hashtable of values Parameter bound cells are defined with a parambinding node in the RDF file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int CELLBOUND_TEMPLATE
public static int CELLBINDER_RUN
| Constructor Detail |
|---|
public CellBinder(WorkBook b,
com.extentech.toolkit.LogOutputter lgr)
public CellBinder(WorkBook b,
DataObject cn,
com.extentech.toolkit.LogOutputter lgr)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic void setDebug(boolean d)
public void updateParameterCell(String mapname,
Object val)
String - the parambinding nameObject - the new Cell valuepublic void updateParameterCells(Map parms)
parms - a hashtable of values to match with parameter-bound cells
public void updateBeanCells(Map parms)
throws DataAccessException
parms - a hashtable of values to match with parameter-bound cells
DataAccessException
public void updateBeanCells(Map parms,
boolean overwriteFormulas)
throws DataAccessException
parms - a hashtable of values to match with parameter-bound cellsoverwriteFormulas - - whether to override formula cells by writing values rather
than extending the formula range
DataAccessExceptionpublic void initDataCellBindings(Map paramvals)
Hashtable - paramvals contains SQL filter parameters for data bound Cells
these are NOT the same as the values for parameter-bound Cellspublic void bindXMLStream(String workingdir)
Map - xmldatastreams (name, filename)
20070226 KSC: Major rewrite
public void updateDataCells()
throws Exception
Exceptionpublic boolean getSQLreplaceWithParamName()
public void setSQLreplaceWithParamName(boolean b)
b - public List getNewRowTracker()
public void setNewRowTracker(List newRowTracker)
newRowTracker - The newRowTracker to set.public Map getOffsetTracker()
public void setOffsetTracker(Map offsetTracker)
offsetTracker - The offsetTracker to set.public DataObject getConnection()
public Connection getCon()
public void parseNBindXMLStream(String xmlFile,
HashMap cellranges,
boolean auto_convert,
boolean use_namespaces)
xmlFile - string xml filenamecellranges - HashMap of fieldbindings=>range|source|shiftcols|typeauto_convert - automatic_conversions from RDF datastream element, truth of "do not use explicitly named type to convert xml data"use_namespaces - namespaces from RDF datastream element, truth of "fieldbindings contain namespaces in their xpaths"bindXMLStreampublic Collection getRESTEmit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||