public class InfoObjectManager extends BaseObject
_dbHelper, _dbName, _driverName, _hostName, _logger, _passwordString, _props, _userName
Constructor and Description |
---|
InfoObjectManager()
Instantiates a new info object manager.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
alterTable(CreateTableObject cto)
Compare the table that is currently in the database and add/delete columns to match
the map contained in the CreateTableObject.
|
protected java.lang.String |
buildInsertSql(java.lang.String tableName,
java.util.Map dataObject)
Build a SQL string that will insert the contents of the dataObject map into the
named table.
|
java.lang.String |
createTable(CreateTableObject cto)
Using the map of data contained in the CreateTableObject as a template, build a mySql table.
|
java.lang.String |
createTableAndInsert(CreateTableObject cto)
Check to see if the table already exists.
|
java.lang.String |
describeObject(CreateTableObject cto)
Returns a string containing a list of items in the data, the value used to create
the table, and the java type of the data.
|
java.lang.String |
dropTable(CreateTableObject cto)
Drop the table specified in the tablename string within the CreateTableObject.
|
protected java.lang.String |
genCreateTableSql(java.lang.String tableName,
java.util.Map dataMap)
Break down client object into a sql table.
|
java.lang.String |
insertData(InsertObject io)
Take the map wrapped in the passed-in InsertObject and store the values in
the named table.
|
static void |
main(java.lang.String[] args)
The main method.
|
java.lang.String |
precompiledInsert(InsertObject io)
Take the map wrapped in the passed-in InsertObject and store the values in
the named table using precompiled query syntax
NOTE: THis code is unfinished and not working.
|
QueryResponseObject |
retrieveData(QueryObject qo)
Run a query using the query string contained in the QueryObject.
|
QueryResponseObject |
runSql(QueryObject qo)
Run the sql statement contained in the QueryObject.
|
createDatabase, getInfo, runSql
public InfoObjectManager()
protected java.lang.String genCreateTableSql(java.lang.String tableName, java.util.Map dataMap)
tableName
- the table namedataMap
- the data mappublic java.lang.String describeObject(CreateTableObject cto)
cto
- the CreateTableObjectpublic java.lang.String createTable(CreateTableObject cto)
cto
- the ctopublic java.lang.String createTableAndInsert(CreateTableObject cto)
cto
- the ctoprotected java.lang.String buildInsertSql(java.lang.String tableName, java.util.Map dataObject)
tableName
- the table namedataObject
- the data objectpublic java.lang.String insertData(InsertObject io)
io
- - InsertObject containing table name and a Map of datapublic java.lang.String alterTable(CreateTableObject cto)
cto
- the ctopublic java.lang.String dropTable(CreateTableObject cto)
cto
- the ctopublic java.lang.String precompiledInsert(InsertObject io)
io
- - InsertObject containing table name and a Map of datapublic QueryResponseObject retrieveData(QueryObject qo)
qo
- the qopublic QueryResponseObject runSql(QueryObject qo)
qo
- the qopublic static void main(java.lang.String[] args) throws org.dom4j.DocumentException, java.io.IOException
args
- the argumentsorg.dom4j.DocumentException
- the document exceptionjava.io.IOException
- Signals that an I/O exception has occurred.