/** * Return the expression from the attribute dervied from this expression. */ @Override public Expression get(String attributeName, boolean forceInnerJoin) { ObjectExpression result = derivedExpressionNamed(attributeName); if (forceInnerJoin) { result.doNotUseOuterJoin(); } return result; }
/** * Return the expression from the attribute dervied from this expression. */ @Override public Expression get(String attributeName, boolean forceInnerJoin) { ObjectExpression result = derivedExpressionNamed(attributeName); if (forceInnerJoin) { result.doNotUseOuterJoin(); } return result; }
public Expression getAllowingNull(String attributeName, Vector arguments) { ObjectExpression exp = existingDerivedExpressionNamed(attributeName); // The same (aliased) table cannot participate in a normal join and an outer join. // To help enforce this, if the node already exists if (exp != null) { return exp; } exp = derivedExpressionNamed(attributeName); exp.doUseOuterJoin(); return exp; }
@Override public Expression getAllowingNull(String attributeName) { ObjectExpression exp = existingDerivedExpressionNamed(attributeName); // The same (aliased) table cannot participate in a normal join and an outer join. // To help enforce this, if the node already exists if (exp != null) { return exp; } ObjectExpression result = derivedExpressionNamed(attributeName); result.doUseOuterJoin(); return result; }
public Expression get(String attributeName, Vector arguments) { Expression operatorExpression = super.get(attributeName, arguments); if (operatorExpression != null) { return operatorExpression; } QueryKeyExpression result = derivedExpressionNamed(attributeName); result.doNotUseOuterJoin(); return result; }
@Override public Expression getAllowingNull(String attributeName) { ObjectExpression exp = existingDerivedExpressionNamed(attributeName); // The same (aliased) table cannot participate in a normal join and an outer join. // To help enforce this, if the node already exists if (exp != null) { return exp; } ObjectExpression result = derivedExpressionNamed(attributeName); result.doUseOuterJoin(); return result; }
/** * PUBLIC: * Return an expression representing traversal of a 1:many or many:many relationship. * This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria. * <p>Example: * <pre><blockquote> * Expression: employee.anyOf("managedEmployees").get("firstName").equal("Bob") * Java: no direct equivalent * SQL: SELECT DISTINCT ... WHERE (t2.MGR_ID = t1.ID) AND (t2.F_NAME = 'Bob') * </pre></blockquote> * @parameter shouldJoinBeIndependent indicates whether a new expression should be created. */ @Override public Expression anyOf(String attributeName, boolean shouldJoinBeIndependent) { QueryKeyExpression queryKey; if (shouldJoinBeIndependent) { queryKey = newDerivedExpressionNamed(attributeName); } else { queryKey = derivedExpressionNamed(attributeName); } queryKey.doQueryToManyRelationship(); return queryKey; }
/** * PUBLIC: * Return an expression representing traversal of a 1:many or many:many relationship. * This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria. * <p>Example: * <pre><blockquote> * Expression: employee.anyOf("managedEmployees").get("firstName").equal("Bob") * Java: no direct equivalent * SQL: SELECT DISTINCT ... WHERE (t2.MGR_ID = t1.ID) AND (t2.F_NAME = 'Bob') * </pre></blockquote> * @parameter shouldJoinBeIndependent indicates whether a new expression should be created. */ @Override public Expression anyOf(String attributeName, boolean shouldJoinBeIndependent) { QueryKeyExpression queryKey; if (shouldJoinBeIndependent) { queryKey = newDerivedExpressionNamed(attributeName); } else { queryKey = derivedExpressionNamed(attributeName); } queryKey.doQueryToManyRelationship(); return queryKey; }
/** * ADVANCED: * Return an expression representing traversal of a 1:many or many:many relationship. * This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria. * <p>Example: * <pre><blockquote> * Expression: employee.anyOf("managedEmployees").get("firstName").equal("Bob") * Java: no direct equivalent * SQL: SELECT DISTINCT ... WHERE (t2.MGR_ID (+) = t1.ID) AND (t2.F_NAME = 'Bob') * </pre></blockquote> * @parameter shouldJoinBeIndependent indicates whether a new expression should be created. */ @Override public Expression anyOfAllowingNone(String attributeName, boolean shouldJoinBeIndependent) { QueryKeyExpression queryKey; if (shouldJoinBeIndependent) { queryKey = newDerivedExpressionNamed(attributeName); } else { queryKey = derivedExpressionNamed(attributeName); } queryKey.doUseOuterJoin(); queryKey.doQueryToManyRelationship(); return queryKey; }
/** * ADVANCED: * Return an expression representing traversal of a 1:many or many:many relationship. * This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria. * <p>Example: * <pre><blockquote> * Expression: employee.anyOf("managedEmployees").get("firstName").equal("Bob") * Java: no direct equivalent * SQL: SELECT DISTINCT ... WHERE (t2.MGR_ID (+) = t1.ID) AND (t2.F_NAME = 'Bob') * </pre></blockquote> * @parameter shouldJoinBeIndependent indicates whether a new expression should be created. */ @Override public Expression anyOfAllowingNone(String attributeName, boolean shouldJoinBeIndependent) { QueryKeyExpression queryKey; if (shouldJoinBeIndependent) { queryKey = newDerivedExpressionNamed(attributeName); } else { queryKey = derivedExpressionNamed(attributeName); } queryKey.doUseOuterJoin(); queryKey.doQueryToManyRelationship(); return queryKey; }