org.neodatis.odb.core.query.criteria
Class AbstractCriterion
java.lang.Object
org.neodatis.odb.core.query.criteria.AbstractCriterion
- All Implemented Interfaces:
- java.io.Serializable, ICriterion
- Direct Known Subclasses:
- CollectionSizeCriterion, ComparisonCriterion, ContainsCriterion, EqualCriterion, IsNotNullCriterion, IsNullCriterion, LikeCriterion
public abstract class AbstractCriterion
- extends java.lang.Object
- implements ICriterion
An adapter for Criterion.
- Author:
- olivier s
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
attributeName
The name of the attribute involved by this criterion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
attributeName
protected java.lang.String attributeName
- The name of the attribute involved by this criterion
AbstractCriterion
public AbstractCriterion(java.lang.String fieldName)
canUseIndex
public boolean canUseIndex()
- Specified by:
canUseIndex
in interface ICriterion
match
public boolean match(AbstractObjectInfo aoi)
match
public boolean match(AttributeValuesMap attributeValues)
match
public abstract boolean match(java.lang.Object valueToMatch)
- Description copied from interface:
ICriterion
- To check if an object matches this criterion
- Specified by:
match
in interface ICriterion
- Returns:
- true if object matches the criteria
TODO create a math(AttributeValuesMap)
and
public IExpression and(ICriterion criterion)
or
public IExpression or(ICriterion criterion)
not
public IExpression not()
getQuery
public IQuery getQuery()
- Gets thes whole query
- Specified by:
getQuery
in interface ICriterion
- Returns:
- The owner query
setQuery
public void setQuery(IQuery query)
- Specified by:
setQuery
in interface ICriterion
getAttributeName
public java.lang.String getAttributeName()
- Returns:
- The attribute involved in the criterion
getAllInvolvedFields
public IOdbList<java.lang.String> getAllInvolvedFields()
- An abstract criterion only restrict one field => it returns a list of one field!
- Specified by:
getAllInvolvedFields
in interface ICriterion
- Returns:
- The list of involved field of the criteria
setAttributeName
public void setAttributeName(java.lang.String attributeName)