mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#589 - ElasticSearch - DocStoreMode renamed from DocStoreEvent
This commit is contained in:
1 parent
32bcd5e853
commit
a0609b1726
15 files changed
+75
-108
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package com.avaje.ebeanservice.docstore.api;
|
||||
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.ebean.annotation.DocStoreEvent;
|
||||
import com.avaje.ebean.annotation.DocStoreMode;
|
||||
import com.avaje.ebean.plugin.BeanDocType;
|
||||
import com.avaje.ebeaninternal.server.core.PersistRequest;
|
||||
import com.avaje.ebeaninternal.server.core.PersistRequestBean;
|
||||
@@ -47,7 +47,7 @@ public interface DocStoreBeanAdapter<T> extends BeanDocType<T> {
|
||||
* <p>
|
||||
* Some transactions (like bulk updates) might specifically turn off indexing for example.
|
||||
*/
|
||||
DocStoreEvent getEvent(PersistRequest.Type persistType, DocStoreEvent txnMode);
|
||||
DocStoreMode getMode(PersistRequest.Type persistType, DocStoreMode txnMode);
|
||||
|
||||
/**
|
||||
* Return the index type for this bean type.
|
||||
|
||||
+11
-11
@@ -3,7 +3,7 @@ package com.avaje.ebeanservice.docstore.api.support;
|
||||
import com.avaje.ebean.FetchPath;
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.ebean.annotation.DocStore;
|
||||
import com.avaje.ebean.annotation.DocStoreEvent;
|
||||
import com.avaje.ebean.annotation.DocStoreMode;
|
||||
import com.avaje.ebean.text.PathProperties;
|
||||
import com.avaje.ebeaninternal.api.SpiEbeanServer;
|
||||
import com.avaje.ebeaninternal.server.core.PersistRequest;
|
||||
@@ -69,17 +69,17 @@ public abstract class DocStoreBeanBaseAdapter<T> implements DocStoreBeanAdapter<
|
||||
/**
|
||||
* Behavior on insert.
|
||||
*/
|
||||
protected final DocStoreEvent insert;
|
||||
protected final DocStoreMode insert;
|
||||
|
||||
/**
|
||||
* Behavior on update.
|
||||
*/
|
||||
protected final DocStoreEvent update;
|
||||
protected final DocStoreMode update;
|
||||
|
||||
/**
|
||||
* Behavior on delete.
|
||||
*/
|
||||
protected final DocStoreEvent delete;
|
||||
protected final DocStoreMode delete;
|
||||
|
||||
/**
|
||||
* List of embedded paths from other documents that include this document type.
|
||||
@@ -267,17 +267,17 @@ public abstract class DocStoreBeanBaseAdapter<T> implements DocStoreBeanAdapter<
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocStoreEvent getEvent(PersistRequest.Type persistType, DocStoreEvent txnMode) {
|
||||
public DocStoreMode getMode(PersistRequest.Type persistType, DocStoreMode txnMode) {
|
||||
|
||||
if (txnMode == null) {
|
||||
return getDocStoreEvent(persistType);
|
||||
} else if (txnMode == DocStoreEvent.IGNORE) {
|
||||
return DocStoreEvent.IGNORE;
|
||||
return getMode(persistType);
|
||||
} else if (txnMode == DocStoreMode.IGNORE) {
|
||||
return DocStoreMode.IGNORE;
|
||||
}
|
||||
return mapped ? txnMode : getDocStoreEvent(persistType);
|
||||
return mapped ? txnMode : getMode(persistType);
|
||||
}
|
||||
|
||||
private DocStoreEvent getDocStoreEvent(PersistRequest.Type persistType) {
|
||||
private DocStoreMode getMode(PersistRequest.Type persistType) {
|
||||
switch (persistType) {
|
||||
case INSERT:
|
||||
return insert;
|
||||
@@ -286,7 +286,7 @@ public abstract class DocStoreBeanBaseAdapter<T> implements DocStoreBeanAdapter<
|
||||
case DELETE:
|
||||
return delete;
|
||||
default:
|
||||
return DocStoreEvent.IGNORE;
|
||||
return DocStoreMode.IGNORE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user