public class SingleResultFinder extends java.lang.Object implements FinderMethod, QueryBuildingFinder
Implements every dynamic finder that returns a single result: findBy*, the
find<booleanProperty>By* boolean-clause form, findOrCreateBy* and
findOrSaveBy* - configured via static factory methods rather than subclassed, composing
a DynamicFinder grammar instead of extending it.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Query |
buildQuery(DynamicFinderInvocation invocation, Session session) |
|
public static SingleResultFinder |
findBy(Datastore datastore) |
|
public static SingleResultFinder |
findBy(DatastoreResolver datastoreResolver, MappingContext mappingContext) |
|
public static SingleResultFinder |
findBy(MappingContext mappingContext) |
|
public static SingleResultFinder |
findByBoolean(Datastore datastore) |
|
public static SingleResultFinder |
findByBoolean(DatastoreResolver datastoreResolver, MappingContext mappingContext) |
|
public static SingleResultFinder |
findByBoolean(MappingContext mappingContext) |
|
public static SingleResultFinder |
findOrCreateBy(Datastore datastore) |
|
public static SingleResultFinder |
findOrCreateBy(DatastoreResolver datastoreResolver, MappingContext mappingContext) |
|
public static SingleResultFinder |
findOrCreateBy(MappingContext mappingContext) |
|
public static SingleResultFinder |
findOrSaveBy(Datastore datastore) |
|
public static SingleResultFinder |
findOrSaveBy(DatastoreResolver datastoreResolver, MappingContext mappingContext) |
|
public static SingleResultFinder |
findOrSaveBy(MappingContext mappingContext) |
|
public java.lang.Object |
invoke(java.lang.Class clazz, java.lang.String methodName, java.lang.Object[] arguments) |
|
public java.lang.Object |
invoke(java.lang.Class clazz, java.lang.String methodName, groovy.lang.Closure additionalCriteria, java.lang.Object[] arguments) |
|
public java.lang.Object |
invoke(java.lang.Class clazz, java.lang.String methodName, DetachedCriteria detachedCriteria, java.lang.Object[] arguments)Not part of FinderMethod - called reflectively (dynamic Groovy dispatch) by AbstractDetachedCriteria.methodMissing, which invokes a matched dynamic finder with the detached criteria instance itself as the "extra" argument so its accumulated criteria/projections/orders get merged into the built query. |
|
public boolean |
isMethodMatch(java.lang.String methodName) |
|
public void |
setPattern(java.lang.String pattern) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Not part of FinderMethod - called reflectively (dynamic Groovy dispatch) by AbstractDetachedCriteria.methodMissing, which invokes a matched dynamic finder with the detached criteria instance itself as the "extra" argument so its accumulated criteria/projections/orders get merged into the built query.
clazz - The persistent classmethodName - The method namedetachedCriteria - The detached criteria to merge into the built queryarguments - The method call arguments