org.apache.ws.jaxme.sqls
Interface SQLFactory

All Known Subinterfaces:
DB2SQLFactory, HsqlDbSQLFactory, OraSQLFactory
All 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.
 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.
 ObjectFactory getObjectFactory()
          Returns the object factory being used.
 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.
 Table getTable(java.sql.Connection pConnection, Schema.Name pSchema, Table.Name pTable)
          Reads the table named pTable from the schema named pSchema in the database.
 Table getTable(java.sql.Connection pConnection, java.lang.String pSchema, java.lang.String 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.
 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

getObjectFactory

ObjectFactory getObjectFactory()

Returns the object factory being used.


getMaxTableNameLength

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

boolean isTableNameCaseSensitive()

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


getMaxSchemaNameLength

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

boolean isSchemaNameCaseSensitive()

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


getMaxColumnNameLength

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

boolean isColumnNameCaseSensitive()

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


newSelectStatement

SelectStatement newSelectStatement()

Creates a new SELECT statement.


newInsertStatement

InsertStatement newInsertStatement()

Creates a new INSERT statement.


newUpdateStatement

UpdateStatement newUpdateStatement()

Creates a new UPDATE statement.


newDeleteStatement

DeleteStatement newDeleteStatement()

Creates a new DELETE statement.


newSchema

Schema newSchema(java.lang.String pName)

Creates a new Schema with the given name.


newSchema

Schema newSchema(Schema.Name pName)

Creates a new Schema with the given name.


getDefaultSchema

Schema getDefaultSchema()

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


getSchema

Schema getSchema(Schema.Name pName)

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


getSchema

Schema getSchema(java.lang.String pName)

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


getSchemas

java.util.Iterator getSchemas()

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


newSQLGenerator

SQLGenerator newSQLGenerator()

Creates a new SQLGenerator.


getSchema

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

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

getTable

Table getTable(java.sql.Connection pConnection,
               Schema.Name pSchema,
               Table.Name pTable)
               throws java.sql.SQLException

Reads the table named pTable from the schema named pSchema in the database.

Throws:
java.sql.SQLException

getTable

Table getTable(java.sql.Connection pConnection,
               java.lang.String pSchema,
               java.lang.String pTable)
               throws java.sql.SQLException

Reads the table named pTable from the schema named pSchema in the database.

Throws:
java.sql.SQLException