/** * INTERNAL: * Returns the fields that should be compared in the where clause. * In this case, it is all the fields, except for the primary key * and class indicator. */ @Override protected List<DatabaseField> getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { return getAllNonPrimaryKeyFields(table); } }
/** * PUBLIC: * Set the locking policy an all fields locking policy. * A field locking policy is base on locking on all fields by comparing with their previous values to detect field-level collisions. * Note: the unit of work must be used for all updates when using field locking. * @see AllFieldsLockingPolicy */ public void useAllFieldsLocking() { setOptimisticLockingPolicy(new AllFieldsLockingPolicy()); }
/** * INTERNAL: * Values to be included in the locking mechanism are added * to the translation row. Set the translation row to all the original field values. */ @Override public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) { verifyUsage(query.getSession()); query.setTranslationRow(descriptor.getObjectBuilder().buildRowForWhereClause(query)); }
/** * PUBLIC: * Set the locking policy an all fields locking policy. * A field locking policy is base on locking on all fields by comparing with their previous values to detect field-level collisions. * Note: the unit of work must be used for all updates when using field locking. * @see AllFieldsLockingPolicy */ public void useAllFieldsLocking() { setOptimisticLockingPolicy(new AllFieldsLockingPolicy()); }
/** * INTERNAL: * Values to be included in the locking mechanism are added * to the translation row. Set the translation row to all the original field values. */ @Override public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) { verifyUsage(query.getSession()); query.setTranslationRow(descriptor.getObjectBuilder().buildRowForWhereClause(query)); }
/** * PUBLIC: * Set the locking policy an all fields locking policy. * A field locking policy is base on locking on all fields by comparing with their previous values to detect field-level collisions. * Note: the unit of work must be used for all updates when using field locking. * @see AllFieldsLockingPolicy */ public void useAllFieldsLocking() { setOptimisticLockingPolicy(new AllFieldsLockingPolicy()); }
/** * INTERNAL: * Values to be included in the locking mechanism are added * to the translation row. Set the translation row to all the original field values. */ public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) { verifyUsage(query.getSession()); query.setTranslationRow(descriptor.getObjectBuilder().buildRowForWhereClause(query)); }
/** * INTERNAL: * Returns the fields that should be compared in the where clause. * In this case, it is all the fields, except for the primary key * and class indicator. */ @Override protected List<DatabaseField> getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { return getAllNonPrimaryKeyFields(table); } }
descriptor.setOptimisticLockingPolicy(new AllFieldsLockingPolicy()); } else if (m_type.equals(OptimisticLockingType.CHANGED_COLUMNS.name())) { descriptor.setOptimisticLockingPolicy(new ChangedFieldsLockingPolicy());
/** * INTERNAL: * Returns the fields that should be compared in the where clause. * In this case, it is all the fields, except for the primary key * and class indicator. */ protected Vector getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { return getAllNonPrimaryKeyFields(table); } }