Interface InstanceValueOrderPredicate
-
- All Superinterfaces:
InstanceEnumerationPredicate,InstancePredicate
- All Known Subinterfaces:
InstanceTaxonomyOrderPredicate,InstanceTotalOrderPredicate
- All Known Implementing Classes:
InstanceTaxonomyOrderPredicateImpl,InstanceTotalOrderPredicateImpl,InstanceValueOrderPredicateImpl
public interface InstanceValueOrderPredicate extends InstanceEnumerationPredicate
A value order is used in anInstanceEnumerationPredicateto define an order for the values of the predicate.This interface is extended by and
InstanceTaxonomyOrderPredicateandInstanceTotalOrderPredicate.- Version:
- $Revision: 1.1 $
- Author:
- Rainer Maximini
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENTComponent: "cake.data.model" (LogComponentIdentifier.COMPONENTstatic StringCOMPONENT_KEYComponent-Key: "03" (LogComponentIdentifier.COMPONENT_KEY_VALUEORDER)static StringLOG_VALUE_ALREADY_DEFINEDThe specified value is already defined.static StringLOG_VALUE_NOT_FOUNDThe value could not be found.static StringLOG_VALUE_UPDATE_FAILEDCould not update value - value is already defined.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(AtomicObject value)Returnstrueif the order contains the specified value.AtomicObject[]getOrderValues()getOrderValues.booleanisAfter(AtomicObject first, AtomicObject last)isAfter.booleanisBefore(AtomicObject first, AtomicObject last)isBefore.voidremove(AtomicObject value)Removes a value from the value order.voidupdate(AtomicObject oldValue, AtomicObject newValue)To update a value in the order theoldValueand thenewValuemust be specified.-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceEnumerationPredicate
addValue, getValues, hasValueOrder, removeValue, updateValue
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, holdsFor, isEnumerationPredicate, isIntervalPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
-
-
-
Field Detail
-
COMPONENT
static final String COMPONENT
Component: "cake.data.model" (LogComponentIdentifier.COMPONENT- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "03" (LogComponentIdentifier.COMPONENT_KEY_VALUEORDER)- See Also:
- Constant Field Values
-
LOG_VALUE_ALREADY_DEFINED
static final String LOG_VALUE_ALREADY_DEFINED
The specified value is already defined.- Component:
COMPONENT - Key: "0303"
- this
- See Also:
- Constant Field Values
- Component:
-
LOG_VALUE_NOT_FOUND
static final String LOG_VALUE_NOT_FOUND
The value could not be found.- Component:
COMPONENT - Key: "0301"
- this
- Value:
AtomicObject
- See Also:
- Constant Field Values
- Component:
-
LOG_VALUE_UPDATE_FAILED
static final String LOG_VALUE_UPDATE_FAILED
Could not update value - value is already defined.- Component:
COMPONENT - Key: "0302"
- this
- New value:
AtomicObject
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
contains
boolean contains(AtomicObject value)
Returnstrueif the order contains the specified value.- Parameters:
value- value whose presence in this order is to be tested.- Returns:
trueif this order contains the specified element.
-
getOrderValues
AtomicObject[] getOrderValues()
getOrderValues.
- Returns:
- an array of all values in the order, the array is never be
null.
-
isAfter
boolean isAfter(AtomicObject first, AtomicObject last) throws ObjectNotFoundException
isAfter.
- Parameters:
first- aAtomicObjectobjectlast- aAtomicObjectobject- Returns:
trueiffirstis afterlast, otherwisefalse- Throws:
ObjectNotFoundException- Is thrown when thefirstorlastvalue is not an element of the order.
-
isBefore
boolean isBefore(AtomicObject first, AtomicObject last) throws ObjectNotFoundException
isBefore.
- Parameters:
first- aAtomicObjectobjectlast- aAtomicObjectobject- Returns:
trueiffirstis beforelast, otherwisefalse- Throws:
ObjectNotFoundException- Is thrown when thefirstorlastvalue is not an element of the order.
-
remove
void remove(AtomicObject value) throws ObjectNotFoundException
Removes a value from the value order. Ifvalue == nullnothing happens. If the value order does not cotain thevalueaObjectNotFoundExceptionwill be thrown.- Parameters:
value- aAtomicObjectobject- Throws:
ObjectNotFoundException- Is thrown when the value is not an element of the order.
-
update
void update(AtomicObject oldValue, AtomicObject newValue) throws ObjectNotFoundException, ObjectAlreadyExistsException
To update a value in the order theoldValueand thenewValuemust be specified. ThenewValueis only be applied if and only if the order contains theoldValueand the order not contains thenewValue.- Parameters:
oldValue- aAtomicObjectobjectnewValue- aAtomicObjectobject- Throws:
ObjectNotFoundException- Is thrown when theoldValueis not an element of the order.ObjectAlreadyExistsException- Is thrown when thenewValueis already in the order.
-
-