|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.mapper.rdb.generator.RdbGenInfos
This is the root class that contains all the required information for generating Java code specific to the RDB mapping. It allows the support of all elaborated mapping rules.
Field Summary | |
static CommonHelper |
commonHelper
|
boolean |
debug
|
RdbGenRef |
genId
The structure of the identifier of the related JORM object. |
java.util.Map |
genRefs
The set of references defined by the generated class. |
Logger |
logger
|
RdbGenTable |
mainTable
The reference table used in this mapping. |
RdbMapping |
mapping
The associated Mapping |
java.util.List |
readableColumns
The set of all columns used to store the generated class. |
java.util.Map |
tables
The set of names all tables used to store the generated class. |
Constructor Summary | |
RdbGenInfos()
|
Method Summary | |
boolean |
colInGenId(RdbGenColumn genCol)
Verifies if the given column is used in the identifier of this class, which is defined by genId. |
int |
getColumnPosition(RdbGenColumn irgc)
Gets the position (within [1..n] of the given column into the overall list defined into this RdbGenInfos. |
int |
getColumnPosition(RdbGenColumn irgc,
RdbGenJoin rgj)
|
java.util.List |
getConstantVisibleColumns()
|
java.lang.String |
getDeleteStatement(RdbGenJoin rgj)
|
java.lang.String |
getDeleteStatement(RdbGenTable rgt)
Constructs the string representing the SQL query used to delete the part of a JORM object stored into the given table. |
java.lang.String |
getExistStatement()
Constructs the string representing the SQL query used for testing the existence of a JORM object. |
java.lang.String |
getExtDeleteStatement(RdbGenJoin rgj)
Constructs the string representing the SQL query used to delete the part of a JORM object stored into the given table. |
java.lang.String |
getFilterExpression()
Return the filter as a string. |
Expression |
getFilterMedorExpression()
Return the filter as a medor expression. |
RdbGenRef |
getGenId()
|
java.lang.String |
getGenRefFieldName(RdbGenRef gr)
Searches the name of the field which defines the given reference. |
RdbGenRef |
getGenRefOfColumn(RdbGenColumn rgc)
Searches the RdbGenRef object, from the genRefs list, which the given column belongs to. |
RdbGenRef |
getGenRefOfColumn(RdbGenColumn rgc,
RdbGenJoin rgj)
|
java.util.Map |
getGenRefs()
|
java.lang.String |
getInsertStatement(RdbGenJoin rgj)
|
java.lang.String |
getInsertStatement(RdbGenTable rgt)
Constructs the string representing the SQL query used to insert the part of a JORM object stored into the given table. |
java.lang.String |
getPNameIteratorSelectClause()
Constructs the string representing the SQL query used to get the extent of a JORM class (the ID PName of all objects of this class). |
java.lang.String |
getPNameIteratorSelectClauseWithPrefetch()
|
java.lang.String |
getPNameIteratorWhereClause()
|
java.lang.String |
getPnFieldName(RdbGenColumn rgc)
Searches the name of the field in the composite name associated with the identifier, which is mapped to the given column. |
java.util.List |
getReadableColumns()
|
java.util.List |
getReadFromTables()
Build the data structure representing the from clause and the joins for accessing all fields of the class. |
java.lang.String |
getReadSelectFields()
|
java.lang.String |
getReadSelectFields(boolean aliasingWithPE)
Build the select clause that access all fields of the class. |
java.lang.String |
getReadSelectFieldsAsColArray()
|
int |
getReadSelectNbFields()
|
java.lang.String |
getReadWhereClause()
|
RdbGenTable |
getReferenceTable()
|
java.util.List |
getTableCompositeGenRefs(RdbGenTable rgt)
Computes the list of references (i.e., their definition) stored into this particular table. |
java.util.List |
getTableCompositeGenRefs(RdbGenTable rgt,
RdbGenJoin rgj)
|
java.util.Map |
getTables()
|
java.lang.String |
getUpdateNullStatement(RdbGenJoin rgj)
|
java.lang.String |
getUpdateNullStatement(RdbGenTable rgt)
|
java.lang.String |
getUpdateStatement(RdbGenJoin rgj)
|
java.lang.String |
getUpdateStatement(RdbGenTable rgt)
Constructs the string representing the SQL query used to update the part of a JORM object stored into the given table. |
boolean |
hasFilter()
|
java.lang.String |
setIdPnParam(java.lang.String cnfn,
int idx,
java.lang.String adapter,
java.lang.String pstmt,
boolean isSpecific)
|
java.lang.String |
setIdPNParameterOperand(java.lang.String cnfn,
boolean isSpecific)
If isSpecific is true returns a String like this: ((org.objectweb.speedo.pobjects.detach.VehicleIdPNG) _pngId).pnGetName(null) else, it returns a String like that: ((PNameGetter) _pngId).pngetStringField("name", null) |
boolean |
updatable(RdbGenColumn rgc)
|
boolean |
updatable(RdbGenColumn rgc,
RdbGenJoin rgj)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Map tables
public RdbGenTable mainTable
public java.util.List readableColumns
public RdbGenRef genId
public RdbMapping mapping
public java.util.Map genRefs
public Logger logger
public boolean debug
public static CommonHelper commonHelper
Constructor Detail |
public RdbGenInfos()
Method Detail |
public java.util.Map getTables()
public RdbGenTable getReferenceTable()
public java.util.List getReadableColumns()
public RdbGenRef getGenId()
public java.util.Map getGenRefs()
public java.util.List getTableCompositeGenRefs(RdbGenTable rgt)
rgt
- The table for which to find the reference definitions.
public java.util.List getTableCompositeGenRefs(RdbGenTable rgt, RdbGenJoin rgj)
public int getColumnPosition(RdbGenColumn irgc)
irgc
- The column for which to search the position.
public int getColumnPosition(RdbGenColumn irgc, RdbGenJoin rgj)
public java.lang.String getExistStatement()
public java.lang.String getReadSelectFields()
public java.lang.String getReadSelectFields(boolean aliasingWithPE)
public java.lang.String getReadSelectFieldsAsColArray()
public java.util.List getConstantVisibleColumns()
public int getReadSelectNbFields()
public java.util.List getReadFromTables()
public java.lang.String getReadWhereClause()
public java.lang.String getPNameIteratorSelectClause()
public java.lang.String getPNameIteratorSelectClauseWithPrefetch()
public Expression getFilterMedorExpression()
public java.lang.String getFilterExpression()
public java.lang.String getPNameIteratorWhereClause() throws ExpressionException
ExpressionException
public java.lang.String getUpdateStatement(RdbGenTable rgt) throws PException
rgt
- The description of the table to be modified.
PException
public java.lang.String getUpdateStatement(RdbGenJoin rgj) throws PException
PException
public java.lang.String getUpdateNullStatement(RdbGenTable rgt) throws PException
PException
public java.lang.String getUpdateNullStatement(RdbGenJoin rgj) throws PException
PException
public java.lang.String getInsertStatement(RdbGenTable rgt) throws PException
rgt
- The description of the table to be modified.
PException
public java.lang.String getInsertStatement(RdbGenJoin rgj)
public java.lang.String getDeleteStatement(RdbGenTable rgt) throws PException
rgt
- The description of the table to be modified.
PException
public java.lang.String getDeleteStatement(RdbGenJoin rgj) throws PException
PException
public java.lang.String getExtDeleteStatement(RdbGenJoin rgj) throws PException
rgj
- The description of the join between the external table and
the main table
PException
public java.lang.String setIdPnParam(java.lang.String cnfn, int idx, java.lang.String adapter, java.lang.String pstmt, boolean isSpecific) throws PException
PException
public java.lang.String setIdPNParameterOperand(java.lang.String cnfn, boolean isSpecific) throws PException
PException
public RdbGenRef getGenRefOfColumn(RdbGenColumn rgc)
rgc
- The column for which to find a RdbGenRef.
public RdbGenRef getGenRefOfColumn(RdbGenColumn rgc, RdbGenJoin rgj)
public boolean colInGenId(RdbGenColumn genCol)
genCol
- The column for which to verify its belonging to the ID.
public java.lang.String getGenRefFieldName(RdbGenRef gr)
gr
- The reference definition.
public java.lang.String getPnFieldName(RdbGenColumn rgc)
rgc
- The column to search.
public boolean updatable(RdbGenColumn rgc)
public boolean updatable(RdbGenColumn rgc, RdbGenJoin rgj)
public boolean hasFilter()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |