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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractCriterion(java.lang.String fieldName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description IExpressionand(ICriterion criterion)booleancanUseIndex()IOdbList<java.lang.String>getAllInvolvedFields()An abstract criterion only restrict one field => it returns a list of one field!java.lang.StringgetAttributeName()IQuerygetQuery()Gets thes whole querybooleanmatch(AbstractObjectInfo aoi)booleanmatch(AttributeValuesMap attributeValues)abstract booleanmatch(java.lang.Object valueToMatch)To check if an object matches this criterionIExpressionnot()IExpressionor(ICriterion criterion)voidsetAttributeName(java.lang.String attributeName)voidsetQuery(IQuery query)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neodatis.odb.core.query.criteria.ICriterion
getValues, ready
-
-
-
-
Method Detail
-
canUseIndex
public boolean canUseIndex()
- Specified by:
canUseIndexin interfaceICriterion
-
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:ICriterionTo check if an object matches this criterion- Specified by:
matchin interfaceICriterion- 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:
getQueryin interfaceICriterion- Returns:
- The owner query
-
setQuery
public void setQuery(IQuery query)
- Specified by:
setQueryin interfaceICriterion
-
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:
getAllInvolvedFieldsin interfaceICriterion- Returns:
- The list of involved field of the criteria
-
setAttributeName
public void setAttributeName(java.lang.String attributeName)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG