本文整理了Java中org.eclipse.persistence.internal.expressions.QueryKeyExpression.getSession
方法的一些代码示例,展示了QueryKeyExpression.getSession
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryKeyExpression.getSession
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.expressions.QueryKeyExpression
类名称:QueryKeyExpression
方法名:getSession
暂无
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Return if the expression is for a direct mapped attribute.
*/
@Override
public boolean isAttribute() {
if (isAttributeExpression == null) {
if (getSession() == null) {
// We can't tell, so say no.
return false;
}
QueryKey queryKey = getQueryKeyOrNull();
if (queryKey != null) {
isAttributeExpression = Boolean.valueOf(queryKey.isDirectQueryKey());
} else {
DatabaseMapping mapping = getMapping();
if (mapping != null) {
if (mapping.isVariableOneToOneMapping()) {
throw QueryException.cannotQueryAcrossAVariableOneToOneMapping(mapping, mapping.getDescriptor());
} else {
isAttributeExpression = Boolean.valueOf(mapping.isDirectToFieldMapping());
}
} else {
isAttributeExpression = Boolean.FALSE;
}
}
}
return isAttributeExpression.booleanValue();
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Return if the expression is for a direct mapped attribute.
*/
@Override
public boolean isAttribute() {
if (isAttributeExpression == null) {
if (getSession() == null) {
// We can't tell, so say no.
return false;
}
QueryKey queryKey = getQueryKeyOrNull();
if (queryKey != null) {
isAttributeExpression = Boolean.valueOf(queryKey.isDirectQueryKey());
} else {
DatabaseMapping mapping = getMapping();
if (mapping != null) {
if (mapping.isVariableOneToOneMapping()) {
throw QueryException.cannotQueryAcrossAVariableOneToOneMapping(mapping, mapping.getDescriptor());
} else {
isAttributeExpression = Boolean.valueOf(mapping.isDirectToFieldMapping());
}
} else {
isAttributeExpression = Boolean.FALSE;
}
}
}
return isAttributeExpression.booleanValue();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Return if the expression is for a direct mapped attribute.
*/
public boolean isAttribute() {
if (isAttributeExpression == null) {
if (getSession() == null) {
// We can't tell, so say no.
return false;
}
QueryKey queryKey = getQueryKeyOrNull();
if (queryKey != null) {
isAttributeExpression = Boolean.valueOf(queryKey.isDirectQueryKey());
} else {
DatabaseMapping mapping = getMapping();
if (mapping != null) {
if (mapping.isVariableOneToOneMapping()) {
throw QueryException.cannotQueryAcrossAVariableOneToOneMapping(mapping, mapping.getDescriptor());
} else {
isAttributeExpression = Boolean.valueOf(mapping.isDirectToFieldMapping());
}
} else {
isAttributeExpression = Boolean.FALSE;
}
}
}
return isAttributeExpression.booleanValue();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if (shouldUseOuterJoin() || (!getSession().getPlatform().shouldPrintInnerJoinInWhereClause())) {
for (int i=1; i < tablesSize; i++) {
DatabaseTable table = (DatabaseTable)tables.elementAt(i);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (shouldUseOuterJoin() || (!getSession().getPlatform().shouldPrintInnerJoinInWhereClause())) {
for (int i=1; i < tablesSize; i++) {
DatabaseTable table = (DatabaseTable)tables.elementAt(i);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (criteria != null) {
criteria = this.baseExpression.twist(criteria, this);
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
criteria.convertToUseOuterJoin();
if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
if(isUsingOuterJoinForMultitableInheritance()) {
Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression();
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (shouldUseOuterJoin() && (getSession().getPlatform().isInformixOuterJoin())) {
normalizer.getStatement().getOuterJoinExpressions().addElement(this);
normalizer.getStatement().getOuterJoinedMappingCriteria().addElement(mappingExpression);
normalizer.addAdditionalExpression(mappingExpression.and(additionalExpressionCriteria()));
return this;
} else if ((shouldUseOuterJoin() || isUsingOuterJoinForMultitableInheritance()) && (!getSession().getPlatform().shouldPrintOuterJoinInWhereClause())) {
if(shouldUseOuterJoin()) {
normalizer.getStatement().getOuterJoinExpressions().addElement(this);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public Expression mappingCriteria(Expression base) {
Expression selectionCriteria;
// First look for a query key, then a mapping
if (getQueryKeyOrNull() == null) {
if ((getMapping() == null) || (!getMapping().isForeignReferenceMapping())) {
return null;
} else {
// The join criteria is now twisted by the mappings.
selectionCriteria = ((ForeignReferenceMapping)getMapping()).getJoinCriteria(this, base);
}
} else {
if (!getQueryKeyOrNull().isForeignReferenceQueryKey()) {
return null;
} else {
selectionCriteria = ((ForeignReferenceQueryKey)getQueryKeyOrNull()).getJoinCriteria();
selectionCriteria = this.baseExpression.twist(selectionCriteria, base);
}
}
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
selectionCriteria = selectionCriteria.convertToUseOuterJoin();
}
return selectionCriteria;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if (criteria != null) {
criteria = this.baseExpression.twist(criteria, this);
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
criteria.convertToUseOuterJoin();
if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
if(isUsingOuterJoinForMultitableInheritance()) {
Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression();
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public Expression mappingCriteria(Expression base) {
Expression selectionCriteria;
// First look for a query key, then a mapping
if (getQueryKeyOrNull() == null) {
if ((getMapping() == null) || (!getMapping().isForeignReferenceMapping())) {
return null;
} else {
// The join criteria is now twisted by the mappings.
selectionCriteria = ((ForeignReferenceMapping)getMapping()).getJoinCriteria(this, base);
}
} else {
if (!getQueryKeyOrNull().isForeignReferenceQueryKey()) {
return null;
} else {
selectionCriteria = ((ForeignReferenceQueryKey)getQueryKeyOrNull()).getJoinCriteria();
selectionCriteria = this.baseExpression.twist(selectionCriteria, base);
}
}
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
selectionCriteria = selectionCriteria.convertToUseOuterJoin();
}
return selectionCriteria;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (criteria != null) {
criteria = getBaseExpression().twist(criteria, this);
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
criteria.convertToUseOuterJoin();
if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
if(isUsingOuterJoinForMultitableInheritance()) {
Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression();
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public Expression mappingCriteria() {
Expression selectionCriteria;
// First look for a query key, then a mapping
if (getQueryKeyOrNull() == null) {
if ((getMapping() == null) || (!getMapping().isForeignReferenceMapping())) {
return null;
} else {
// The join criteria is now twisted by the mappings.
selectionCriteria = ((ForeignReferenceMapping)getMapping()).getJoinCriteria(this);
}
} else {
if (!getQueryKeyOrNull().isForeignReferenceQueryKey()) {
return null;
} else {
selectionCriteria = ((ForeignReferenceQueryKey)getQueryKeyOrNull()).getJoinCriteria();
selectionCriteria = getBaseExpression().twist(selectionCriteria, this);
}
}
if (shouldUseOuterJoin() && getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) {
selectionCriteria = selectionCriteria.convertToUseOuterJoin();
}
return selectionCriteria;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (shouldUseOuterJoin() && (getSession().getPlatform().isInformixOuterJoin())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(this, mappingExpression, null, null));
normalizer.addAdditionalExpression(mappingExpression.and(additionalExpressionCriteria()));
return this;
} else if ((shouldUseOuterJoin() && (!getSession().getPlatform().shouldPrintOuterJoinInWhereClause()))
|| (!getSession().getPlatform().shouldPrintInnerJoinInWhereClause())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(this, mappingExpression, additionalExpressionCriteriaMap(), null));
if ((getDescriptor() != null) && (getDescriptor().getHistoryPolicy() != null)) {
} else if (isUsingOuterJoinForMultitableInheritance() && (!getSession().getPlatform().shouldPrintOuterJoinInWhereClause())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(null, null, additionalExpressionCriteriaMap(), mapping.getReferenceDescriptor()));
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if (shouldUseOuterJoin() && (getSession().getPlatform().isInformixOuterJoin())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(this, mappingExpression, null, null));
normalizer.addAdditionalExpression(mappingExpression.and(additionalExpressionCriteria()));
return this;
} else if ((shouldUseOuterJoin() && (!getSession().getPlatform().shouldPrintOuterJoinInWhereClause()))
|| (!getSession().getPlatform().shouldPrintInnerJoinInWhereClause())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(this, mappingExpression, additionalExpressionCriteriaMap(), null));
if ((getDescriptor() != null) && (getDescriptor().getHistoryPolicy() != null)) {
} else if (isUsingOuterJoinForMultitableInheritance() && (!getSession().getPlatform().shouldPrintOuterJoinInWhereClause())) {
setOuterJoinExpIndex(statement.addOuterJoinExpressionsHolders(null, null, additionalExpressionCriteriaMap(), mapping.getReferenceDescriptor()));
内容来源于网络,如有侵权,请联系作者删除!