|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDbPrimaryKeyDeterminer
This interface represents the functions of the database primary key determiners used in Mr. Persister.
The responsibility of the database primary key determiner is to determine what column in the table is
the primary key. This information is stored in the coresponding object method along with the
table name, and is used by both the object reader and object writer for functions like
read-by-primary-key, insert, updateBatch, delete and delete-by-primary-key.
As of now the database primary key determiner can only determine single column primary keys, and not
primary keys consisting of several columns.
The database primary key determiner is used internally in the object mapper.
Method Summary | |
---|---|
java.lang.String |
getPrimaryKeyColumnName(java.lang.String table,
java.lang.String databaseName,
java.sql.Connection connection)
Deprecated. Use the getPrimaryKeyColumns instead |
IKey |
getPrimaryKeyMapping(java.lang.String table,
java.lang.String databaseName,
java.sql.Connection connection)
Returns a list of the columns that are part of the |
Method Detail |
---|
java.lang.String getPrimaryKeyColumnName(java.lang.String table, java.lang.String databaseName, java.sql.Connection connection) throws PersistenceException
getPrimaryKeyColumns
instead
table
- The name of the table to determine the primary key column name of.databaseName
- The name of the database. Set this to null in most cases. See above description.connection
- The connection to the database in which the table exists to determine primary
key column for.
PersistenceException
- If anything goes wrong during primary key column name determining.IKey getPrimaryKeyMapping(java.lang.String table, java.lang.String databaseName, java.sql.Connection connection) throws PersistenceException
table
- databaseName
- connection
-
PersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |