org.glite.security.voms.database
Interface DBFlavour

All Known Implementing Classes:
MySQLFlavour, OracleFlavour

public interface DBFlavour


Method Summary
 DirectManipulation dropSequences()
          Return a DirectManipulation for dropping all sequences in the database.
 Column getBigintColumn(java.lang.String name)
          Return a "BIGINT" column.
 Column getBlobColumn(java.lang.String name)
          Return a "BLOB" column.
 Column getBooleanColumn(java.lang.String name)
          Return a "BOOLEAN" column.
 java.lang.String getEmptyBlob()
          Return a string that can be used as the empty BLOB in an SQL statement.
 java.lang.String getFlavour()
          Return the name of the database flavour, i.e. the database type.
 Column getIntColumn(java.lang.String name)
          Return an "INT" column.
 Sequence getSequence(java.lang.String name)
          Return the sequence with the given name.
 Column getSmallintColumn(java.lang.String name)
          Return a "SMALLINT" column.
 Table getTable(java.lang.String name)
          Return a new empty table description, ready to be populated with Columns and indices.
 Column getTimestampColumn(java.lang.String name)
          Return a "TIMESTAMP" column.
 Column getTinyintColumn(java.lang.String name)
          Return a "TINYINT" column.
 Column getVarcharColumn(java.lang.String name, int width)
          Return a "VARCHAR" column.
 boolean isFunctional(java.sql.Connection conn)
          Tries to determine if the given connection is functional by executing a simple query against the database.
 void storeObject(Transaction t, java.io.Serializable o, java.lang.String table, java.lang.String column, java.lang.String condition, long parameter)
          Store o in table.column at the row described by the given condition.
 

Method Detail

getFlavour

public java.lang.String getFlavour()
Return the name of the database flavour, i.e. the database type.


getTable

public Table getTable(java.lang.String name)
Return a new empty table description, ready to be populated with Columns and indices.


getBigintColumn

public Column getBigintColumn(java.lang.String name)
Return a "BIGINT" column. The actual type used depends on the database flavour.


getIntColumn

public Column getIntColumn(java.lang.String name)
Return an "INT" column. The actual type used depends on the database flavour.


getSmallintColumn

public Column getSmallintColumn(java.lang.String name)
Return a "SMALLINT" column. The actual type used depends on the database flavour.


getTinyintColumn

public Column getTinyintColumn(java.lang.String name)
Return a "TINYINT" column. The actual type used depends on the database flavour.


getBooleanColumn

public Column getBooleanColumn(java.lang.String name)
Return a "BOOLEAN" column. The actual type used depends on the database flavour.


getVarcharColumn

public Column getVarcharColumn(java.lang.String name,
                               int width)
Return a "VARCHAR" column. The actual type used depends on the database flavour.


getBlobColumn

public Column getBlobColumn(java.lang.String name)
Return a "BLOB" column. The actual type used depends on the database flavour.


getTimestampColumn

public Column getTimestampColumn(java.lang.String name)
Return a "TIMESTAMP" column. The actual type used depends on the database flavour.


isFunctional

public boolean isFunctional(java.sql.Connection conn)
Tries to determine if the given connection is functional by executing a simple query against the database. Returns true if it succeeds.


getSequence

public Sequence getSequence(java.lang.String name)
Return the sequence with the given name.


dropSequences

public DirectManipulation dropSequences()
Return a DirectManipulation for dropping all sequences in the database.


getEmptyBlob

public java.lang.String getEmptyBlob()
Return a string that can be used as the empty BLOB in an SQL statement.


storeObject

public void storeObject(Transaction t,
                        java.io.Serializable o,
                        java.lang.String table,
                        java.lang.String column,
                        java.lang.String condition,
                        long parameter)
                 throws VOMSException
Store o in table.column at the row described by the given condition.

Throws:
VOMSException