|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jenkov.mrpersister.impl.mapping.DbNameDeterminerOld
public class DbNameDeterminerOld
Constructor Summary | |
---|---|
DbNameDeterminerOld()
|
Method Summary | |
---|---|
java.lang.String |
determineColumnName(java.util.Collection names,
java.lang.String tableName,
java.sql.Connection connection)
Determines which, if any, of the given possible column names in the given collection is matching a column name in the given table. |
java.lang.String |
determineTableName(java.util.Collection names,
java.sql.Connection connection)
Determines which, if any, of the given possible table names in the given collection is matching a table name in the database. |
java.lang.String |
determineTableName(java.util.Collection names,
java.lang.String databaseName,
java.sql.Connection connection)
Determines which, if any, of the given possible table names in the given collection is matching a table name in the database. |
int |
getColumnType(java.lang.String columnName,
java.lang.String tableName)
Returns the type for a given column in a given table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbNameDeterminerOld()
Method Detail |
---|
public int getColumnType(java.lang.String columnName, java.lang.String tableName)
IDbNameDeterminer
getColumnType
in interface IDbNameDeterminer
columnName
- The name of the column to get the data type for.tableName
- The name of the table where the column is defined.
public java.lang.String determineColumnName(java.util.Collection names, java.lang.String tableName, java.sql.Connection connection) throws PersistenceException
IDbNameDeterminer
determineColumnName
in interface IDbNameDeterminer
names
- The collection of possible column names.tableName
- The name of the database table to check for column matches in.connection
- The connection to the database to determine column name in.
PersistenceException
- If anything goes wrong during the name determining, or if
more than one of the possible column names matches a column in the
table.public java.lang.String determineTableName(java.util.Collection names, java.sql.Connection connection) throws PersistenceException
IDbNameDeterminer
PersistenceException
is thrown. If more than one of the possible table names matches a
table in the database a PersistenceException is also thrown.
determineTableName
in interface IDbNameDeterminer
names
- The collection of possible table names.connection
- The connection to the database to determine table name in.
PersistenceException
- If anything goes wrong during the name determining, or if
none or more than one of the possible table names matches a table in the
database.public java.lang.String determineTableName(java.util.Collection names, java.lang.String databaseName, java.sql.Connection connection) throws PersistenceException
IDbNameDeterminer
PersistenceException
is thrown. If more than one of the possible table names matches a
table in the database a PersistenceException is also thrown.
determineTableName
in interface IDbNameDeterminer
names
- The collection of possible table names.databaseName
- The name of the database. Set to null if not known. The database name is usually
implicitly referenced in the database connection, so you most often won't need to
set this parameter to anything but null.connection
- The connection to the database to determine table name in.
PersistenceException
- If anything goes wrong during the name determining, or if
none or more than one of the possible table names matches a table in the
database.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |