本文整理了Java中org.eclipse.persistence.exceptions.QueryException.cannotConformExpression
方法的一些代码示例,展示了QueryException.cannotConformExpression
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryException.cannotConformExpression
方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.QueryException
类名称:QueryException
方法名:cannotConformExpression
暂无
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* New parameter added to doesConform for feature 2612601
* @param objectIsUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache; if object is not in the UOW cache
* but some of its attributes are, use the registered versions of
* object's attributes for the purposes of this method.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) throws QueryException {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* New parameter added to doesConform for feature 2612601
* @param objectIsUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache; if object is not in the UOW cache
* but some of its attributes are, use the registered versions of
* object's attributes for the purposes of this method.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) throws QueryException {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
* New parameter added for feature 2612601
* @param isObjectUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
* New parameter added for feature 2612601
* @param isObjectUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* New parameter added to doesConform for feature 2612601
* @param objectIsUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache; if object is not in the UOW cache
* but some of its attributes are, use the registered versions of
* object's attributes for the purposes of this method.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) throws QueryException {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
* New parameter added for feature 2612601
* @param isObjectUnregistered true if object possibly not a clone, but is being
* conformed against the unit of work cache.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
// Run ourselves through the translation row to find the desired value
if (getField() != null) {
return getValue(translationRow, session);
}
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
// Run ourselves through the translation row to find the desired value
if (getField() != null) {
return getValue(translationRow, session);
}
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
// Run ourselves through the translation row to find the desired value
if (getField() != null) {
return getValue(translationRow, session);
}
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying across object relationships.
*/
public boolean performSelector(boolean areValuesEqual) {
if (this.operator.getSelector() == ExpressionOperator.Equal) {
return areValuesEqual;
} else if (this.operator.getSelector() == ExpressionOperator.NotEqual) {
return !areValuesEqual;
} else {
throw QueryException.cannotConformExpression();
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying across object relationships.
*/
public boolean performSelector(boolean areValuesEqual) {
if (this.operator.getSelector() == ExpressionOperator.Equal) {
return areValuesEqual;
} else if (this.operator.getSelector() == ExpressionOperator.NotEqual) {
return !areValuesEqual;
} else {
throw QueryException.cannotConformExpression();
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying across object relationships.
*/
public boolean performSelector(boolean areValuesEqual) {
if (this.operator.getSelector() == ExpressionOperator.Equal) {
return areValuesEqual;
} else if (this.operator.getSelector() == ExpressionOperator.NotEqual) {
return !areValuesEqual;
} else {
throw QueryException.cannotConformExpression();
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public DatabaseMapping getMappingFromQueryKey() {
QueryKey queryKey = getQueryKeyOrNull();
if ((queryKey == null) || (!(queryKey instanceof DirectQueryKey))) {
throw QueryException.cannotConformExpression();
}
mapping = queryKey.getDescriptor().getObjectBuilder().getMappingForField(((DirectQueryKey)queryKey).getField());
if (mapping == null) {
throw QueryException.cannotConformExpression();
}
return mapping;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public DatabaseMapping getMappingFromQueryKey() {
QueryKey queryKey = getQueryKeyOrNull();
if ((queryKey == null) || (!(queryKey instanceof DirectQueryKey))) {
throw QueryException.cannotConformExpression();
}
mapping = queryKey.getDescriptor().getObjectBuilder().getMappingForField(((DirectQueryKey)queryKey).getField());
if (mapping == null) {
throw QueryException.cannotConformExpression();
}
return mapping;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public DatabaseMapping getMappingFromQueryKey() {
QueryKey queryKey = getQueryKeyOrNull();
if ((queryKey == null) || (!(queryKey instanceof DirectQueryKey))) {
throw QueryException.cannotConformExpression();
}
mapping = queryKey.getDescriptor().getObjectBuilder().getMappingForField(((DirectQueryKey)queryKey).getField());
if (mapping == null) {
throw QueryException.cannotConformExpression();
}
return mapping;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
// Joins not supported.
if (!getBaseExpression().isExpressionBuilder()) {
throw QueryException.cannotConformExpression();
}
// For bug 2780817 get the mapping directly from the object. In EJB 2.0
// inheritance, each child must override mappings defined in an abstract
// class with its own.
DatabaseMapping mapping = session.getDescriptor(object.getClass()).getObjectBuilder().getMappingForField(getField());
if (mapping == null) {
throw QueryException.cannotConformExpression();
}
return mapping.valueFromObject(object, getField(), session);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Return the value for in memory comparison.
* This is only valid for valueable expressions.
*/
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) {
// Joins not supported.
if (!getBaseExpression().isExpressionBuilder()) {
throw QueryException.cannotConformExpression();
}
// For bug 2780817 get the mapping directly from the object. In EJB 2.0
// inheritance, each child must override mappings defined in an abstract
// class with its own.
DatabaseMapping mapping = session.getDescriptor(object.getClass()).getObjectBuilder().getMappingForField(getField());
if (mapping == null) {
throw QueryException.cannotConformExpression();
}
return mapping.valueFromObject(object, getField(), session);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying.
* If the expression in not able to determine if the object conform throw a not supported exception.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) {
// This should always be and or or.
if (this.operator.getSelector() == ExpressionOperator.And) {
return this.firstChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) && this.secondChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
} else if (this.operator.getSelector() == ExpressionOperator.Or) {
return this.firstChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) || this.secondChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
}
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying.
* If the expression in not able to determine if the object conform throw a not supported exception.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) {
// This should always be and or or.
if (this.operator.getSelector() == ExpressionOperator.And) {
return this.firstChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) && this.secondChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
} else if (this.operator.getSelector() == ExpressionOperator.Or) {
return this.firstChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) || this.secondChild.doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
}
throw QueryException.cannotConformExpression();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Check if the object conforms to the expression in memory.
* This is used for in-memory querying.
* If the expression in not able to determine if the object conform throw a not supported exception.
*/
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean objectIsUnregistered) {
// This should always be and or or.
if (getOperator().getSelector() == ExpressionOperator.And) {
return getFirstChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) && getSecondChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
} else if (getOperator().getSelector() == ExpressionOperator.Or) {
return getFirstChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) || getSecondChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered);
}
throw QueryException.cannotConformExpression();
}
内容来源于网络,如有侵权,请联系作者删除!