/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
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; }
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; }
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; }
/** * 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); }
/** * 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); }
/** * 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(); }
/** * 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(); }
/** * 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(); }