| java.lang.Object org.mandarax.kernel.LObject org.mandarax.kernel.meta.JConstructor org.mandarax.kernel.meta.JPredicate
JPredicate | final public class JPredicate extends JConstructor implements Predicate(Code) | | A JPredicate is a predicate defined by a java method. Despite it is not
enforced here, the method should return a boolean,
e.g. equals() .
Note that the predicate can be negated. E.g., if the equals()
associates objects that are equal, the negated equals() predicate
associates objects that are not equal. In case the predicate is
negated and no name is given, the prefix not is automatically
added to the generated name, i.e. to the name of the method.
This is important since equals() invokes the name of the predicate
(and not the method)!!
In version 3.2, session support has been added. The last parameter (found in the wrapoped method)
is treated separately if its type is Session (or a subclass of session). Then this parameter is used
to pass a session reference at query time to the function or predicate!
See Also: org.mandarax.kernel.Session author: Jens Dietrich version: 3.4 <7 March 05> since: 1.0 |
JPredicate | public JPredicate()(Code) | | Constructor.
|
JPredicate | public JPredicate(Method aMethod)(Code) | | Constructor.
Parameters: aMethod - the method used |
JPredicate | public JPredicate(Method aMethod, String aName)(Code) | | Constructor.
Parameters: aMethod - the method used Parameters: aName - the name of the object |
JPredicate | public JPredicate(Method aMethod, String aName, boolean negated)(Code) | | Constructor.
Parameters: aMethod - the method used Parameters: aName - the name of the object boolean true if the predicate is negated, false otherwise |
JPredicate | public JPredicate(Method aMethod, boolean negated)(Code) | | Constructor.
Parameters: aMethod - the method used boolean true if the predicate is negated, false otherwise |
equals | public boolean equals(Object obj)(Code) | | Indicates whether the two objects are equal. This method invokes
comparing the names and checking the structure types for compatibility (and not for
identity!).
Parameters: obj - the object to compare this object with true if the objects are equal, false otherwise |
getName | public String getName()(Code) | | Get the name.
the name of the predicate |
getSlotNames | public String[] getSlotNames()(Code) | | Get the slot names.
an array of strings, the length of the array is the same asthe length of the array of terms (the structure of the predicate) |
hashCode | public int hashCode()(Code) | | Get the hash code of the object.
the hash value |
isNegated | public boolean isNegated()(Code) | | Indicates whether the predicate is negated.
true if the predicate is negated, false otherwise |
setNegated | public void setNegated(boolean neg)(Code) | | Set the negated property.
Parameters: neg - a boolean |
setSlotNames | public void setSlotNames(String[] names)(Code) | | Set the slot names.
Parameters: names - an array of strings, the length of the array is the same asthe length of the array of terms (the structure of the predicate) |
slotNamesCanBeEdited | public boolean slotNamesCanBeEdited()(Code) | | Indicates whether the slot names can be modified.
a boolean |
|
|