/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#uniqueMatch(Class, String) */ protected <T> T uniqueMatch(final Class<T> ofType, final String title) { return getContainer().uniqueMatch(ofType, title); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#uniqueMatch(Class, Object) */ protected <T> T uniqueMatch(final Class<T> ofType, final T pattern) { return getContainer().uniqueMatch(ofType, pattern); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#uniqueMatch(Class, Filter) */ protected <T> T uniqueMatch(final Class<T> ofType, final Filter<T> filter) { return getContainer().uniqueMatch(ofType, filter); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#uniqueMatch(Query) */ protected <T> T uniqueMatch(final Query<T> query) { return getContainer().uniqueMatch(query); }
/** * @deprecated - use {@link org.apache.isis.applib.services.repository.RepositoryService#uniqueMatch(Class, Predicate)} */ @Deprecated protected <T> T uniqueMatch(final Class<T> ofType, final Filter<T> filter) { return getContainer().uniqueMatch(ofType, filter); }
/** * Find the only instance of the specified type (including subtypes) that * has the specified title. * * <p> * If no instance is found then <tt>null</tt> will be return, while if there * is more that one instances a run-time exception will be thrown. * * <p> * This method is useful during exploration/prototyping, but - because the filtering is performed client-side - * this method is only really suitable for initial development/prototyping, or for classes with very few * instances. Use {@link #uniqueMatch(Query)} for production code. * </p> * * <p> * The method simply delegates to the {@link DomainObjectContainer}. * </p> * * @see DomainObjectContainer#uniqueMatch(Class, Predicate) * * @deprecated - use {@link org.apache.isis.applib.services.repository.RepositoryService#uniqueMatch(Class, Predicate)} */ @Deprecated protected <T> T uniqueMatch(final Class<T> ofType, final Predicate<T> predicate) { return getContainer().uniqueMatch(ofType, predicate); }
/** * Find the only instance of the specified type (including subtypes) that * has the specified title. * * <p> * If no instance is found then <tt>null</tt> will be returned, while if * there is more that one instances a run-time exception will be thrown. * * <p> * This method is useful during exploration/prototyping, but - because the filtering is performed client-side - * this method is only really suitable for initial development/prototyping, or for classes with very few * instances. Use {@link #uniqueMatch(Query)} for production code. * </p> * * <p> * The method simply delegates to the {@link DomainObjectContainer}. * </p> * * @see DomainObjectContainer#uniqueMatch(Class, String) * * @deprecated - convert to use {@link org.apache.isis.applib.services.repository.RepositoryService#uniqueMatch(Class, Predicate)} instead */ @Deprecated protected <T> T uniqueMatch(final Class<T> ofType, final String title) { return getContainer().uniqueMatch(ofType, title); }
/** * Find the only instance that matches the provided query. * * <p> * If no instance is found then null will be return, while if there is more * that one instances a run-time exception will be thrown. * </p> * * <p> * This method is the recommended way of querying for (precisely) one instance. See also {@link #firstMatch(Query)} * for less strict querying. * </p> * * <p> * The method simply delegates to the {@link DomainObjectContainer}. * </p> * * @see #firstMatch(Query) * @see DomainObjectContainer#uniqueMatch(Query) * * @deprecated - use {@link org.apache.isis.applib.services.repository.RepositoryService#uniqueMatch(Query)} */ @Deprecated protected <T> T uniqueMatch(final Query<T> query) { return getContainer().uniqueMatch(query); }
/** * Find the only instance of the patterned object type (including subtypes) * that matches the set fields in the pattern object: where any property * that is set will be tested and properties that are not set will be * ignored. * * <p> * If no instance is found then null will be return, while if there is more * that one instances a run-time exception will be thrown. * </p> * * <p> * This method is useful during exploration/prototyping, but - because the filtering is performed client-side - * this method is only really suitable for initial development/prototyping, or for classes with very few * instances. Use {@link #uniqueMatch(Query)} for production code. * </p> * * <p> * The method simply delegates to the {@link DomainObjectContainer}. * </p> * * @see DomainObjectContainer#uniqueMatch(Class, Object) * @deprecated - convert to use {@link org.apache.isis.applib.services.repository.RepositoryService#uniqueMatch(Class, Predicate)} instead */ @Deprecated protected <T> T uniqueMatch(final Class<T> ofType, final T pattern) { return getContainer().uniqueMatch(ofType, pattern); }