|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.jdbcpersistence.JDBCMap
public final class JDBCMap
The JDBCMap class associates ('maps') a bean with a table and JDBCPersistor.
Example:
JDBCMap jdbcMap = jdbcPersistence.registerPersistent(FooBean.class, "FOO_TABLE", null);
jdbcMap.map("id", "ID");
jdbcMap.map("name", "NAME");
jdbcMap.map("description", "DESCRIPTION");
JDBCPersistence.registerPersistent(Class,String,Class),
JDBCMap.Column| Nested Class Summary | |
|---|---|
class |
JDBCMap.Column
Class JDBCMap.Column is used to configure and hold mapping information for a database column. |
| Method Summary | |
|---|---|
JDBCMap.Column |
getColumn(java.lang.String columnName)
Returns JDBCMap.Column object mapped to the supplied in the argument columnName |
JDBCMap.Column[] |
getColumns()
Retuns an unordered array of all columns mapped into this instance of JDBCMap |
JDBCMap.Column[] |
getIdentifyingColumns()
Returns an unordered array of identifying columns mapped into this instance of JDBCMap |
java.lang.Class |
getJdbcPersistorClass()
Returns Class responsible for persistence of an associated bean |
java.lang.Class |
getMappedClass()
Returns Class |
JDBCMap.Column[] |
getRegularColumns()
Returns an unordered array of unidentifying columns mapped into this instance of JDBCMap |
java.lang.String |
getSchema()
Returns the name of the underlying schema |
java.lang.String |
getTableName()
Returns name of the associated table |
JDBCMap.Column |
getVersionControlColumn()
Returns JDBCMap.Column that performs function of tracking version information |
JDBCMap.Column |
map(java.lang.String beanProperty,
java.lang.String column)
The method maps a column in the database to a property of a bean. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getSchema()
public JDBCMap.Column getColumn(java.lang.String columnName)
JDBCMap.Column object mapped to the supplied in the argument columnName
columnName -
public JDBCMap.Column map(java.lang.String beanProperty,
java.lang.String column)
set, get and is
to handle all properties with the exception of properties that map to Clob and Blob typed
fields. The convention for Lobs is to use write method for a getter and read method for a setter a.k.a. when the bean
sets the property it reads value from Lob's Reader vs. when the bean handles outputting the value to the Writer it writes it to a Lob's Writer.
beanProperty - is a java.lang.String representing the name of a property of a bean, the value is case sensetive.column - is a java.lang.String representing the name of the column in the database. The value is case
sensetive.
org.jdbcpersistence.JDBCMap.Column that holds information on the mapped column and property of a bean.public JDBCMap.Column[] getRegularColumns()
this instance of JDBCMap
JDBCMap.Columnpublic JDBCMap.Column[] getColumns()
this instance of JDBCMap
JDBCMap.Columnpublic JDBCMap.Column[] getIdentifyingColumns()
this instance of JDBCMap
JDBCMap.Columnpublic JDBCMap.Column getVersionControlColumn()
JDBCMap.Column that performs function of tracking version information
JDBCMap.Columnpublic final java.lang.Class getMappedClass()
Class of the associated bean, abstract class or an interface
- Returns:
- mapped class
public java.lang.Class getJdbcPersistorClass()
Class responsible for persistence of an associated bean
public java.lang.String getTableName()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||