/** * PUBLIC: * Answers if the query lock mode is known to be LOCK or LOCK_NOWAIT. * * In the case of DEFAULT_LOCK_MODE and the query reference class being a CMP entity bean, * at execution time LOCK, LOCK_NOWAIT, or NO_LOCK will be decided. * <p> * If a single joined attribute was configured for pessimistic locking then * this will return true (after first execution) as the SQL contained a * FOR UPDATE OF clause. */ public boolean isLockQuery() { return (this.lockingClause != null) && (getLockMode() > NO_LOCK); }
/** * PUBLIC: * Answers if the query lock mode is known to be LOCK or LOCK_NOWAIT. * * In the case of DEFAULT_LOCK_MODE and the query reference class being a CMP entity bean, * at execution time LOCK, LOCK_NOWAIT, or NO_LOCK will be decided. * <p> * If a single joined attribute was configured for pessimistic locking then * this will return true (after first execution) as the SQL contained a * FOR UPDATE OF clause. */ public boolean isLockQuery() { return (this.lockingClause != null) && (getLockMode() > NO_LOCK); }
/** * PUBLIC: * Answers if the query lock mode is known to be LOCK or LOCK_NOWAIT. * * In the case of DEFAULT_LOCK_MODE and the query reference class being a CMP entity bean, * at execution time LOCK, LOCK_NOWAIT, or NO_LOCK will be decided. * <p> * If a single joined attribute was configured for pessimistic locking then * this will return true (after first execution) as the SQL contained a * FOR UPDATE OF clause. */ public boolean isLockQuery() { return (this.lockingClause != null) && (getLockMode() > NO_LOCK); }
} else if ((getLockMode() == NO_LOCK) && (!descriptor.hasPessimisticLockingPolicy())) { setWasDefaultLockMode(true);
if (readQuery.getLockMode() != ObjectLevelReadQuery.DEFAULT_LOCK_MODE) { String lockMode = null; if (readQuery.getLockMode() == ObjectLevelReadQuery.NO_LOCK && !readQuery.isReportQuery()) { lockMode = "ObjectLevelReadQuery.NO_LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK) { lockMode = "ObjectLevelReadQuery.LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK_NOWAIT) { lockMode = "ObjectLevelReadQuery.LOCK_NOWAIT";
if (readQuery.getLockMode() != ObjectLevelReadQuery.DEFAULT_LOCK_MODE) { String lockMode = null; if (readQuery.getLockMode() == ObjectLevelReadQuery.NO_LOCK && !readQuery.isReportQuery()) { lockMode = "ObjectLevelReadQuery.NO_LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK) { lockMode = "ObjectLevelReadQuery.LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK_NOWAIT) { lockMode = "ObjectLevelReadQuery.LOCK_NOWAIT";
if (readQuery.getLockMode() != ObjectLevelReadQuery.DEFAULT_LOCK_MODE) { String lockMode = null; if (readQuery.getLockMode() == ObjectLevelReadQuery.NO_LOCK && !readQuery.isReportQuery()) { lockMode = "ObjectLevelReadQuery.NO_LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK) { lockMode = "ObjectLevelReadQuery.LOCK"; } else if (readQuery.getLockMode() == ObjectLevelReadQuery.LOCK_NOWAIT) { lockMode = "ObjectLevelReadQuery.LOCK_NOWAIT";
} else if ((getLockMode() <= NO_LOCK) && (!descriptor.hasPessimisticLockingPolicy())) { setWasDefaultLockMode(true);
} else if ((getLockMode() <= NO_LOCK) && (!descriptor.hasPessimisticLockingPolicy())) { setWasDefaultLockMode(true);