|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMethodMapping
This interface represents the functions that both IGetterMapping and
ISetterMapping instances have in common (it is the super-interface
of both).
A method method maps a method in a class (getter or setter) to a column
name in a table in the database.
Field mappings are stored in the object mappings and used by the object reader
and object writer to determine what columns from the database to read and write.
They are also used by the SQL generator to generate the SQL to read and write
the objects.
Method Summary | |
---|---|
java.lang.String |
getColumnName()
Returns the database table column name this method method is method to. |
int |
getColumnType()
Returns the column type as defined in the database. |
java.lang.reflect.Method |
getObjectMethod()
Returns the method instance this method method is method from. |
boolean |
isPrimaryKey()
Deprecated. This method doesn't properly support compound keys. The method sends a signal about if this method mapping is a primary key mapping by itself. With the new compound key facilities a primary key may consist of more than one column. Use the public IKey IObjectMapping.getPrimaryKey() method
to access the primary key of an object mapping's table. |
boolean |
isTableMapped()
Returns true if the database column referenced by this method method exists in a table in the database. |
void |
setColumnName(java.lang.String fieldName)
Sets the database column name this method method is method to. |
void |
setColumnType(int columnType)
Sets the column type as defined in the database. |
void |
setObjectMethod(java.lang.reflect.Method member)
The method instance this method method maps from. |
void |
setPrimaryKey(boolean isPrimaryKey)
Deprecated. This method doesn't properly support compound keys. The method sends a signal about if this method mapping is a primary key mapping by itself. With the new compound key facilities a primary key may consist of more than one column. Use the public IKey IObjectMapping.getPrimaryKey() method
to access the primary key of an object mapping's table. |
void |
setTableMapped(boolean isTableMapped)
Sets whether or not the database column referenced by this method method exists in a table in the database. |
Method Detail |
---|
java.lang.String getColumnName()
void setColumnName(java.lang.String fieldName)
fieldName
- The column name to map to.int getColumnType()
void setColumnType(int columnType)
columnType
- The column type as defined in the database.java.lang.reflect.Method getObjectMethod()
Method
instance this method method is method from.void setObjectMethod(java.lang.reflect.Method member)
member
- The Method
instance this method method maps from.boolean isPrimaryKey()
public IKey IObjectMapping.getPrimaryKey()
method
to access the primary key of an object mapping's table.
void setPrimaryKey(boolean isPrimaryKey)
public IKey IObjectMapping.getPrimaryKey()
method
to access the primary key of an object mapping's table.
isPrimaryKey
- Set to true if the column referenced by this method method
is the primary key of the table it comes from.boolean isTableMapped()
"select count(*) totalCount from employees
void setTableMapped(boolean isTableMapped)
"select count(*) totalCount from employees
isTableMapped
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |