@Override public List<ToDoItem> findByAtPathAndComplete( final String atPath, final boolean complete) { return container.allMatches( new QueryDefault<>(ToDoItem.class, "findByAtPathAndComplete", "atPath", atPath, "complete", complete)); }
/** * @deprecated - use {@link org.apache.isis.applib.services.repository.RepositoryService#allMatches(Class, Predicate, long...)}. */ @Deprecated protected <T> List<T> allMatches(final Class<T> ofType, final Filter<? super T> filter, long... range) { return getContainer().allMatches(ofType, filter, range); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#allMatches(Class, Object) */ protected <T> List<T> allMatches(final Class<T> ofType, final T pattern) { return getContainer().allMatches(ofType, pattern); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#allMatches(Class, Filter) */ protected <T> List<T> allMatches(final Class<T> ofType, final Filter<? super T> filter) { return getContainer().allMatches(ofType, filter); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#allMatches(Class, String) */ protected <T> List<T> allMatches(final Class<T> ofType, final String title) { return getContainer().allMatches(ofType, title); }
/** * Convenience method that delegates to {@link DomainObjectContainer}. * * @see DomainObjectContainer#allMatches(Query) */ protected <T> List<T> allMatches(final Query<T> query) { return getContainer().allMatches(query); }
@Override public List<ToDoItem> findByAtPathAndDescriptionContains( final String atPath, final String description) { return container.allMatches( new QueryDefault<>(ToDoItem.class, "findByAtPathAndDescriptionContains", "atPath", atPath, "description", description)); }
/** * Returns all the instances that match the given {@link Query}. * * <p> * If there are no instances the list will be empty. This method creates a * new {@link List} object each time it is called so the caller is free to * use or modify the returned {@link List}, but the changes will not be * reflected back to the repository. * </p> * * <p> * The method simply delegates to the {@link DomainObjectContainer}. * </p> * * @see DomainObjectContainer#allMatches(Query) * * @deprecated - use {@link org.apache.isis.applib.services.repository.RepositoryService#allMatches(Query)} */ @Deprecated protected <T> List<T> allMatches(final Query<T> query) { return getContainer().allMatches(query); }
return getContainer().allMatches(ofType, title, range);
@Programmatic public List<ToDoItem> findByAtPathAndCategory(final String atPath, final Category category) { return container.allMatches( new QueryDefault<>(ToDoItem.class, "findByAtPathAndCategory", "atPath", atPath, "category", category)); }
return getContainer().allMatches(ofType, pattern, range);
@Programmatic protected <T> List<T> allMatches(final Class<T> ofType, final Predicate<? super T> predicate, long... range) { return getContainer().allMatches(ofType, predicate, range);
@Action(semantics = SemanticsOf.SAFE) @ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT) @MemberOrder(sequence = "2") public List<SimpleObject> findByName(@ParameterLayout(named = "Name") final String name) { return container.allMatches(new QueryDefault<>(SimpleObject.class, "findByName", "name", name)); }
@SuppressWarnings("unchecked") @Action(semantics = SemanticsOf.SAFE) @ActionLayout( cssClassFa = "fa fa-question", bookmarking = BookmarkPolicy.AS_ROOT ) @MemberOrder(sequence = "40") public List<ToDoItem> categorized( final Category category, final Subcategory subcategory, @ParameterLayout(named="Completed?") final boolean completed) { // an example "naive" implementation (filtered in Java code, not DBMS) return container.allMatches(ToDoItem.class, Predicates.and( ToDoItem.Predicates.thoseWithAtPath(currentUsersAtPath()), ToDoItem.Predicates.thoseCompleted(completed), ToDoItem.Predicates.thoseCategorised(category, subcategory))); } public Category default0Categorized() {