Interface Queryable<S,Q extends com.github.rutledgepaulv.qbuilders.builders.QBuilder<Q>>
-
- Type Parameters:
S
- - return typeQ
- - metadata type
- All Known Subinterfaces:
EntityChangelogService
,EntitySchemaService
,EntityService
,GroupService
,HierarchyChangelogService
,HierarchyService
,HierarchyVariablesChangelogService
,PartitionResourceHistoryService
,PartitionResourceService
,PartitionService
,SystemSpecService
,VariableChangelogService
,VariableConfigChangelogService
,VariableService
- All Known Implementing Classes:
AbstractProvider
,GroupProvider
,HierarchyChangelogProvider
,HierarchyVariablesChangelogProvider
,PartitionResourceHistoryProvider
public interface Queryable<S,Q extends com.github.rutledgepaulv.qbuilders.builders.QBuilder<Q>>
Query interface defining methods available on all services used for searching. There are 2 methods: search for multiple values and search for one value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<S>
findAll(com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Searching for multiple values.java.util.Optional<S>
findById(long id)
java.util.Optional<S>
findOne(com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Searching for one value.
-
-
-
Method Detail
-
findAll
java.util.Set<S> findAll(com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Searching for multiple values.- Parameters:
condition
-- Returns:
-
findOne
java.util.Optional<S> findOne(com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Searching for one value. If the metadata returns multiple values the exception is thrown (@seeIllegalStateException
)- Parameters:
condition
-- Returns:
- Optional with value or empty.
- Throws:
java.lang.IllegalStateException
- if found multiple values.
-
findById
java.util.Optional<S> findById(long id)
-
-