mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
#304 - ElasticSearch integration part 1 / doc store integration
This commit is contained in:
1 parent
cb1fe297d6
commit
8d3b4a0407
209 files changed
+6736
-573
No files matched your search
@@ -8,6 +8,7 @@ import com.avaje.ebeaninternal.api.SpiExpressionValidation;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyDeploy;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
@@ -26,6 +27,22 @@ class AllEqualsExpression extends NonPrepareExpression {
|
||||
return propName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeElastic(ElasticExpressionContext context) throws IOException {
|
||||
|
||||
context.writeBoolMustStart();
|
||||
for (Map.Entry<String, Object> entry : propMap.entrySet()) {
|
||||
Object value = entry.getValue();
|
||||
String propName = entry.getKey();
|
||||
if (value == null) {
|
||||
context.writeExists(false, propName);
|
||||
} else {
|
||||
context.writeTerm(propName, value);
|
||||
}
|
||||
}
|
||||
context.writeBoolEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void containsMany(BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin) {
|
||||
if (propMap != null) {
|
||||
|
||||
Reference in new issue
Block a user