net.sf.jaxme.sqls
Interface SQLFactory

All Known Subinterfaces:
DB2SQLFactory, HsqlDbSQLFactory
All Known Implementing Classes:
DB2SQLFactoryImpl, HsqlDbSQLFactoryImpl, SQLFactoryImpl

public interface SQLFactory

A factory for generating SQL statements.

Author:
Jochen Wiedmann

Nested Class Summary
static interface SQLFactory.Ident
           
 
Method Summary
 Schema getDefaultSchema()
          Returns the Default schema.
 java.lang.Integer getMaxColumnNameLength()
          Returns the maximum length of a column name.
 java.lang.Integer getMaxSchemaNameLength()
          Returns the maximum length of a schema name.
 java.lang.Integer getMaxTableNameLength()
          Returns the maximum length of a table name.
 Schema getSchema(java.sql.Connection pConnection, Schema.Name pName)
          Reads the schema named pName from the database.
 Schema getSchema(java.sql.Connection pConnection, java.lang.String pName)
          Reads the schema named pName from the database.
 Schema getSchema(Schema.Name pName)
          Returns the schema with the given name or null, if no such schema exists.
 Schema getSchema(java.lang.String pName)
          Returns the schema with the given name or null, if no such schema exists.
 java.util.Iterator getSchemas()
          Returns a list of all schemas.
 boolean isColumnNameCaseSensitive()
          Returns whether column names are case sensitive or not.
 boolean isSchemaNameCaseSensitive()
          Returns whether schema names are case sensitive or not.
 boolean isTableNameCaseSensitive()
          Returns whether table names are case sensitive or not.
 DeleteStatement newDeleteStatement()
          Creates a new DELETE statement.
 InsertStatement newInsertStatement()
          Creates a new INSERT statement.
 Schema newSchema(Schema.Name pName)
          Creates a new Schema with the given name.
 Schema newSchema(java.lang.String pName)
          Creates a new Schema with the given name.
 SelectStatement newSelectStatement()
          Creates a new SELECT statement.
 SQLGenerator newSQLGenerator()
          Creates a new SQLGenerator.
 UpdateStatement newUpdateStatement()
          Creates a new UPDATE statement.
 

Method Detail

getMaxTableNameLength

public java.lang.Integer getMaxTableNameLength()

Returns the maximum length of a table name.

Returns:
The maximum length or null, if checks for valid table name length are disabled.

isTableNameCaseSensitive

public boolean isTableNameCaseSensitive()

Returns whether table names are case sensitive or not. Defaults to false.


getMaxSchemaNameLength

public java.lang.Integer getMaxSchemaNameLength()

Returns the maximum length of a schema name.

Returns:
The maximum length or null, if checks for valid schema name length are disabled.

isSchemaNameCaseSensitive

public boolean isSchemaNameCaseSensitive()

Returns whether schema names are case sensitive or not. Defaults to false.


getMaxColumnNameLength

public java.lang.Integer getMaxColumnNameLength()

Returns the maximum length of a column name.

Returns:
The maximum length or null, if checks for valid column name length are disabled.

isColumnNameCaseSensitive

public boolean isColumnNameCaseSensitive()

Returns whether column names are case sensitive or not. Defaults to false.


newSelectStatement

public SelectStatement newSelectStatement()

Creates a new SELECT statement.


newInsertStatement

public InsertStatement newInsertStatement()

Creates a new INSERT statement.


newUpdateStatement

public UpdateStatement newUpdateStatement()

Creates a new UPDATE statement.


newDeleteStatement

public DeleteStatement newDeleteStatement()

Creates a new DELETE statement.


newSchema

public Schema newSchema(java.lang.String pName)

Creates a new Schema with the given name.


newSchema

public Schema newSchema(Schema.Name pName)

Creates a new Schema with the given name.


getDefaultSchema

public Schema getDefaultSchema()

Returns the Default schema. The default schema has the name null.


getSchema

public Schema getSchema(Schema.Name pName)

Returns the schema with the given name or null, if no such schema exists.


getSchema

public Schema getSchema(java.lang.String pName)

Returns the schema with the given name or null, if no such schema exists.


getSchemas

public java.util.Iterator getSchemas()

Returns a list of all schemas. The list includes the default schema, if getDefaultSchema() was called at any time.


newSQLGenerator

public SQLGenerator newSQLGenerator()

Creates a new SQLGenerator.


getSchema

public Schema getSchema(java.sql.Connection pConnection,
                        Schema.Name pName)
                 throws java.sql.SQLException

Reads the schema named pName from the database.

Throws:
java.sql.SQLException

getSchema

public Schema getSchema(java.sql.Connection pConnection,
                        java.lang.String pName)
                 throws java.sql.SQLException

Reads the schema named pName from the database.

Throws:
java.sql.SQLException