/** * PUBLIC: Return the current locking mode. */ public short getLockMode() { if (lockingClause == null) { return DEFAULT_LOCK_MODE; } else { return lockingClause.getLockMode(); } }
/** * PUBLIC: Return the current locking mode. */ public short getLockMode() { if (lockingClause == null) { return DEFAULT_LOCK_MODE; } else { return lockingClause.getLockMode(); } }
/** * PUBLIC: * Return the current locking mode. */ public short getLockMode() { if (lockingClause == null) { return DEFAULT_LOCK_MODE; } else { return lockingClause.getLockMode(); } }
/** * PUBLIC: * Return the current locking mode. */ public short getLockMode() { if (lockingClause == null) { return DEFAULT_LOCK_MODE; } else { return lockingClause.getLockMode(); } }
/** * INTERNAL: * The locking clause contains a list of expressions representing which * objects are to be locked by the query. * <p> * Use for even finer grained control over what is and is not locked by * a particular query. */ public void setLockingClause(ForUpdateClause clause) { if (clause.isForUpdateOfClause()) { this.lockingClause = clause; setIsPrePrepared(false); } else { setLockMode(clause.getLockMode()); } setWasDefaultLockMode(false); }
/** * INTERNAL: * The locking clause contains a list of expressions representing which * objects are to be locked by the query. * <p> * Use for even finer grained control over what is and is not locked by * a particular query. */ public void setLockingClause(ForUpdateClause clause) { if (clause.isForUpdateOfClause()) { this.lockingClause = clause; setIsPrePrepared(false); } else { setLockMode(clause.getLockMode()); } setWasDefaultLockMode(false); }
/** * INTERNAL: * The locking clause contains a list of expressions representing which * objects are to be locked by the query. * <p> * Use for even finer grained control over what is and is not locked by * a particular query. */ public void setLockingClause(ForUpdateClause clause) { if (clause.isForUpdateOfClause()) { this.lockingClause = clause; setIsPrePrepared(false); } else { setLockMode(clause.getLockMode()); } setWasDefaultLockMode(false); }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer, SQLSelectStatement statement) { // Append lock strings if (getLockMode() == ObjectBuildingQuery.LOCK) { if (waitTimeout == null) { printer.printString(printer.getPlatform().getSelectForUpdateString()); } else { printer.printString(printer.getPlatform().getSelectForUpdateWaitString(waitTimeout)); } } else if (lockMode == ObjectBuildingQuery.LOCK_NOWAIT) { printer.printString(printer.getPlatform().getSelectForUpdateNoWaitString()); } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer, SQLSelectStatement statement) { // Append lock strings if (getLockMode() == ObjectBuildingQuery.LOCK) { if (waitTimeout == null) { printer.printString(printer.getPlatform().getSelectForUpdateString()); } else { printer.printString(printer.getPlatform().getSelectForUpdateWaitString(waitTimeout)); } } else if (lockMode == ObjectBuildingQuery.LOCK_NOWAIT) { printer.printString(printer.getPlatform().getSelectForUpdateNoWaitString()); } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer, SQLSelectStatement statement) { // Append lock strings if (getLockMode() == ObjectBuildingQuery.LOCK) { if (waitTimeout == null) { printer.printString(printer.getSession().getPlatform().getSelectForUpdateString()); } else { printer.printString(printer.getSession().getPlatform().getSelectForUpdateWaitString(waitTimeout)); } } else if (lockMode == ObjectBuildingQuery.LOCK_NOWAIT) { printer.printString(printer.getSession().getPlatform().getSelectForUpdateNoWaitString()); } }