Package org.hcjf.layers.query
Class BaseEvaluator
- java.lang.Object
-
- org.hcjf.layers.query.BaseEvaluator
-
- All Implemented Interfaces:
Evaluator
- Direct Known Subclasses:
BooleanEvaluator,FieldEvaluator
public abstract class BaseEvaluator extends java.lang.Object implements Evaluator
- Author:
- javaito
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseEvaluator.QueryValueThis kind of query value represents a sub-query.static classBaseEvaluator.ReplaceableValueReturn the object that is in the specific position into the parameters array.static interfaceBaseEvaluator.UnprocessedValueThis kind of values take the true value in the execution time of the query.
-
Constructor Summary
Constructors Constructor Description BaseEvaluator()
-
Method Summary
Modifier and Type Method Description java.util.List<Query.QueryField>getEvaluatorFields()This method returns the list of fields that are present into the evaluator.protected java.lang.ObjectgetProcessedValue(java.lang.Object currentResultSetElement, java.lang.Object rawValue, Queryable.DataSource dataSource, Queryable.Consumer consumer)Return the value to compare with the field's object of the data collection's instance.booleanisTrueForced()This method indicate that the evaluator is forced to returns true;voidsetEvaluatorFields(java.util.List<Query.QueryField> evaluatorFields)This method set the list of fields present into the evaluator.voidsetTrueForced(boolean trueForced)Set if the evaluator id forced to return true or not.
-
-
-
Method Detail
-
isTrueForced
public boolean isTrueForced()
This method indicate that the evaluator is forced to returns true;- Returns:
- True if the evaluator is forced and false in the otherwise.
-
setTrueForced
public void setTrueForced(boolean trueForced)
Set if the evaluator id forced to return true or not.- Parameters:
trueForced- True id the evaluator id forced and false in the otherwise.
-
getEvaluatorFields
public final java.util.List<Query.QueryField> getEvaluatorFields()
This method returns the list of fields that are present into the evaluator.- Returns:
- List of the fields present into the evaluator.
-
setEvaluatorFields
public final void setEvaluatorFields(java.util.List<Query.QueryField> evaluatorFields)
This method set the list of fields present into the evaluator.- Parameters:
evaluatorFields- List of fields present into the evaluator.
-
getProcessedValue
protected final java.lang.Object getProcessedValue(java.lang.Object currentResultSetElement, java.lang.Object rawValue, Queryable.DataSource dataSource, Queryable.Consumer consumer)Return the value to compare with the field's object of the data collection's instance.- Parameters:
currentResultSetElement- Is the result set element to evaluate.dataSource- Query associated data source.consumer- Query associated data consumer.rawValue- Raw value- Returns:
- Object value.
-
-