public DataModifyQuery(Call call) { this(); setCall(call); }
public DataModifyQuery(Call call) { this(); setCall(call); }
public DataModifyQuery(Call call) { this(); setCall(call); }
/** * PUBLIC: * Set the receiver's insert Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to insert an entry into the M-M join table. * Example, 'new SQLCall("insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)")'. */ public void setInsertCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's delete Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to delete a single entry from the M-M join table. * Example, 'new SQLCall("delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID")'. */ public void setDeleteCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's delete Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to delete a single entry from the M-M join table. * Example, 'new SQLCall("delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID")'. */ public void setDeleteCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's insert Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to insert an entry into the M-M join table. * Example, 'new SQLCall("insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)")'. */ public void setInsertCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's delete all call. This allows the user to override the SQL * generated by TopLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This call is responsible for doing the deletion required by the mapping, * such as deletion of all the rows from join table for M-M, or optimized delete all of target objects for 1-M. * Example, 'new SQLCall("delete from PROJ_EMP where EMP_ID = #EMP_ID")'. */ public void setDeleteAllCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteAllQuery(query); }
/** * PUBLIC: * Set the receiver's insert Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to insert an entry into the M-M join table. * Example, 'new SQLCall("insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)")'. */ public void setInsertCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's delete Call. This allows the user to override the SQL * generated by TOPLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This is used to delete a single entry from the M-M join table. * Example, 'new SQLCall("delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID")'. */ public void setDeleteCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's delete all call. This allows the user to override the SQL * generated by TopLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This call is responsible for doing the deletion required by the mapping, * such as deletion of all the rows from join table for M-M, or optimized delete all of target objects for 1-M. * Example, 'new SQLCall("delete from PROJ_EMP where EMP_ID = #EMP_ID")'. */ public void setDeleteAllCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteAllQuery(query); }
/** * PUBLIC: * Set the receiver's delete all call. This allows the user to override the SQL * generated by TopLink, with there own SQL or procedure call. The arguments are * translated from the fields of the source row. * This call is responsible for doing the deletion required by the mapping, * such as deletion of all the rows from join table for M-M, or optimized delete all of target objects for 1-M. * Example, 'new SQLCall("delete from PROJ_EMP where EMP_ID = #EMP_ID")'. */ public void setDeleteAllCall(Call call) { DataModifyQuery query = new DataModifyQuery(); query.setCall(call); setCustomDeleteAllQuery(query); }
/** * PUBLIC: * Execute the call on the database. * The row count is returned. * The call can be a stored procedure call, SQL call or other type of call. * <p>Example: * <p>session.executeNonSelectingCall(new SQLCall("Delete from Employee"); * * @see #executeSelectingCall(Call) */ public int executeNonSelectingCall(Call call) throws DatabaseException { DataModifyQuery query = new DataModifyQuery(); query.setIsExecutionClone(true); query.setCall(call); Integer value = (Integer)executeQuery(query); if (value == null) { return 0; } else { return value.intValue(); } }
/** * PUBLIC: * Execute the call on the database. * The row count is returned. * The call can be a stored procedure call, SQL call or other type of call. * <p>Example: * <p>session.executeNonSelectingCall(new SQLCall("Delete from Employee"); * * @see #executeSelectingCall(Call) */ public int executeNonSelectingCall(Call call) throws DatabaseException { DataModifyQuery query = new DataModifyQuery(); query.setIsExecutionClone(true); query.setCall(call); Integer value = (Integer)executeQuery(query); if (value == null) { return 0; } else { return value.intValue(); } }
/** * PUBLIC: * Execute the call on the database. * The row count is returned. * The call can be a stored procedure call, SQL call or other type of call. * <p>Example: * <p>session.executeNonSelectingCall(new SQLCall("Delete from Employee"); * * @see #executeSelectingCall(Call) */ @Override public int executeNonSelectingCall(Call call) throws DatabaseException { DataModifyQuery query = new DataModifyQuery(); query.setIsExecutionClone(true); query.setCall(call); Integer value = (Integer)executeQuery(query); if (value == null) { return 0; } else { return value.intValue(); } }
/** * INTERNAL: * Execute the call on the database. Calling this method will bypass a * global setting to disallow native SQL queries. (set by default when * one Entity is marked as multitenant) * * The row count is returned. * * The call can be a stored procedure call, SQL call or other type of call. * * <p>Example: * <p>session.executeNonSelectingCall(new SQLCall("Delete from Employee"), true); * * @see #priviledgedExecuteSelectingCall(Call) */ public int priviledgedExecuteNonSelectingCall(Call call) throws DatabaseException { DataModifyQuery query = new DataModifyQuery(); query.setAllowNativeSQLQuery(true); query.setIsExecutionClone(true); query.setCall(call); Integer value = (Integer)executeQuery(query); if (value == null) { return 0; } else { return value.intValue(); } }
/** * INTERNAL: * Execute the call on the database. Calling this method will bypass a * global setting to disallow native SQL queries. (set by default when * one Entity is marked as multitenant) * * The row count is returned. * * The call can be a stored procedure call, SQL call or other type of call. * * <p>Example: * <p>session.executeNonSelectingCall(new SQLCall("Delete from Employee"), true); * * @see #priviledgedExecuteSelectingCall(Call) */ public int priviledgedExecuteNonSelectingCall(Call call) throws DatabaseException { DataModifyQuery query = new DataModifyQuery(); query.setAllowNativeSQLQuery(true); query.setIsExecutionClone(true); query.setCall(call); Integer value = (Integer)executeQuery(query); if (value == null) { return 0; } else { return value.intValue(); } }
/** * Support sequencing through sequence file. */ @Override protected DataModifyQuery buildUpdateQuery() { DataModifyQuery query = new DataModifyQuery(); query.addArgument("sequence-name"); query.addArgument("sequence-count"); XQueryInteraction interaction = new XQueryInteraction(); interaction.setFunctionName("update-sequence"); interaction.setProperty("fileName", "sequence.xml"); interaction.setXQueryString("sequence[sequence-name='#sequence-name']"); interaction.setInputRootElementName("sequence"); interaction.addArgument("sequence-name"); interaction.addArgument("sequence-count"); interaction.setOutputResultPath("result"); query.setCall(interaction); return query; } }
/** * Support sequencing through sequence file. */ protected DataModifyQuery buildUpdateQuery() { DataModifyQuery query = new DataModifyQuery(); query.addArgument("sequence-name"); query.addArgument("sequence-count"); XQueryInteraction interaction = new XQueryInteraction(); interaction.setFunctionName("update-sequence"); interaction.setProperty("fileName", "sequence.xml"); interaction.setXQueryString("sequence[sequence-name='#sequence-name']"); interaction.setInputRootElementName("sequence"); interaction.addArgument("sequence-name"); interaction.addArgument("sequence-count"); interaction.setOutputResultPath("result"); query.setCall(interaction); return query; } }