|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.jaxme.sqls.impl.SQLFactoryImpl
Default implementation of an SQLFactory.
| Nested Class Summary | |
static class |
SQLFactoryImpl.IdentImpl
|
| Nested classes inherited from class org.apache.ws.jaxme.sqls.SQLFactory |
SQLFactory.Ident |
| Constructor Summary | |
SQLFactoryImpl()
Creates a new instance of SQLFactoryImpl. |
|
| 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 pConn,
Schema.Name pName)
Reads the schema named pName from the database. |
Schema |
getSchema(java.sql.Connection pConn,
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. |
protected Schema |
makeSchema(Schema.Name pName)
|
protected Column |
newColumnImpl(Table pTable,
Column.Name pName,
Column.Type pType)
|
DeleteStatement |
newDeleteStatement()
Creates a new DELETE statement. |
SQLFactory.Ident |
newIdent(java.lang.String pName)
|
InsertStatement |
newInsertStatement()
Creates a new INSERT statement. |
protected ObjectFactory |
newObjectFactory()
|
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. |
protected Schema |
newSchemaImpl(Schema.Name pName)
|
SelectStatement |
newSelectStatement()
Creates a new SELECT statement. |
SQLGenerator |
newSQLGenerator()
Creates a new SQLGenerator. |
protected Table |
newTableImpl(Schema pSchema,
Table.Name pName)
|
UpdateStatement |
newUpdateStatement()
Creates a new UPDATE statement. |
protected Column |
readColumn(Table pTable,
java.lang.String pColumnName,
int pDataType,
java.lang.String pTypeName,
long pColumnSize,
int pDecimalDigits,
int pNullable)
|
protected ForeignKey[] |
readForeignKeys(java.sql.DatabaseMetaData pData,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable[] pTables)
|
protected Index |
readPrimaryKey(java.sql.DatabaseMetaData pData,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable)
|
protected Table |
readTable(java.sql.DatabaseMetaData pData,
Schema pSchema,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable)
|
protected org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable[] |
readTables(java.sql.DatabaseMetaData pData,
Schema.Name pSchema,
Table.Name pTable)
|
void |
setColumnNameCaseSensitive(boolean pColumnNameCaseSensitive)
Sets whether column names are case sensitive or not. |
void |
setMaxColumnNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a column name. |
void |
setMaxSchemaNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a schema name. |
void |
setMaxTableNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a table name. |
protected void |
setObjectFactory(ObjectFactory pFactory)
|
void |
setSchemaNameCaseSensitive(boolean pSchemaNameCaseSensitive)
Sets whether schema names are case sensitive or not. |
void |
setTableNameCaseSensitive(boolean pTableNameCaseSensitive)
Sets whether table names are case sensitive or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SQLFactoryImpl()
Creates a new instance of SQLFactoryImpl.
| Method Detail |
protected ObjectFactory newObjectFactory()
public ObjectFactory getObjectFactory()
SQLFactoryReturns the object factory being used.
getObjectFactory in interface SQLFactoryprotected void setObjectFactory(ObjectFactory pFactory)
public void setMaxTableNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a table name.
pMaxLength - The maximum length or null to disable checks for
valid table name length.public java.lang.Integer getMaxTableNameLength()
SQLFactoryReturns the maximum length of a table name.
getMaxTableNameLength in interface SQLFactorypublic void setTableNameCaseSensitive(boolean pTableNameCaseSensitive)
Sets whether table names are case sensitive or not. Defaults to false.
SQLFactory.isTableNameCaseSensitive()public boolean isTableNameCaseSensitive()
SQLFactoryReturns whether table names are case sensitive or not. Defaults to false.
isTableNameCaseSensitive in interface SQLFactorypublic void setMaxColumnNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a column name.
pMaxLength - The maximum length or null to disable checks for
valid column name length.public java.lang.Integer getMaxColumnNameLength()
SQLFactoryReturns the maximum length of a column name.
getMaxColumnNameLength in interface SQLFactorypublic void setColumnNameCaseSensitive(boolean pColumnNameCaseSensitive)
Sets whether column names are case sensitive or not. Defaults to false.
SQLFactory.isColumnNameCaseSensitive()public boolean isColumnNameCaseSensitive()
SQLFactoryReturns whether column names are case sensitive or not. Defaults to false.
isColumnNameCaseSensitive in interface SQLFactorypublic void setSchemaNameCaseSensitive(boolean pSchemaNameCaseSensitive)
Sets whether schema names are case sensitive or not. Defaults to false.
SQLFactory.isSchemaNameCaseSensitive()public boolean isSchemaNameCaseSensitive()
SQLFactoryReturns whether schema names are case sensitive or not. Defaults to false.
isSchemaNameCaseSensitive in interface SQLFactorypublic void setMaxSchemaNameLength(java.lang.Integer pMaxLength)
Sets the maximum length of a schema name.
pMaxLength - The maximum length or null to disable checks for
valid schema name length.public java.lang.Integer getMaxSchemaNameLength()
SQLFactoryReturns the maximum length of a schema name.
getMaxSchemaNameLength in interface SQLFactorypublic SQLFactory.Ident newIdent(java.lang.String pName)
public Schema newSchema(java.lang.String pName)
SQLFactoryCreates a new Schema with the given name.
newSchema in interface SQLFactorypublic Schema newSchema(Schema.Name pName)
SQLFactoryCreates a new Schema with the given name.
newSchema in interface SQLFactorypublic Schema getDefaultSchema()
SQLFactoryReturns the Default schema. The default
schema has the name null.
getDefaultSchema in interface SQLFactorypublic Schema getSchema(java.lang.String pName)
SQLFactoryReturns the schema with the given name or null, if no such schema exists.
getSchema in interface SQLFactorypublic Schema getSchema(Schema.Name pName)
SQLFactoryReturns the schema with the given name or null, if no such schema exists.
getSchema in interface SQLFactorypublic java.util.Iterator getSchemas()
SQLFactoryReturns a list of all schemas. The list includes the default
schema, if SQLFactory.getDefaultSchema() was called at any time.
getSchemas in interface SQLFactorypublic SelectStatement newSelectStatement()
SQLFactoryCreates a new SELECT statement.
newSelectStatement in interface SQLFactorypublic InsertStatement newInsertStatement()
SQLFactoryCreates a new INSERT statement.
newInsertStatement in interface SQLFactorypublic UpdateStatement newUpdateStatement()
SQLFactoryCreates a new UPDATE statement.
newUpdateStatement in interface SQLFactorypublic DeleteStatement newDeleteStatement()
SQLFactoryCreates a new DELETE statement.
newDeleteStatement in interface SQLFactoryprotected Schema newSchemaImpl(Schema.Name pName)
protected Table newTableImpl(Schema pSchema,
Table.Name pName)
protected Column newColumnImpl(Table pTable,
Column.Name pName,
Column.Type pType)
public SQLGenerator newSQLGenerator()
SQLFactoryCreates a new SQLGenerator.
newSQLGenerator in interface SQLFactory
public Schema getSchema(java.sql.Connection pConn,
java.lang.String pName)
throws java.sql.SQLException
SQLFactoryReads the schema named pName from the database.
getSchema in interface SQLFactoryjava.sql.SQLExceptionprotected Schema makeSchema(Schema.Name pName)
protected org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable[] readTables(java.sql.DatabaseMetaData pData,
Schema.Name pSchema,
Table.Name pTable)
throws java.sql.SQLException
java.sql.SQLException
protected Column readColumn(Table pTable,
java.lang.String pColumnName,
int pDataType,
java.lang.String pTypeName,
long pColumnSize,
int pDecimalDigits,
int pNullable)
protected Table readTable(java.sql.DatabaseMetaData pData,
Schema pSchema,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable)
throws java.sql.SQLException
java.sql.SQLException
protected Index readPrimaryKey(java.sql.DatabaseMetaData pData,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable)
throws java.sql.SQLException
java.sql.SQLException
protected ForeignKey[] readForeignKeys(java.sql.DatabaseMetaData pData,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable pTable,
org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl.JDBCTable[] pTables)
throws java.sql.SQLException
java.sql.SQLException
public Schema getSchema(java.sql.Connection pConn,
Schema.Name pName)
throws java.sql.SQLException
SQLFactoryReads the schema named pName from the database.
getSchema in interface SQLFactoryjava.sql.SQLException
public Table getTable(java.sql.Connection pConnection,
Schema.Name pSchema,
Table.Name pTable)
throws java.sql.SQLException
SQLFactoryReads the table named pTable from the schema
named pSchema in the database.
getTable in interface SQLFactoryjava.sql.SQLException
public Table getTable(java.sql.Connection pConnection,
java.lang.String pSchema,
java.lang.String pTable)
throws java.sql.SQLException
SQLFactoryReads the table named pTable from the schema
named pSchema in the database.
getTable in interface SQLFactoryjava.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||