|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.caleigo.core.Qualifier
The Qualifier class is the abstract base class for all Qualifier classes.
A Qualifier is an object that is used to address/identify a selection of
objects or single entity instance. A Qualifier that defines a single entity
instance is called an identity qualifier.
The class defines three abstract methods that all non abstract qualifiers
must implement. All subclasses should also override the toString() method
to provide a suitable readable description of the qualifier for logging
purposes. The class also provides a number of help methods to aid
API-users in the construction of qualifiers.
Note that new non standard qualifiers must in some way be mapped or
interpreted by the IDataService:s that are to be used in colaberation with
the qualifier.
Nested Class Summary | |
protected class |
Qualifier.RelayListener
Simple listener class that relays all received events to the listeners registered in the proxy object. |
Constructor Summary | |
Qualifier()
|
Method Summary | |
void |
addQualifierListener(IQualifierListener listener)
Adds an IQualifierListener to receive notifications of contents and structure changes from the Qualifier object. |
Qualifier |
and(IFieldDescriptor fieldDescriptor,
java.lang.Object relationValue)
Creates a logic intersection between the qualifier and a new qualifier defined by the provided field descriptor and data value. |
Qualifier |
and(IFieldDescriptor fieldDescriptor,
RelationType relationType,
java.lang.Object relationValue)
Creates a logic intersection between the qualifier and a new qualifier defined by the provided field descriptor and data value. |
Qualifier |
and(Qualifier qualifier)
Creates a logic intersection between the qualifiers. |
abstract boolean |
canDirectlyQualify(IEntityDescriptor entityDescriptor)
This abstract method must return true if the qualifier can select entities of the type defined by the provided entity descriptor without the nead of any complementary data. |
abstract boolean |
canQualify(IEntityDescriptor entityDescriptor)
This abstract method must return true if the qualifier logically can select entities of the type defined by the provided entity descriptor. |
abstract boolean |
canUniquelyQualify(IEntityDescriptor entityDescriptor)
This abstract method must return true if the qualifier can uniquely select entities of the type defined by the provided entity descriptor. |
static Qualifier |
combine(Qualifier qualifier1,
Qualifier qualifier2)
Creates a logic intersection between the qualifiers. |
static Qualifier |
create(IFieldDescriptor fieldDescriptor,
java.lang.Object relationValue)
Creates a new relation qualifier defined by the defined by the provided field descriptor and data value. |
static Qualifier |
create(IFieldDescriptor fieldDescriptor,
RelationType relationType,
java.lang.Object relationValue)
Creates a new relation qualifier defined by the defined by the provided field descriptor, relation type and data value. |
abstract boolean |
doesQualify(IEntity entity)
This abstract method must return true if the qualifier does select the provided entity object. |
protected void |
fireContentChangedEvent()
Fire a new QualifierEvent as a content change notifictaion using the current Qualifier as the source to all registered IQualifierListeners. |
protected void |
fireQualifierEvent(QualifierEvent event)
Fire the provided QualifierEvent to all registered IQualifierListeners. |
protected void |
fireStructureChangedEvent()
Fire a new QualifierEvent as a structure change notifictaion using the current Qualifier as the source to all registered IQualifierListeners. |
Qualifier |
negate()
Returns a negated version of the qualifier. |
Qualifier |
or(IFieldDescriptor fieldDescriptor,
java.lang.Object relationValue)
Creates a logic union between the qualifier and a new qualifier defined by the provided field descriptor and data value. |
Qualifier |
or(IFieldDescriptor fieldDescriptor,
RelationType relationType,
java.lang.Object relationValue)
Creates a logic union between the qualifier and a new qualifier defined by the provided field descriptor and data value. |
Qualifier |
or(Qualifier qualifier)
Creates a logic union between the qualifiers. |
void |
removeQualifierListener(IQualifierListener listener)
Removes the specified IQualifierListener from the Qualifier. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Qualifier()
Method Detail |
public static Qualifier create(IFieldDescriptor fieldDescriptor, java.lang.Object relationValue)
public static Qualifier create(IFieldDescriptor fieldDescriptor, RelationType relationType, java.lang.Object relationValue)
public static Qualifier combine(Qualifier qualifier1, Qualifier qualifier2)
public abstract boolean doesQualify(IEntity entity)
public abstract boolean canQualify(IEntityDescriptor entityDescriptor)
public abstract boolean canDirectlyQualify(IEntityDescriptor entityDescriptor)
public abstract boolean canUniquelyQualify(IEntityDescriptor entityDescriptor)
public void addQualifierListener(IQualifierListener listener)
public void removeQualifierListener(IQualifierListener listener)
public Qualifier and(Qualifier qualifier)
public Qualifier and(IFieldDescriptor fieldDescriptor, java.lang.Object relationValue)
public Qualifier and(IFieldDescriptor fieldDescriptor, RelationType relationType, java.lang.Object relationValue)
public Qualifier or(Qualifier qualifier)
public Qualifier or(IFieldDescriptor fieldDescriptor, java.lang.Object relationValue)
public Qualifier or(IFieldDescriptor fieldDescriptor, RelationType relationType, java.lang.Object relationValue)
public Qualifier negate()
protected void fireQualifierEvent(QualifierEvent event)
protected void fireStructureChangedEvent()
protected void fireContentChangedEvent()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |