Methods Summary |
---|
public oracle.toplink.essentials.internal.databaseaccess.DatabaseCall | buildCall(oracle.toplink.essentials.internal.sessions.AbstractSession session)Append the string containing the SQL insert string for the given table.
SQLCall call = new SQLCall();
call.returnNothing();
Writer writer = new CharArrayWriter(100);
try {
if(mode == CREATE_TEMP_TABLE) {
session.getPlatform().writeCreateTempTableSql(writer, table, session,
new Vector(getPrimaryKeyFields()),
getUsedFields(),
new Vector(getAllFields()));
} else if(mode == INSERT_INTO_TEMP_TABLE) {
session.getPlatform().writeInsertIntoTableSql(writer, table, getUsedFields());
call.getParameters().addAll(selectCall.getParameters());
call.getParameterTypes().addAll(selectCall.getParameterTypes());
String selectStr = selectCall.getSQLString();
writer.write(selectStr);
} else if(mode == UPDATE_ORIGINAL_TABLE) {
writeUpdateOriginalTable(session, writer);
} else if(mode == CLEANUP_TEMP_TABLE) {
session.getPlatform().writeCleanUpTempTableSql(writer, table);
} else {
// should never happen
}
call.setSQLString(writer.toString());
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
return call;
|
public java.util.Collection | getAllFields()
return allFields;
|
public int | getMode()
return mode;
|
public java.util.Collection | getPrimaryKeyFields()
return primaryKeyFields;
|
public oracle.toplink.essentials.queryframework.SQLCall | getSelectCall()
return selectCall;
|
protected abstract java.util.Collection | getUsedFields()
|
public void | setAllFields(java.util.Collection allFields)
this.allFields = allFields;
|
public void | setMode(int mode)
this.mode = mode;
|
public void | setPrimaryKeyFields(java.util.Collection primaryKeyFields)
this.primaryKeyFields = primaryKeyFields;
|
public void | setSelectCall(oracle.toplink.essentials.queryframework.SQLCall selectCall)
this.selectCall = selectCall;
|
protected abstract void | writeUpdateOriginalTable(oracle.toplink.essentials.internal.sessions.AbstractSession session, java.io.Writer writer)
|