Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.access
Class SqlTransformerSupport

    java.lang.Object
      ru.biosoft.access.SqlTransformerSupport

All Implemented Interfaces:
  SqlTransformer

Direct Known Subclasses:
  PlotSqlTransformer, biouml.standard.type.access.ReferrerSqlTransformer, RelationTypeSqlTransformer, SimulationResultSqlTransformer, SpeciesSqlTransformer, UnitSqlTransformer

public abstract class SqlTransformerSupport
extends java.lang.Object
implements SqlTransformer

Field Summary
`protected DataCollection` | `owner`
`protected java.lang.String` | `table`

Constructor Summary
`SqlTransformerSupport()`

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` | `addUpdateCommands(java.sql.Statement statement, DataElement de)` Adds set of SQL commands to the statement to update data element in the table.
`java.lang.String` | `getCountQuery()` Creates SQL query for extracting count of data elements in the table.
`java.lang.String` | `getElementExistsQuery(java.lang.String name)` Creates SQL query for test is data element with specified name exists in the table.
`java.lang.String` | `getElementQuery(java.lang.String name)` Creates SQL query for extracting data element with specified name from table.
`java.lang.String` | `getNameListQuery()` Creates SQL query for extracting names for all data elements.
`java.lang.String` | `getTable()` Returns main database table used by this transformer.
`boolean` | `init(DataCollection owner)` Initialize transformer.
`protected java.lang.String` | `validateValue(java.lang.String value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface ru.biosoft.access.SqlTransformer
`addInsertCommands, create, getSelectQuery, getTemplateClass`

Field Detail

### owner

    protected DataCollection owner

### table

    protected java.lang.String table

Constructor Detail

### SqlTransformerSupport

    public SqlTransformerSupport()

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`
  Returns:
    `true` - if succeeded, `false` - otherwise.

### getTable

    public java.lang.String getTable()

  Description copied from interface: `SqlTransformer`
  Returns main database table used by this transformer. Generally main table is table that is used in FROM clause.

  Specified by:
    `getTable` in interface `SqlTransformer`

### getCountQuery

    public java.lang.String getCountQuery()

  Description copied from interface: `SqlTransformer`
  Creates SQL query for extracting count of data elements in the table.

  Specified by:
    `getCountQuery` in interface `SqlTransformer`
  Returns:
    SQL query for extracting count of data elements in the table.

### getNameListQuery

    public java.lang.String getNameListQuery()

  Description copied from interface: `SqlTransformer`
  Creates SQL query for extracting names for all data elements. Data element names should be sorted alphabetically.

  Specified by:
    `getNameListQuery` in interface `SqlTransformer`
  Returns:
    SQL query for extracting count of data elements in the table.

### getElementExistsQuery

    public java.lang.String getElementExistsQuery(java.lang.String name)

  Description copied from interface: `SqlTransformer`
  Creates SQL query for test is data element with specified name exists in the table.

  Specified by:
    `getElementExistsQuery` in interface `SqlTransformer`
  Parameters:
    `name` - Name (PK) of needed data element.
  Returns:
    SQL query for testing data element with specified name in the table.

### getElementQuery

    public java.lang.String getElementQuery(java.lang.String name)

  Description copied from interface: `SqlTransformer`
  Creates SQL query for extracting data element with specified name from table.

  Specified by:
    `getElementQuery` in interface `SqlTransformer`
  Parameters:
    `name` - Name (PK) of needed data element.
  Returns:
    SQL query for extracting data element with specified name from table.

### validateValue

    protected java.lang.String validateValue(java.lang.String value)

### 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`
  Parameters:
    `statement` - - statement to which SQL commands should be added.
    `de` - - object for which UPDATE 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.

  Specified by:
    `addDeleteCommands` in interface `SqlTransformer`
  Parameters:
    `statement` - - statement to which SQL commands should be added.
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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