1 21 package oracle.toplink.essentials.internal.expressions; 23 24 import java.io.*; 25 import java.util.Vector ; 26 import java.util.Collection ; 27 28 import oracle.toplink.essentials.internal.helper.DatabaseTable; 29 import oracle.toplink.essentials.internal.sessions.AbstractSession; 30 31 35 public class SQLDeleteAllStatementForTempTable extends SQLModifyAllStatementForTempTable { 36 protected DatabaseTable targetTable; 37 protected Collection targetPrimaryKeyFields; 38 39 public void setTargetTable(DatabaseTable targetTable) { 40 this.targetTable = targetTable; 41 } 42 public DatabaseTable getTargetTable() { 43 return targetTable; 44 } 45 public void setTargetPrimaryKeyFields(Collection targetPrimaryKeyFields) { 46 this.targetPrimaryKeyFields = targetPrimaryKeyFields; 47 } 48 public Collection getTargetPrimaryKeyFields() { 49 return targetPrimaryKeyFields; 50 } 51 52 protected Collection getUsedFields() { 53 return new Vector (getPrimaryKeyFields()); 54 } 55 56 protected void writeUpdateOriginalTable(AbstractSession session, Writer writer) throws IOException { 57 session.getPlatform().writeDeleteFromTargetTableUsingTempTableSql(writer, getTable(), getTargetTable(), 58 new Vector (getPrimaryKeyFields()), 59 new Vector (getTargetPrimaryKeyFields())); 60 } 61 } 62 | Popular Tags |