@CompileStatic class RxSingleResultFinder extends java.lang.Object implements FinderMethod
Implements every RxGORM dynamic finder that returns a single result: findBy*, the
find<booleanProperty>By* boolean-clause form, findOrCreateBy* and
findOrSaveBy* - the rx-module mirror of SingleResultFinder,
composing the same DynamicFinder grammar class rather than extending core's finder
classes as the previous per-type rx finder classes did.
Unlike the sync side, there is no Session/Datastore.execute concept here -
queries are built directly via RxDatastoreClient#createQuery#createQuery, and results are
rx.Observables. The findOrCreateBy*/findOrSaveBy* empty-result handling
(construct-and-maybe-save via Observable.switchIfEmpty) is preserved exactly as it
existed in the previous per-type classes, including that it does NOT perform the
Or-operator/comparison-expression rejection the synchronous SingleResultFinder does -
that was already a pre-existing inconsistency between the sync and rx implementations, not
something introduced or fixed by this refactor.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static RxSingleResultFinder |
findBy(RxDatastoreClient datastoreClient) |
|
static RxSingleResultFinder |
findByBoolean(RxDatastoreClient datastoreClient) |
|
static RxSingleResultFinder |
findOrCreateBy(RxDatastoreClient datastoreClient) |
|
static RxSingleResultFinder |
findOrSaveBy(RxDatastoreClient datastoreClient) |
|
java.lang.Object |
invoke(java.lang.Class clazz, java.lang.String methodName, java.lang.Object[] arguments) |
|
java.lang.Object |
invoke(java.lang.Class clazz, java.lang.String methodName, Closure additionalCriteria, java.lang.Object[] arguments) |
|
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. |
|
boolean |
isMethodMatch(java.lang.String methodName) |
|
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. Typed
against core's DetachedCriteria - not rx's own grails.gorm.rx.DetachedCriteria
- because DynamicFinderInvocation.setDetachedCriteria itself only accepts that type,
exactly matching what the previous per-type rx finder classes had available via inheriting
this same overload from core's DynamicFinder. Preserved as-is, not "fixed", since
changing this narrow typing is outside the scope of this refactor.