public class ElasticConstraint extends Constraint
ElasticQuery
and most probably generated by
ElasticFilterFactory
.Elastic.FILTERS
Constructor and Description |
---|
ElasticConstraint(com.alibaba.fastjson.JSONObject constraint)
Creates a new constraint represented as JSON.
|
Modifier and Type | Method and Description |
---|---|
void |
asString(StringBuilder builder)
Creates a string representation of this constraint.
|
ElasticConstraint |
named(String name)
Makes this constraint a named query.
|
com.alibaba.fastjson.JSONObject |
toJSON() |
toString
public ElasticConstraint(com.alibaba.fastjson.JSONObject constraint)
constraint
- the JSON making up the constraintpublic ElasticConstraint named(String name)
name
- the name of the querypublic void asString(StringBuilder builder)
Constraint
asString
in class Constraint
builder
- the target to write the string representation topublic com.alibaba.fastjson.JSONObject toJSON()
Copyright © 2018. All rights reserved.