org.nakedobjects.runtime.persistence.query
Class PersistenceQueryFindByPattern

java.lang.Object
  extended by org.nakedobjects.runtime.persistence.query.PersistenceQueryAbstract
      extended by org.nakedobjects.runtime.persistence.query.PersistenceQueryBuiltInAbstract
          extended by org.nakedobjects.runtime.persistence.query.PersistenceQueryFindByPattern
All Implemented Interfaces:
Encodable, PersistenceQuery, PersistenceQueryBuiltIn

public class PersistenceQueryFindByPattern
extends PersistenceQueryBuiltInAbstract

Corresponds to QueryFindByPattern.


Constructor Summary
PersistenceQueryFindByPattern(NakedObjectSpecification specification, NakedObject pattern)
           
 
Method Summary
 NakedObject getPattern()
           
 boolean matches(NakedObject object)
          The built-in queries iterate over all instances.
 
Methods inherited from class org.nakedobjects.runtime.persistence.query.PersistenceQueryAbstract
encode, equals, getSpecification, getSpecificationLoader, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.runtime.persistence.query.PersistenceQuery
getSpecification
 

Constructor Detail

PersistenceQueryFindByPattern

public PersistenceQueryFindByPattern(NakedObjectSpecification specification,
                                     NakedObject pattern)
Method Detail

getPattern

public NakedObject getPattern()

matches

public boolean matches(NakedObject object)
Description copied from interface: PersistenceQueryBuiltIn
The built-in queries iterate over all instances.

This is similar to the Filter interface in the applib, except the filtering is done within the object store as opposed to be the DomainObjectContainer.

Object store implementations do not necessarily need to rely on this method. For example, an RDBMS-based implementation may use an alternative mechanism to determine the matching results, for example using a WHERE clause in some SQL query.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.