/** * Set false if the user does not want to use the default fetch group defined in the descriptor level. */ public void setShouldUseDefaultFetchGroup(boolean shouldUseDefaultFetchGroup) { this.shouldUseDefaultFetchGroup = shouldUseDefaultFetchGroup; setIsPrepared(false); }
/** * REQUIRED: * Set the reference class for the query. */ public void setReferenceClass(Class aClass) { if (referenceClass != aClass) { setIsPrepared(false); } referenceClass = aClass; }
/** * ADVANCED: * If a distinct has been set the DISTINCT clause will be printed. * This is used internally by TopLink for batch reading but may also be * used directly for advanced queries or report queries. */ public void setDistinctState(short distinctState) { this.distinctState = distinctState; //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * Set a dynamic (use case) fetch group to the query. */ public void setFetchGroup(FetchGroup newFetchGroup) { this.fetchGroup = newFetchGroup; setIsPrepared(false); }
/** * INTERNAL: * Additional fields can be added to a query. This is used in m-m batch reading to bring back the key from the join table. */ public void addAdditionalField(DatabaseField field) { getAdditionalFields().add(field); // Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the union expression to the query. * A union expression must be created with the query's expression builder * and one of union/unionAll/intersect/intersectAll/except/exceptAll with a subquery expression. */ public void addUnionExpression(Expression union) { setIsPrepared(false); getUnionExpressions().add(union); }
/** * PUBLIC: * Set the query to lock, this will also turn refreshCache on. */ public void acquireLocks() { setLockMode(LOCK); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the union expression to the query. * A union expression must be created with the query's expression builder * and one of union/unionAll/intersect/intersectAll/except/exceptAll with a subquery expression. */ public void addUnionExpression(Expression union) { setIsPrepared(false); getUnionExpressions().add(union); }
/** * INTERNAL: * Additional fields can be added to a query. This is used in m-m batch reading to bring back the key from the join table. */ public void addAdditionalField(Expression fieldExpression) { getAdditionalFields().add(fieldExpression); // Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set the query to lock, this will also turn refreshCache on. */ public void acquireLocks() { setLockMode(LOCK); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set the query to lock, this will also turn refreshCache on. */ public void acquireLocks() { setLockMode(LOCK); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set the query to lock without waiting (blocking), this will also turn refreshCache on. */ public void acquireLocksWithoutWaiting() { setLockMode(LOCK_NOWAIT); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * If a distinct has been set the DISTINCT clause will be printed. * This is used internally by EclipseLink for batch reading but may also be * used directly for advanced queries or report queries. */ public void dontUseDistinct() { setDistinctState(DONT_USE_DISTINCT); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set the query to lock without waiting (blocking), this will also turn refreshCache on. */ public void acquireLocksWithoutWaiting() { setLockMode(LOCK_NOWAIT); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * INTERNAL: * Additional fields can be added to a query. This is used in m-m batch reading to bring back the key from the join table. */ public void addAdditionalField(Expression fieldExpression) { getAdditionalFields().add(fieldExpression); // Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * If a distinct has been set the DISTINCT clause will be printed. * This is used internally by TopLink for batch reading but may also be * used directly for advanced queries or report queries. */ public void resetDistinct() { setDistinctState(UNCOMPUTED_DISTINCT); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * INTERNAL: * Additional fields can be added to a query. This is used in m-m batch reading to bring back the key from the join table. */ public void addAdditionalField(DatabaseField field) { getAdditionalFields().add(field); // Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * If a distinct has been set the DISTINCT clause will be printed. * This is used internally by EclipseLink for batch reading but may also be * used directly for advanced queries or report queries. */ public void useDistinct() { setDistinctState(USE_DISTINCT); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the ordering expression. This allows for ordering across relationships or functions. * Example: readAllQuery.addOrdering(expBuilder.get("address").get("city").toUpperCase().descending()) */ public void addOrdering(Expression orderingExpression) { getOrderByExpressions().add(orderingExpression); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); setShouldOuterJoinSubclasses(true); }
/** * PUBLIC: * Add the ordering expression. This allows for ordering across relationships or functions. * Example: readAllQuery.addOrdering(expBuilder.get("address").get("city").toUpperCase().descending()) */ public void addOrdering(Expression orderingExpression) { getOrderByExpressions().add(orderingExpression); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); setShouldOuterJoinSubclasses(true); }