/** * PUBLIC: * Create an update query with the object being updated. */ public UpdateObjectQuery(Object objectToUpdate) { this(); setObject(objectToUpdate); }
/** * INTERNAL: * Set the properties needed to be cascaded into the custom query. */ protected void prepareCustomQuery(DatabaseQuery customQuery) { UpdateObjectQuery customUpdateQuery = (UpdateObjectQuery)customQuery; customUpdateQuery.setObject(getObject()); customUpdateQuery.setObjectChangeSet(getObjectChangeSet()); customUpdateQuery.setCascadePolicy(getCascadePolicy()); customUpdateQuery.setShouldMaintainCache(shouldMaintainCache()); customUpdateQuery.setModifyRow(null); }
/** * INTERNAL: * Set the properties needed to be cascaded into the custom query. */ protected void prepareCustomQuery(DatabaseQuery customQuery) { UpdateObjectQuery customUpdateQuery = (UpdateObjectQuery)customQuery; customUpdateQuery.setObject(getObject()); customUpdateQuery.setObjectChangeSet(getObjectChangeSet()); customUpdateQuery.setCascadePolicy(getCascadePolicy()); customUpdateQuery.setShouldMaintainCache(shouldMaintainCache()); customUpdateQuery.setModifyRow(null); }
/** * PUBLIC: * Create an update query with the object being updated. */ public UpdateObjectQuery(Object objectToUpdate) { this(); setObject(objectToUpdate); }
/** * INTERNAL: * Set the properties needed to be cascaded into the custom query. */ protected void prepareCustomQuery(DatabaseQuery customQuery) { UpdateObjectQuery customUpdateQuery = (UpdateObjectQuery)customQuery; customUpdateQuery.setObject(getObject()); customUpdateQuery.setObjectChangeSet(getObjectChangeSet()); customUpdateQuery.setCascadePolicy(getCascadePolicy()); customUpdateQuery.setShouldMaintainCache(shouldMaintainCache()); customUpdateQuery.setModifyRow(null); }
/** * PUBLIC: * Create an update query with the object being updated. */ public UpdateObjectQuery(Object objectToUpdate) { this(); setObject(objectToUpdate); }
/** * PUBLIC: * Update the object and all of its privately owned parts in the database. * Update should only be used if the application knows that the object is new, * otherwise writeObject should be used. * The update operation can be customized through using an update query. * * @exception DatabaseException if an error occurs on the database, * these include constraint violations, security violations and general database errors. * @exception OptimisticLockException if the object's descriptor is using optimistic locking and * the object has been updated or deleted by another user since it was last read. * * @see UpdateObjectQuery * @see #writeObject(Object) */ public Object updateObject(Object domainObject) throws DatabaseException, OptimisticLockException { UpdateObjectQuery query = new UpdateObjectQuery(); query.setObject(domainObject); query.setIsExecutionClone(true); return executeQuery(query); }
/** * PUBLIC: * Update the object and all of its privately owned parts in the database. * Update should only be used if the application knows that the object is new, * otherwise writeObject should be used. * The update operation can be customized through using an update query. * * @exception DatabaseException if an error occurs on the database, * these include constraint violations, security violations and general database errors. * @exception OptimisticLockException if the object's descriptor is using optimistic locking and * the object has been updated or deleted by another user since it was last read. * * @see UpdateObjectQuery * @see #writeObject(Object) */ public Object updateObject(Object domainObject) throws DatabaseException, OptimisticLockException { UpdateObjectQuery query = new UpdateObjectQuery(); query.setObject(domainObject); query.setIsExecutionClone(true); return executeQuery(query); }
/** * PUBLIC: * Update the object and all of its privately owned parts in the database. * Update should only be used if the application knows that the object is new, * otherwise writeObject should be used. * The update operation can be customized through using an update query. * * @exception DatabaseException if an error occurs on the database, * these include constraint violations, security violations and general database errors. * @exception OptimisticLockException if the object's descriptor is using optimistic locking and * the object has been updated or deleted by another user since it was last read. * * @see UpdateObjectQuery * @see #writeObject(Object) */ public Object updateObject(Object domainObject) throws DatabaseException, OptimisticLockException { UpdateObjectQuery query = new UpdateObjectQuery(); query.setObject(domainObject); query.setIsExecutionClone(true); return executeQuery(query); }