net.ontopia.topicmaps.query.impl.rdbms
Class JDOBasicPredicate

java.lang.Object
  extended by net.ontopia.topicmaps.query.impl.rdbms.JDOBasicPredicate
All Implemented Interfaces:
BasicPredicateIF, JDOPredicateIF, PredicateIF

public class JDOBasicPredicate
extends java.lang.Object
implements JDOPredicateIF

INTERNAL: A predicate wrapper that delegates all it's method calls to the nested basic predicate.


Field Summary
protected  BasicPredicateIF pred
           
 
Constructor Summary
JDOBasicPredicate(BasicPredicateIF pred)
           
 
Method Summary
 boolean buildQuery(QueryBuilder builder, java.util.List expressions, java.util.List arguments)
          INTERNAL: Registers JDOExpressionsIF for this predicate with the query builder.
 int getCost(boolean[] boundparams)
          INTERNAL.
 java.lang.String getName()
          INTERNAL: Returns the name of the predicate.
 java.lang.String getSignature()
          INTERNAL: Returns a string representing the signature of the predicate.
 boolean isRecursive()
          INTERNAL:
 void prescan(QueryBuilder builder, java.util.List arguments)
          INTERNAL: This method will be called before building the query.
 QueryMatches satisfy(QueryMatches result, java.lang.Object[] arguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pred

protected BasicPredicateIF pred
Constructor Detail

JDOBasicPredicate

public JDOBasicPredicate(BasicPredicateIF pred)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: PredicateIF
INTERNAL: 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:
getName in interface PredicateIF

getSignature

public java.lang.String getSignature()
                              throws InvalidQueryException
Description copied from interface: PredicateIF
INTERNAL: 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:
getSignature in interface PredicateIF
Throws:
InvalidQueryException

getCost

public int getCost(boolean[] boundparams)
Description copied from interface: PredicateIF
INTERNAL.

Specified by:
getCost in interface PredicateIF

satisfy

public QueryMatches satisfy(QueryMatches result,
                            java.lang.Object[] arguments)
                     throws InvalidQueryException
Specified by:
satisfy in interface BasicPredicateIF
Throws:
InvalidQueryException

isRecursive

public boolean isRecursive()
Description copied from interface: JDOPredicateIF
INTERNAL:

Specified by:
isRecursive in interface JDOPredicateIF

prescan

public void prescan(QueryBuilder builder,
                    java.util.List arguments)
Description copied from interface: JDOPredicateIF
INTERNAL: This method will be called before building the query. It is used mainly for analyzing the predicate.

Specified by:
prescan in interface JDOPredicateIF

buildQuery

public boolean buildQuery(QueryBuilder builder,
                          java.util.List expressions,
                          java.util.List arguments)
                   throws InvalidQueryException
Description copied from interface: JDOPredicateIF
INTERNAL: Registers JDOExpressionsIF for this predicate with the query builder.

Specified by:
buildQuery in interface JDOPredicateIF
Returns:
true if predicate was mapped to JDO expression; false if the predicate could not be mapped to an JDO expression.
Throws:
InvalidQueryException


Copyright © 2000-2012 Ontopia.