/** * ADVANCED: * Set the receiver's insert call. * This allows the user to override the insert operation. */ public void setInsertCall(Call call) { if (call == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setCall(call); setInsertQuery(query); }
/** * ADVANCED: * Set the receiver's insert call. * This allows the user to override the insert operation. */ public void setInsertCall(Call call) { if (call == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setCall(call); setInsertQuery(query); }
/** * ADVANCED: * Set the receiver's insert call. * This allows the user to override the insert operation. */ public void setInsertCall(Call call) { if (call == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setCall(call); setInsertQuery(query); }
/** * ADVANCED: * Set the receiver's insert SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "insert into EMPLOYEE (F_NAME, L_NAME) values (#F_NAME, #L_NAME)". */ public void setInsertSQLString(String sqlString) { if (sqlString == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setSQLString(sqlString); setInsertQuery(query); }
/** * ADVANCED: * Set the receiver's insert SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "insert into EMPLOYEE (F_NAME, L_NAME) values (#F_NAME, #L_NAME)". */ public void setInsertSQLString(String sqlString) { if (sqlString == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setSQLString(sqlString); setInsertQuery(query); }
/** * ADVANCED: * Set the receiver's insert SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "insert into EMPLOYEE (F_NAME, L_NAME) values (#F_NAME, #L_NAME)". */ public void setInsertSQLString(String sqlString) { if (sqlString == null) { return; } InsertObjectQuery query = new InsertObjectQuery(); query.setSQLString(sqlString); setInsertQuery(query); }
manager.setInsertQuery((InsertObjectQuery)getInsertQuery().clone());
manager.setInsertQuery((InsertObjectQuery)getInsertQuery().clone());
manager.setInsertQuery((InsertObjectQuery)getInsertQuery().clone());
/** * INTERNAL: * Returns clone of InsertObjectQuery from the reference descriptor, if it is not set - create it. */ protected InsertObjectQuery getInsertObjectQuery(AbstractSession session, ClassDescriptor desc) { InsertObjectQuery insertQuery = desc.getQueryManager().getInsertQuery(); if (insertQuery == null) { insertQuery = new InsertObjectQuery(); desc.getQueryManager().setInsertQuery(insertQuery); } if (insertQuery.getModifyRow() == null) { AbstractRecord modifyRow = new DatabaseRecord(); for (int i = 0; i < getTargetForeignKeyFields().size(); i++) { DatabaseField field = getTargetForeignKeyFields().elementAt(i); modifyRow.put(field, null); } desc.getObjectBuilder().buildTemplateInsertRow(session, modifyRow); getContainerPolicy().addFieldsForMapKey(modifyRow); if(this.listOrderField != null) { modifyRow.put(this.listOrderField, null); } insertQuery.setModifyRow(modifyRow); } return insertQuery; }
/** * INTERNAL: * Returns clone of InsertObjectQuery from the reference descriptor, if it is not set - create it. */ protected InsertObjectQuery getInsertObjectQuery(AbstractSession session, ClassDescriptor desc) { InsertObjectQuery insertQuery = desc.getQueryManager().getInsertQuery(); if (insertQuery == null) { insertQuery = new InsertObjectQuery(); desc.getQueryManager().setInsertQuery(insertQuery); } if (insertQuery.getModifyRow() == null) { AbstractRecord modifyRow = new DatabaseRecord(); for (int i = 0; i < getTargetForeignKeyFields().size(); i++) { DatabaseField field = getTargetForeignKeyFields().elementAt(i); modifyRow.put(field, null); } desc.getObjectBuilder().buildTemplateInsertRow(session, modifyRow); getContainerPolicy().addFieldsForMapKey(modifyRow); if(this.listOrderField != null) { modifyRow.put(this.listOrderField, null); } insertQuery.setModifyRow(modifyRow); } return insertQuery; }
queryManager.setInsertQuery(new InsertObjectQuery());
queryManager.setInsertQuery(new InsertObjectQuery());
setInsertQuery((InsertObjectQuery)parentQueryManager.getInsertQuery().clone());
setInsertQuery((InsertObjectQuery)parentQueryManager.getInsertQuery().clone());
setInsertQuery((InsertObjectQuery)parentQueryManager.getInsertQuery().clone());
setInsertQuery(new InsertObjectQuery());