Class JDOBasicPredicate
- java.lang.Object
-
- net.ontopia.topicmaps.query.impl.rdbms.JDOBasicPredicate
-
- All Implemented Interfaces:
BasicPredicateIF,JDOPredicateIF,PredicateIF
public class JDOBasicPredicate extends Object implements JDOPredicateIF
INTERNAL: A predicate wrapper that delegates all it's method calls to the nested basic predicate.
-
-
Field Summary
Fields Modifier and Type Field Description protected BasicPredicateIFpred
-
Constructor Summary
Constructors Constructor Description JDOBasicPredicate(BasicPredicateIF pred)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbuildQuery(QueryBuilder builder, List expressions, List arguments)INTERNAL: Registers JDOExpressionsIF for this predicate with the query builder.intgetCost(boolean[] boundparams)INTERNAL.StringgetName()INTERNAL: Returns the name of the predicate.StringgetSignature()INTERNAL: Returns a string representing the signature of the predicate.booleanisRecursive()INTERNAL:voidprescan(QueryBuilder builder, List arguments)INTERNAL: This method will be called before building the query.QueryMatchessatisfy(QueryMatches result, Object[] arguments)
-
-
-
Field Detail
-
pred
protected BasicPredicateIF pred
-
-
Constructor Detail
-
JDOBasicPredicate
public JDOBasicPredicate(BasicPredicateIF pred)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:PredicateIFINTERNAL: Returns the name of the predicate. This will usually be the name of the predicate within its module ('instance-of', '/=', 'starts-with'), but some virtual predicates cannot be reached from the syntax and may return names that will not parse.- Specified by:
getNamein interfacePredicateIF
-
getSignature
public String getSignature() throws InvalidQueryException
Description copied from interface:PredicateIFINTERNAL: Returns a string representing the signature of the predicate. The string consists of a whitespace-separated list of arguments, where each argument is made up of tokens representing the type or cardinality of that argument.The instance-of predicate would have a signature of "t t", while /= would have ". .", and in would have ". .+". For full details, see topicmaps.impl.utils.ArgumentValidator.
- Specified by:
getSignaturein interfacePredicateIF- Throws:
InvalidQueryException
-
getCost
public int getCost(boolean[] boundparams)
Description copied from interface:PredicateIFINTERNAL.- Specified by:
getCostin interfacePredicateIF
-
satisfy
public QueryMatches satisfy(QueryMatches result, Object[] arguments) throws InvalidQueryException
- Specified by:
satisfyin interfaceBasicPredicateIF- Throws:
InvalidQueryException
-
isRecursive
public boolean isRecursive()
Description copied from interface:JDOPredicateIFINTERNAL:- Specified by:
isRecursivein interfaceJDOPredicateIF
-
prescan
public void prescan(QueryBuilder builder, List arguments)
Description copied from interface:JDOPredicateIFINTERNAL: This method will be called before building the query. It is used mainly for analyzing the predicate.- Specified by:
prescanin interfaceJDOPredicateIF
-
buildQuery
public boolean buildQuery(QueryBuilder builder, List expressions, List arguments) throws InvalidQueryException
Description copied from interface:JDOPredicateIFINTERNAL: Registers JDOExpressionsIF for this predicate with the query builder.- Specified by:
buildQueryin interfaceJDOPredicateIF- Returns:
- true if predicate was mapped to JDO expression; false if the predicate could not be mapped to an JDO expression.
- Throws:
InvalidQueryException
-
-