本文整理了Java中org.eclipse.persistence.internal.expressions.QueryKeyExpression.doUseOuterJoin
方法的一些代码示例,展示了QueryKeyExpression.doUseOuterJoin
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryKeyExpression.doUseOuterJoin
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.expressions.QueryKeyExpression
类名称:QueryKeyExpression
方法名:doUseOuterJoin
暂无
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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>
* TopLink: 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>
*/
public Expression anyOfAllowingNone(String attributeName) {
QueryKeyExpression queryKey = newDerivedExpressionNamed(attributeName);
queryKey.doUseOuterJoin();
queryKey.doQueryToManyRelationship();
return queryKey;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Rebuild myself against the base, with the values of parameters supplied by the context
* expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping)
* into part of some larger expression. You normally would not call this directly, instead calling twist
* See the comment there for more details"
*/
@Override
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase) {
if (oldBase == null || this.baseExpression == oldBase) {
Expression twistedBase = this.baseExpression.twistedForBaseAndContext(newBase, context, oldBase);
QueryKeyExpression result = (QueryKeyExpression)twistedBase.get(getName());
if (shouldUseOuterJoin) {
result.doUseOuterJoin();
}
if (shouldQueryToManyRelationship) {
result.doQueryToManyRelationship();
}
return result;
}
return this;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Rebuild myself against the base, with the values of parameters supplied by the context
* expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping)
* into part of some larger expression. You normally would not call this directly, instead calling twist
* See the comment there for more details"
*/
@Override
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase) {
if (oldBase == null || this.baseExpression == oldBase) {
Expression twistedBase = this.baseExpression.twistedForBaseAndContext(newBase, context, oldBase);
QueryKeyExpression result = (QueryKeyExpression)twistedBase.get(getName());
if (shouldUseOuterJoin) {
result.doUseOuterJoin();
}
if (shouldQueryToManyRelationship) {
result.doQueryToManyRelationship();
}
return result;
}
return this;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Rebuild myself against the base, with the values of parameters supplied by the context
* expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping)
* into part of some larger expression. You normally would not call this directly, instead calling twist
* See the comment there for more details"
*/
public Expression twistedForBaseAndContext(Expression newBase, Expression context) {
Expression twistedBase = getBaseExpression().twistedForBaseAndContext(newBase, context);
QueryKeyExpression result = (QueryKeyExpression)twistedBase.get(getName());
if (shouldUseOuterJoin) {
result.doUseOuterJoin();
}
if (shouldQueryToManyRelationship) {
result.doQueryToManyRelationship();
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!