Package org.hcjf.layers.query
Interface Queryable
-
- All Superinterfaces:
BsonParcelable
- All Known Implementing Classes:
ParameterizedQuery,Query
public interface Queryable extends BsonParcelable
- Author:
- javaito
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceQueryable.Consumer<O>This class provides an interface to consume a different collection of naming data to be useful in evaluation process.static interfaceQueryable.DataSource<O>This interface must implements a provider to obtain the data collection for diferents resources.static classQueryable.DefaultConsumer<O>static classQueryable.IntrospectionConsumer<O>This private class is the default consume method of the queries.static classQueryable.ReadableDataSourceThis data source find all the resources that implementsReadRowsLayerInterfaceinterface-
Nested classes/interfaces inherited from interface org.hcjf.utils.bson.BsonParcelable
BsonParcelable.Builder
-
-
Field Summary
-
Fields inherited from interface org.hcjf.utils.bson.BsonParcelable
MAP_KEYS_FIELD_NAME, MAP_VALUES_FIELD_NAME, PARCELABLE_CLASS_NAME
-
-
Method Summary
Modifier and Type Method Description <O> java.util.Collection<O>evaluate(java.util.Collection<O> dataSource)This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted.<O> java.util.Collection<O>evaluate(java.util.Collection<O> dataSource, Queryable.Consumer<O> consumer)This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted.<O> java.util.Collection<O>evaluate(Queryable.DataSource<O> dataSource)This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted.<O> java.util.Collection<O>evaluate(Queryable.DataSource<O> dataSource, Queryable.Consumer<O> consumer)This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted.java.lang.StringgetResourceName()Return the resource name.-
Methods inherited from interface org.hcjf.utils.bson.BsonParcelable
fromBson, fromBson, fromBson, populate, toBson, toBson, toBson, toBson, typeFromBson
-
-
-
-
Method Detail
-
getResourceName
java.lang.String getResourceName()
Return the resource name.- Returns:
- Resource name.
-
evaluate
<O> java.util.Collection<O> evaluate(java.util.Collection<O> dataSource)
This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted. If there are order fields added then the result implementation is aTreeSetimplementation else the result implementation is aLinkedHashSetimplementation in order to guarantee the data order from the source- Type Parameters:
O- Kind of instances of the data collection.- Parameters:
dataSource- Data source to evaluate the query.- Returns:
- Result add filtered and sorted.
-
evaluate
<O> java.util.Collection<O> evaluate(java.util.Collection<O> dataSource, Queryable.Consumer<O> consumer)This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted. If there are order fields added then the result implementation is aTreeSetimplementation else the result implementation is aLinkedHashSetimplementation in order to guarantee the data order from the source- Type Parameters:
O- Kind of instances of the data collection.- Parameters:
dataSource- Data source to evaluate the query.consumer- Data source consumer.- Returns:
- Result add filtered and sorted.
-
evaluate
<O> java.util.Collection<O> evaluate(Queryable.DataSource<O> dataSource)
This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted. If there are order fields added then the result implementation is aTreeSetimplementation else the result implementation is aLinkedHashSetimplementation in order to guarantee the data order from the source- Type Parameters:
O- Kind of instances of the data collection.- Parameters:
dataSource- Data source to evaluate the query.- Returns:
- Result add filtered and sorted.
-
evaluate
<O> java.util.Collection<O> evaluate(Queryable.DataSource<O> dataSource, Queryable.Consumer<O> consumer)
This method evaluate each object of the collection and sort filtered object to create a result add with the object filtered and sorted. If there are order fields added then the result implementation is aTreeSetimplementation else the result implementation is aLinkedHashSetimplementation in order to guarantee the data order from the source- Type Parameters:
O- Kind of instances of the data collection.- Parameters:
dataSource- Data source to evaluate the query.consumer- Data source consumer.- Returns:
- Result add filtered and sorted.
-
-