|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.mapper.rdb.generator.RdbGenColumn
This class contains all required information related to a column to which some field of a JORM class is mapped.
Field Summary | |
boolean |
columnInPK
Tells if this column belongs to the table primary key. |
java.lang.String |
columnName
The name of the RDB column. |
boolean |
columnNotNull
Tells if this column may store null values. |
int |
columnScale
|
int |
columnSize
The size of the RDB column in case of string, serialized, [byte|char]array... |
java.lang.String |
columnSqlType
the sql type of the column. |
PType |
columnType
The JORM type associated with this mapped field. |
java.lang.String |
constant
Contains the constant as a String in the case is this field is a constant field, otherwise (not a constant field) null. |
java.lang.String |
fieldName
The name of the field that is mapped to this column. |
boolean |
hiddenField
Tells is this field is an hidden one. |
RdbGenColumn |
joinCol
references a column in the main table in case of this column participates in the join with the main table. |
java.util.List |
joins
contains the association between a RdbGenJoin and a primitive element. |
java.util.List |
pes
|
RdbGenTable |
table
The table descrption which this column belongs to. |
Constructor Summary | |
RdbGenColumn()
|
Method Summary | |
boolean |
columnInPK()
|
boolean |
equals(RdbGenColumn rgc)
|
java.lang.String |
getAccessorValue(RdbGenInfos genInfos,
boolean isSpecific)
|
java.lang.String |
getAccessorValue(RdbGenInfos genInfos,
boolean isSpecific,
RdbGenJoin rgj)
|
java.lang.String |
getAdapterGet(PType type)
|
java.lang.String |
getAdapterSet(PType type)
|
java.lang.String |
getColumnInPK()
|
java.lang.String |
getColumnName()
|
java.lang.String |
getColumnName(java.lang.String tableSuffix)
|
java.lang.String |
getColumnNotNull()
|
java.lang.String |
getColumnSqlType()
|
PType |
getColumnType()
|
java.lang.String |
getConstant()
|
java.lang.String |
getFieldName()
|
java.lang.String |
getFieldName(RdbGenJoin rgj)
|
RdbGenColumn |
getJoinCol()
|
java.util.List |
getJoins()
|
java.lang.String |
getNullValue()
|
java.lang.String |
getRefValue(RdbGenInfos genInfos,
boolean isSpecific)
|
java.lang.String |
getRefValue(RdbGenInfos genInfos,
boolean isSpecific,
RdbGenJoin rgj)
|
java.lang.String |
getSqlGet(java.lang.String adapter,
java.lang.String resultset,
java.lang.String pos,
java.lang.String nullValue)
Constructs the string that defines the way to access to the relevant result part into a particular ResultSet. |
java.lang.String |
getSqlSet(java.lang.String adapter,
java.lang.String pstmt,
java.lang.String value,
int pos)
Constructs the string that defines the way to assign to the relevant query parameter into a particular prepared statement through the adapter. |
java.lang.String |
getSqlType(java.lang.String adapter)
Gets the SQL type associated with this column into the database for which we define the mapping. |
java.lang.String |
getSqlTypeCode(PType pt)
|
RdbGenTable |
getTable()
|
boolean |
isColumnInPK()
|
boolean |
isColumnNotNull()
|
boolean |
isHiddenField()
|
boolean |
isInJoin(RdbGenJoin rgj)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String fieldName
public boolean hiddenField
public java.lang.String constant
public java.lang.String columnName
public int columnSize
public int columnScale
public PType columnType
public boolean columnNotNull
public boolean columnInPK
public RdbGenTable table
public java.lang.String columnSqlType
public RdbGenColumn joinCol
public java.util.List joins
public java.util.List pes
Constructor Detail |
public RdbGenColumn()
Method Detail |
public RdbGenColumn getJoinCol()
public java.lang.String getColumnSqlType()
public java.lang.String getFieldName()
public java.lang.String getFieldName(RdbGenJoin rgj) throws PException
PException
public java.lang.String getConstant()
public java.util.List getJoins()
public boolean isHiddenField()
public java.lang.String getColumnName()
public PType getColumnType()
public boolean isColumnNotNull()
public boolean isColumnInPK()
public RdbGenTable getTable()
public java.lang.String getColumnNotNull()
public java.lang.String getColumnInPK()
public boolean columnInPK()
public java.lang.String getSqlType(java.lang.String adapter) throws PException
PException
public java.lang.String getSqlGet(java.lang.String adapter, java.lang.String resultset, java.lang.String pos, java.lang.String nullValue) throws PException
adapter
- The name of the RdbAdaptervariable used to set the
given query parameter.resultset
- The name of the ResultSet variable used to get the query
result.pos
- The position of the result to get.
PException
- example: "adapter.getBoolean(pstmt, 4);
example: "adapter.getDate(pstmt, 4, "TIME");public java.lang.String getNullValue()
public java.lang.String getSqlSet(java.lang.String adapter, java.lang.String pstmt, java.lang.String value, int pos) throws PException
adapter
- The name of the RdbAdaptervariable used to set the
given query parameter.pstmt
- The name of the PreparedStatement variable used to set the
given query parameter.pos
- The position of the query parameter to be assigned.value
- is the String value which must be assigned into the
prepared statment.
PException
- example: "adapter.setBoolean(pstmt, 4, true);
example: "adapter.setDate(pstmt, 4, ((java.util.Date) fieldVal), "TIME");public java.lang.String getAdapterGet(PType type)
public java.lang.String getAdapterSet(PType type)
public java.lang.String getSqlTypeCode(PType pt) throws PException
PException
public java.lang.String getAccessorValue(RdbGenInfos genInfos, boolean isSpecific) throws java.lang.Exception
java.lang.Exception
public java.lang.String getAccessorValue(RdbGenInfos genInfos, boolean isSpecific, RdbGenJoin rgj) throws java.lang.Exception
java.lang.Exception
public java.lang.String getRefValue(RdbGenInfos genInfos, boolean isSpecific) throws java.lang.Exception
java.lang.Exception
public java.lang.String getRefValue(RdbGenInfos genInfos, boolean isSpecific, RdbGenJoin rgj) throws java.lang.Exception
java.lang.Exception
public java.lang.String getColumnName(java.lang.String tableSuffix)
public boolean isInJoin(RdbGenJoin rgj)
public boolean equals(RdbGenColumn rgc)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |