Methods Summary |
---|
public void | addCondition(java.lang.String alias, java.lang.String[] columns, java.lang.String condition)
for ( int i=0; i<columns.length; i++ ) {
afterWhere.append(" and ")
.append(alias)
.append('.")
.append( columns[i] )
.append(condition);
}
|
public void | addCondition(java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns)
throw new UnsupportedOperationException();
|
public boolean | addCondition(java.lang.String condition)
return addCondition(afterWhere, condition);
|
public void | addCrossJoin(java.lang.String tableName, java.lang.String alias)
afterFrom.append(", ")
.append(tableName)
.append(' ")
.append(alias);
|
public void | addFromFragmentString(java.lang.String fromFragmentString)
afterFrom.append(fromFragmentString);
|
public void | addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, int joinType)
addCrossJoin(tableName, alias);
for ( int j=0; j<fkColumns.length; j++) {
//full joins are not supported.. yet!
if (joinType==JoinFragment.FULL_JOIN ) throw new UnsupportedOperationException();
afterWhere.append(" and ")
.append( fkColumns[j] )
.append( " " );
if (joinType==LEFT_OUTER_JOIN ) afterWhere.append("*");
afterWhere.append('=");
if (joinType==RIGHT_OUTER_JOIN ) afterWhere.append("*");
afterWhere.append (" ")
.append(alias)
.append('.")
.append( pkColumns[j] );
}
|
public void | addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, int joinType, java.lang.String on)
addJoin(tableName, alias, fkColumns, pkColumns, joinType);
addCondition(on);
|
public void | addJoins(java.lang.String fromFragment, java.lang.String whereFragment)
afterFrom.append(fromFragment);
afterWhere.append(whereFragment);
|
public JoinFragment | copy()
Sybase11JoinFragment copy = new Sybase11JoinFragment();
copy.afterFrom = new StringBuffer( afterFrom.toString() );
copy.afterWhere = new StringBuffer( afterWhere.toString() );
return copy;
|
public java.lang.String | toFromFragmentString()
return afterFrom.toString();
|
public java.lang.String | toWhereFragmentString()
return afterWhere.toString();
|