|
SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface which allows the creation of SQL dynamically, in a database agnostic fashion.
| Method Summary | |
boolean |
booleanFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
booleanToSQL(boolean val)
Convert data into SQL for the current database platform. |
byte |
byteFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
byteToSQL(byte val)
Convert data into SQL for the current database platform. |
char |
charFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
charToSQL(char val)
Convert data into SQL for the current database platform. |
double |
doubleFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
doubleToSQL(double val)
Convert data into SQL for the current database platform. |
float |
floatFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
floatToSQL(float val)
Convert data into SQL for the current database platform. |
Object |
fromSQL(int type,
ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
String[] |
getAddColumnSQL(Column column)
Return a series of SQL statements to add the given column to its table, including the addition of any indexes on the column. |
Class[] |
getClassMappingCandidateClasses()
Returns a list of possible ClassMapping classes for
use with this DBDictionary. |
ResultSet |
getColumns(String tableName,
Connection conn)
Return a ResultSet with all the column names in the given table. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, including any indexes it has. |
DBMetaData |
getDBMetaData()
Get the DBMetaData for this dictionary. |
String[] |
getDropColumnSQL(Column column)
Return a series of SQL statements to drop the given column from its table, including the deletion of any indices from the column. |
String[] |
getDropTableSQL(Table table)
Return a series of SQL statements to drop the given table, including any indexes it may have. |
Class[] |
getFieldMappingCandidateClasses()
Returns a list of possible FieldMapping classes for
use with this DBDictionary. |
String |
getPlatform()
Return the name of the platform for the DB type handled; for example, Oracle |
ResultSet |
getTables(Connection conn)
Return a ResultSet with all the tables in the database. |
String |
getValidColumnName(String name)
Make any necessary changes to the given column name to make it valid for the current DB. |
String |
getValidIndexName(String name)
Make any necessary changes to the given index name to make it valid for the current DB. |
String |
getValidTableName(String name)
Make any necessary changes to the given table name to make it valid for the current DB. |
int |
intFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
intToSQL(int val)
Convert data into SQL for the current database platform. |
long |
longFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
longToSQL(long val)
Convert data into SQL for the current database platform. |
void |
setDBMetaData(DBMetaData meta)
Set the DBMetaData for this dictionary. |
short |
shortFromSQL(ResultSet rs,
int column)
Convert the specified column of the SQL ResultSet to the proper java type. |
Object |
shortToSQL(short val)
Convert data into SQL for the current database platform. |
void |
toPreparedParameter(int type,
PreparedStatement st,
int i,
Object val)
Set val as the i'th (base 1) element
in st. |
String |
toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
Create a SELECT statement for this databse from the given parts. |
Object |
toSQL(int type,
Object obj)
Convert data into SQL for the current database platform. |
| Method Detail |
public DBMetaData getDBMetaData()
public void setDBMetaData(DBMetaData meta)
public String getPlatform()
public Object toSQL(int type,
Object obj)
SQLTypes.public Object booleanToSQL(boolean val)
public Object byteToSQL(byte val)
public Object charToSQL(char val)
public Object doubleToSQL(double val)
public Object floatToSQL(float val)
public Object intToSQL(int val)
public Object longToSQL(long val)
public Object shortToSQL(short val)
public Object fromSQL(int type,
ResultSet rs,
int column)
throws SQLException
SQLTypes.
public boolean booleanFromSQL(ResultSet rs,
int column)
throws SQLException
public byte byteFromSQL(ResultSet rs,
int column)
throws SQLException
public char charFromSQL(ResultSet rs,
int column)
throws SQLException
public double doubleFromSQL(ResultSet rs,
int column)
throws SQLException
public float floatFromSQL(ResultSet rs,
int column)
throws SQLException
public int intFromSQL(ResultSet rs,
int column)
throws SQLException
public long longFromSQL(ResultSet rs,
int column)
throws SQLException
public short shortFromSQL(ResultSet rs,
int column)
throws SQLException
public void toPreparedParameter(int type,
PreparedStatement st,
int i,
Object val)
throws SQLException
val as the i'th (base 1) element
in st. The given type will be from SQLTypes.
public String toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
cols - list of values the columns to selecttables - list of the tables to select fromwhere - the WHERE conditions; may be null if noneorder - the ORDER BY conditions; may be null if nonedistinct - if true, this should be a SELECT DISTINCT-equivalent
queryupdate - if true this should be a SELECT FOR
UPDATE-equivalent querypublic String getValidTableName(String name)
public String getValidColumnName(String name)
public String getValidIndexName(String name)
public String[] getCreateTableSQL(Table table)
public String[] getDropTableSQL(Table table)
public String[] getAddColumnSQL(Column column)
public String[] getDropColumnSQL(Column column)
public ResultSet getTables(Connection conn)
throws SQLException
public ResultSet getColumns(String tableName,
Connection conn)
throws SQLException
public Class[] getClassMappingCandidateClasses()
ClassMapping classes for
use with this DBDictionary.public Class[] getFieldMappingCandidateClasses()
FieldMapping classes for
use with this DBDictionary.
|
SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||