|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.is.jrf.JoinTable
Instances of this class represent a plain old inner join.
Field Summary | |
protected java.lang.String |
i_joinColumnNames
This is used to do the table join |
protected java.util.List |
i_joinColumns
List of JoinColumn objects |
protected java.util.List |
i_joinTables
List of JoinTable objects |
protected java.lang.String |
i_mainColumnNames
This is used to do the table join |
protected java.lang.String |
i_tableAlias
|
protected java.lang.String |
i_tableName
|
Constructor Summary | |
JoinTable(java.lang.String tableName,
java.lang.String mainColumnNames,
java.lang.String joinColumnNames)
Construct an instance that is ready to be used. |
Method Summary | |
void |
addJoinColumn(JoinColumn aJoinColumn)
Add a subclass instance of JoinColumn. |
void |
addJoinTable(JoinTable aJoinTable)
Add an instance of JoinTable that will be joined with this JoinTable. |
protected java.lang.String |
ansiJoinCommand()
Return something like "JOIN" or "LEFT OUTER JOIN", etc... |
java.lang.String |
buildANSIJoin(java.lang.String mainTableAlias)
Build an ANSI join statement. |
protected void |
buildFromString(java.lang.StringBuffer sqlBuffer)
Add a list of table names to the StringBuffer like this: 'Video V, Media M, Genre G' |
java.lang.String |
buildNonANSIJoin(java.lang.String mainTableAlias,
DatabasePolicy dbPolicy)
Build a non-standard join that goes into the WHERE clause. |
protected void |
buildSelectColumnString(java.lang.StringBuffer sqlBuffer)
|
protected java.lang.String |
buildWhereJoin(java.lang.String mainColumnName,
java.lang.String joinColumnName,
DatabasePolicy dbPolicy)
This method is overridden by the OuterJoinTable subclass. |
protected void |
copyColumnValuesToPersistentObject(JDBCHelper aJDBCHelper,
PersistentObject aPO)
|
java.lang.String |
getJoinColumnNames()
This should be a string of column names separated by commas if there is more than one. |
java.util.List |
getJoinColumns()
This vector holds subclass instances of JoinColumn. |
java.util.List |
getJoinTables()
This vector holds instances of JoinTable. |
java.lang.String |
getMainColumnNames()
This should be a string of column names separated by commas if there is more than one. |
java.lang.String |
getTableAlias()
|
java.lang.String |
getTableName()
|
void |
setJoinColumnNames(java.lang.String joinColumnNames)
This would be a string of comma-separated column name(s) like: "id,code" or just "id" |
void |
setMainColumnNames(java.lang.String mainColumnNames)
This would be a string of comma-separated column name(s) like: "id,code" or just "id" |
void |
setTableAlias(java.lang.String alias)
|
void |
setTableName(java.lang.String s)
If the name looks like this: 'Customer c', then put 'Customer' into the tableName variable and put 'c' into the tableAlias variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String i_tableName
protected java.lang.String i_tableAlias
protected java.lang.String i_mainColumnNames
protected java.lang.String i_joinColumnNames
protected java.util.List i_joinColumns
protected java.util.List i_joinTables
Constructor Detail |
public JoinTable(java.lang.String tableName, java.lang.String mainColumnNames, java.lang.String joinColumnNames)
tableName
- a value of type 'String' - This can include an aliasmainColumnNames
- a value of type 'String'joinColumnNames
- a value of type 'String'Method Detail |
public void addJoinColumn(JoinColumn aJoinColumn)
aJoinColumn
- a value of type 'JoinColumn'public java.util.List getJoinColumns()
public void setTableName(java.lang.String s)
s
- a value of type 'String'public java.lang.String getTableName()
public void setTableAlias(java.lang.String alias)
public java.lang.String getTableAlias()
public java.lang.String getMainColumnNames()
public void setMainColumnNames(java.lang.String mainColumnNames)
mainColumnNames
- a value of type 'String'public java.lang.String getJoinColumnNames()
public void setJoinColumnNames(java.lang.String joinColumnNames)
joinColumnNames
- a value of type 'String'public void addJoinTable(JoinTable aJoinTable)
aJoinTable
- a value of type 'JoinTable'public java.util.List getJoinTables()
public java.lang.String buildANSIJoin(java.lang.String mainTableAlias)
mainTableName
- a value of type 'String'public java.lang.String buildNonANSIJoin(java.lang.String mainTableAlias, DatabasePolicy dbPolicy)
mainTableName
- a value of type 'String'dbPolicy
- a value of type 'DatabasePolicy'protected void copyColumnValuesToPersistentObject(JDBCHelper aJDBCHelper, PersistentObject aPO) throws java.sql.SQLException
protected void buildSelectColumnString(java.lang.StringBuffer sqlBuffer)
protected void buildFromString(java.lang.StringBuffer sqlBuffer)
sqlBuffer
- a value of type 'StringBuffer'protected java.lang.String ansiJoinCommand()
protected java.lang.String buildWhereJoin(java.lang.String mainColumnName, java.lang.String joinColumnName, DatabasePolicy dbPolicy)
T1.id = T2.id(+)
(Oracle)mainColumnName
- a value of type 'String'joinColumnName
- a value of type 'String'dbPolicy
- a value of type 'DatabasePolicy'
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |