biouml.standard.type.access
Class ReactionSqlTransformer

java.lang.Object
  extended byru.biosoft.access.SqlTransformerSupport
      extended bybiouml.standard.type.access.ReferrerSqlTransformer
          extended bybiouml.standard.type.access.ReactionSqlTransformer
All Implemented Interfaces:
SqlTransformer

public class ReactionSqlTransformer
extends biouml.standard.type.access.ReferrerSqlTransformer


Field Summary
 
Fields inherited from class ru.biosoft.access.SqlTransformerSupport
owner, table
 
Constructor Summary
ReactionSqlTransformer()
           
 
Method Summary
 void addDeleteCommands(java.sql.Statement statement, java.lang.String name)
          Adds set of SQL commands to the statement to remove data element from the table.
 void addInsertCommands(java.sql.Statement statement, DataElement de)
          Adds set of SQL commands to the statement to insert data element into the table.
 void addUpdateCommands(java.sql.Statement statement, DataElement de)
          Adds set of SQL commands to the statement to update data element in the table.
 DataElement create(java.sql.ResultSet resultSet, java.sql.Connection connection)
          Extracts all needed fields from resultSet, and create instance of DataElement.
protected  DataElement createElement(java.sql.ResultSet resultSet)
          Creates the data element and fills it specific fields.
 java.lang.String getSelectQuery()
          Creates SQL query for extracting all data elements from table.
protected  java.lang.String getSpecificFields(DataElement de)
          Returns names of specific fields for the data element.
protected  java.lang.String[] getSpecificValues(DataElement de)
          Returns values of specific fields for the data element.
 java.lang.Class getTemplateClass()
          Returns class of object.
 boolean init(DataCollection owner)
          Initialize transformer.
 
Methods inherited from class ru.biosoft.access.SqlTransformerSupport
getCountQuery, getElementExistsQuery, getElementQuery, getNameListQuery, getTable, validateValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReactionSqlTransformer

public ReactionSqlTransformer()
Method Detail

init

public boolean init(DataCollection owner)
Description copied from interface: SqlTransformer
Initialize transformer. Must be called by client after SqlTransformer's constructor, and before using instance of SqlTransformer.

Specified by:
init in interface SqlTransformer
Overrides:
init in class SqlTransformerSupport

getTemplateClass

public java.lang.Class getTemplateClass()
Description copied from interface: SqlTransformer
Returns class of object.

Returns:
Class of transformed object.
See Also:
#create(java.sql.ResultSet)

getSelectQuery

public java.lang.String getSelectQuery()
Description copied from interface: SqlTransformer
Creates SQL query for extracting all data elements from table.

Returns:
SQL query for extracting all data elements from table.

createElement

protected DataElement createElement(java.sql.ResultSet resultSet)
                             throws java.sql.SQLException
Description copied from class: biouml.standard.type.access.ReferrerSqlTransformer
Creates the data element and fills it specific fields.

Throws:
java.sql.SQLException

create

public DataElement create(java.sql.ResultSet resultSet,
                          java.sql.Connection connection)
                   throws java.lang.Exception
Description copied from interface: SqlTransformer
Extracts all needed fields from resultSet, and create instance of DataElement. If necessary the method can use additional queries to get needed data using the specified connection.

Throws:
java.lang.Exception

getSpecificFields

protected java.lang.String getSpecificFields(DataElement de)
Description copied from class: biouml.standard.type.access.ReferrerSqlTransformer
Returns names of specific fields for the data element. This names will be used in INSERT clause.

See Also:
ReferrerSqlTransformer.getSpecificValues(ru.biosoft.access.DataElement)

getSpecificValues

protected java.lang.String[] getSpecificValues(DataElement de)
Description copied from class: biouml.standard.type.access.ReferrerSqlTransformer
Returns values of specific fields for the data element. This values will be used in VALUES clause.

See Also:
ReferrerSqlTransformer.getSpecificFields(ru.biosoft.access.DataElement)

addInsertCommands

public void addInsertCommands(java.sql.Statement statement,
                              DataElement de)
                       throws java.lang.Exception
Description copied from class: biouml.standard.type.access.ReferrerSqlTransformer
Adds set of SQL commands to the statement to insert data element into the table.

Parameters:
statement - - statement to which SQL commands should be added.
de - - object for which INSERT statements will be generated.
Throws:
java.lang.Exception

addDeleteCommands

public void addDeleteCommands(java.sql.Statement statement,
                              java.lang.String name)
                       throws java.lang.Exception
Adds set of SQL commands to the statement to remove data element from the table.

Parameters:
statement - - statement to which SQL commands should be added.
Throws:
java.lang.Exception

addUpdateCommands

public void addUpdateCommands(java.sql.Statement statement,
                              DataElement de)
                       throws java.lang.Exception
Adds set of SQL commands to the statement to update data element in the table.

Specified by:
addUpdateCommands in interface SqlTransformer
Overrides:
addUpdateCommands in class SqlTransformerSupport
Parameters:
statement - - statement to which SQL commands should be added.
de - - object for which UPDATE statements will be generated.
Throws:
java.lang.Exception


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.