1 21 package oracle.toplink.essentials.internal.expressions; 23 24 import java.util.*; 25 import oracle.toplink.essentials.internal.helper.*; 26 import oracle.toplink.essentials.internal.databaseaccess.DatabaseCall; 27 import oracle.toplink.essentials.queryframework.SQLCall; 28 import oracle.toplink.essentials.internal.sessions.AbstractRecord; 29 import oracle.toplink.essentials.internal.sessions.AbstractSession; 30 31 40 public abstract class SQLModifyStatement extends SQLStatement { 41 protected DatabaseTable table; 42 protected AbstractRecord modifyRow; 43 protected Vector returnFields; 44 45 public AbstractRecord getModifyRow() { 46 return modifyRow; 47 } 48 49 public Vector getReturnFields() { 50 return returnFields; 51 } 52 53 public DatabaseTable getTable() { 54 return table; 55 } 56 57 public void setModifyRow(AbstractRecord row) { 58 modifyRow = row; 59 } 60 61 public void setReturnFields(Vector fields) { 62 returnFields = fields; 63 } 64 65 public void setTable(DatabaseTable table) { 66 this.table = table; 67 } 68 69 public DatabaseCall buildCall(AbstractSession session) { 70 SQLCall sqlCall = buildCallWithoutReturning(session); 71 if ((getReturnFields() == null) || getReturnFields().isEmpty()) { 72 return sqlCall; 73 } else { 74 return session.getPlatform().buildCallWithReturning(sqlCall, getReturnFields()); 75 } 76 } 77 78 protected SQLCall buildCallWithoutReturning(AbstractSession session) { 79 return null; 80 } 81 } 82 | Popular Tags |