org.apache.ws.jaxme.sqls

Interface SQLFactory

Known Subinterfaces:
DB2SQLFactory, HsqlDbSQLFactory, OraSQLFactory
Known Implementing Classes:
DB2SQLFactoryImpl, HsqlDbSQLFactoryImpl, OraSQLFactoryImpl, 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.
Integer
getMaxColumnNameLength()
Returns the maximum length of a column name.
Integer
getMaxSchemaNameLength()
Returns the maximum length of a schema name.
Integer
getMaxTableNameLength()
Returns the maximum length of a table name.
ObjectFactory
getObjectFactory()
Returns the object factory being used.
Schema
getSchema(Connection pConnection, String pName)
Reads the schema named pName from the database.
Schema
getSchema(Connection pConnection, Schema.Name pName)
Reads the schema named pName from the database.
Schema
getSchema(String pName)
Returns the schema with the given name or null, if no such schema exists.
Schema
getSchema(Schema.Name pName)
Returns the schema with the given name or null, if no such schema exists.
Iterator
getSchemas()
Returns a list of all schemas.
Table
getTable(Connection pConnection, String pSchema, String pTable)
Reads the table named pTable from the schema named pSchema in the database.
Table
getTable(Connection pConnection, Schema.Name pSchema, Table.Name pTable)
Reads the table named pTable from the schema named pSchema in the database.
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.
SQLGenerator
newSQLGenerator()
Creates a new SQLGenerator.
Schema
newSchema(String pName)
Creates a new Schema with the given name.
Schema
newSchema(Schema.Name pName)
Creates a new Schema with the given name.
SelectStatement
newSelectStatement()
Creates a new SELECT statement.
UpdateStatement
newUpdateStatement()
Creates a new UPDATE statement.

Method Details

getDefaultSchema

public Schema getDefaultSchema()
Returns the Default schema. The default schema has the name null.

getMaxColumnNameLength

public 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.

getMaxSchemaNameLength

public 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.

getMaxTableNameLength

public 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.

getObjectFactory

public ObjectFactory getObjectFactory()
Returns the object factory being used.

getSchema

public Schema getSchema(Connection pConnection,
                        String pName)
            throws SQLException
Reads the schema named pName from the database.

getSchema

public Schema getSchema(Connection pConnection,
                        Schema.Name pName)
            throws SQLException
Reads the schema named pName from the database.

getSchema

public Schema getSchema(String pName)
Returns the schema with the given name or null, if no such schema exists.

getSchema

public Schema getSchema(Schema.Name pName)
Returns the schema with the given name or null, if no such schema exists.

getSchemas

public Iterator getSchemas()

getTable

public Table getTable(Connection pConnection,
                      String pSchema,
                      String pTable)
            throws SQLException
Reads the table named pTable from the schema named pSchema in the database.

getTable

public Table getTable(Connection pConnection,
                      Schema.Name pSchema,
                      Table.Name pTable)
            throws SQLException
Reads the table named pTable from the schema named pSchema in the database.

isColumnNameCaseSensitive

public boolean isColumnNameCaseSensitive()
Returns whether column names are case sensitive or not. Defaults to false.

isSchemaNameCaseSensitive

public boolean isSchemaNameCaseSensitive()
Returns whether schema names are case sensitive or not. Defaults to false.

isTableNameCaseSensitive

public boolean isTableNameCaseSensitive()
Returns whether table names are case sensitive or not. Defaults to false.

newDeleteStatement

public DeleteStatement newDeleteStatement()
Creates a new DELETE statement.

newInsertStatement

public InsertStatement newInsertStatement()
Creates a new INSERT statement.

newSQLGenerator

public SQLGenerator newSQLGenerator()
Creates a new SQLGenerator.

newSchema

public Schema newSchema(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.

newSelectStatement

public SelectStatement newSelectStatement()
Creates a new SELECT statement.

newUpdateStatement

public UpdateStatement newUpdateStatement()
Creates a new UPDATE statement.