com.sri.emo.commandline.defaults
Class AbstractExportSupport

java.lang.Object
  extended by com.sri.emo.commandline.defaults.AbstractExportSupport
Direct Known Subclasses:
AbstractNodeExportSupport

public abstract class AbstractExportSupport
extends Object


Field Summary
protected static int TESTER_UID
          The expected UID of the tester.
 
Constructor Summary
AbstractExportSupport(NodeTracker nodeTracker, SqlRowGenerator generator)
           
 
Method Summary
protected  List exportSecuredDBobjectEntries(DBObject targetObject)
           
protected  List exportSecurityEntries(RowSecuredDBObject object)
          Creates default Row security for each row secured object being export.
protected  SqlRowGenerator getGenerator()
          Retrieve the SQL generator.
protected  NodeTracker getNodeTracker()
          Retrieve the node tracker.
 List getSQL(DBObject dbobject)
          generate list of INSERT statements for given object (and any security objects associated with the target object), IFF that object hasn't already been visited.
protected  int writeDBObject(PrintWriter writer, DBObject dbobject)
          Exports a dbobject.
protected  int writeDBObject(PrintWriter writer, List severalDBObjects)
          Writes a list of dbobjects to the output stream.
protected  void writeSql(PrintWriter writer, List listOfSql)
          Writes a list of sql statements to the printwriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TESTER_UID

protected static final int TESTER_UID
The expected UID of the tester.

See Also:
Constant Field Values
Constructor Detail

AbstractExportSupport

public AbstractExportSupport(NodeTracker nodeTracker,
                             SqlRowGenerator generator)
Method Detail

writeDBObject

protected int writeDBObject(PrintWriter writer,
                            DBObject dbobject)
                     throws DBException
Exports a dbobject. This function checks to see if a particular dbobject has been already export before performing the export.

Parameters:
writer - the output stream to write the SQL insert to.
dbobject - the dbobject we're exporting.
Returns:
number of INSERT statements written; 0 if the object has already been visited.
Throws:
DBException

writeSql

protected void writeSql(PrintWriter writer,
                        List listOfSql)
                 throws DBException
Writes a list of sql statements to the printwriter.

Parameters:
writer - the printwriter to append the data to.
listOfSql - list of strings.
Throws:
DBException - if the data is not appropriately a sql string.

writeDBObject

protected int writeDBObject(PrintWriter writer,
                            List severalDBObjects)
                     throws DBException
Writes a list of dbobjects to the output stream.

Parameters:
writer -
severalDBObjects -
Returns:
Throws:
DBException

exportSecuredDBobjectEntries

protected List exportSecuredDBobjectEntries(DBObject targetObject)
                                     throws DBException
Throws:
DBException

exportSecurityEntries

protected List exportSecurityEntries(RowSecuredDBObject object)
                              throws DBException
Creates default Row security for each row secured object being export.

Parameters:
object -
Returns:
the number of rows added to the export table.
Throws:
DBException

getSQL

public List getSQL(DBObject dbobject)
            throws DBException
generate list of INSERT statements for given object (and any security objects associated with the target object), IFF that object hasn't already been visited.

Returns:
list of strings: all the SQL insert statements for the given object
Throws:
DBException

getGenerator

protected SqlRowGenerator getGenerator()
Retrieve the SQL generator.

Returns:
generator or null

getNodeTracker

protected NodeTracker getNodeTracker()
Retrieve the node tracker.

Returns:
tracker or null


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.