diff --git a/src/main/java/org/codelibs/fess/es/config/allcommon/EsAbstractBehavior.java b/src/main/java/org/codelibs/fess/es/config/allcommon/EsAbstractBehavior.java index aebf4938649e2a8c902f80a9d90415f232c4ea3d..595e3a6d02005f14c8685f6f098fc8b1a2cd9756 100644 --- a/src/main/java/org/codelibs/fess/es/config/allcommon/EsAbstractBehavior.java +++ b/src/main/java/org/codelibs/fess/es/config/allcommon/EsAbstractBehavior.java @@ -361,16 +361,27 @@ public abstract class EsAbstractBehavior int[] delegateBatchRequest(final List entityList, Function call) { - final BulkList bulkList = (BulkList) entityList; + @SuppressWarnings("unchecked") + final BulkList bulkList = (BulkList) entityList; + final RequestOptionCall builderEntityCall = bulkList.getEntityCall(); final BulkRequestBuilder bulkBuilder = client.prepareBulk(); for (final Entity entity : entityList) { final EsAbstractEntity esEntity = (EsAbstractEntity) entity; BUILDER builder = call.apply(esEntity); if (builder instanceof IndexRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((IndexRequestBuilder) builder); } else if (builder instanceof UpdateRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((UpdateRequestBuilder) builder); } else if (builder instanceof DeleteRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((DeleteRequestBuilder) builder); } } @@ -424,14 +435,17 @@ public abstract class EsAbstractBehavior implements List { + public static class BulkList implements List { private final List parent; private final RequestOptionCall call; - public BulkList(final List parent, final RequestOptionCall call) { + private final RequestOptionCall entityCall; + + public BulkList(final List parent, final RequestOptionCall call, final RequestOptionCall entityCall) { this.parent = parent; + this.entityCall = entityCall; this.call = call; } @@ -538,5 +552,9 @@ public abstract class EsAbstractBehavior getCall() { return call; } + + public RequestOptionCall getEntityCall() { + return entityCall; + } } } diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBadWordBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBadWordBhv.java index ef2d22ecf479216ef65ed942c707d1da92a115de..4e5049e218838e614fc3be5efd4732c747e0a0ee 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBadWordBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBadWordBhv.java @@ -226,27 +226,42 @@ public abstract class BsBadWordBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBoostDocumentRuleBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBoostDocumentRuleBhv.java index 24bfcfc922e504e36efa260fa5b7bfa237a0a8f8..a5244da53886de0bcdb819e62a8cde03967e9f35 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBoostDocumentRuleBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsBoostDocumentRuleBhv.java @@ -227,27 +227,42 @@ public abstract class BsBoostDocumentRuleBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoBhv.java index c7c993b49e1a8acb192d14aaf5039c941a98ba0d..e7359ad9ab00f7fc0cd6b3c9dcebf062f0fc3c13 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoBhv.java @@ -223,27 +223,42 @@ public abstract class BsCrawlingInfoBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoParamBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoParamBhv.java index 951af51c43d17c9d8a0a7559c3ae610e2537a85b..41ddd49c39360efa75f0bcbc8c34b8c8ca51635d 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoParamBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsCrawlingInfoParamBhv.java @@ -224,27 +224,42 @@ public abstract class BsCrawlingInfoParamBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigBhv.java index ccf95c26b15046ebb47630e79291b5b939948202..6d2a66237525277c3083f5c6538a566a3723fca0 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigBhv.java @@ -230,27 +230,42 @@ public abstract class BsDataConfigBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToLabelBhv.java index a8b857e6286e37fb50746f175a56e2fd6aa82d9c..b9074f2bdaa714c96fd331b676891968bd36bbe0 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToLabelBhv.java @@ -222,27 +222,42 @@ public abstract class BsDataConfigToLabelBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToRoleBhv.java index 3324e475ef0c89a293197d1424e70388b37a489c..754666745ff5d6525176058b87fc3553a53d08d5 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigToRoleBhv.java @@ -222,27 +222,42 @@ public abstract class BsDataConfigToRoleBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDuplicateHostBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDuplicateHostBhv.java index 1cc9e62afed3db3fdd8d9c6eea7fa9365703bdb2..46f92cde791d75dc33fb4e575f59dae94856f437 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDuplicateHostBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsDuplicateHostBhv.java @@ -226,27 +226,42 @@ public abstract class BsDuplicateHostBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordBhv.java index 8f3dedd840744508e9228e3beb62c15d68c16c8d..9d1e50907c635c07cfec999db46a80aebf66220d 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordBhv.java @@ -228,27 +228,42 @@ public abstract class BsElevateWordBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordToLabelBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordToLabelBhv.java index c508738e1837dfbeac2bbc0960e9f31631f6c976..66d59d7a4f96021505bfc0b912e77b96c4b2ea01 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsElevateWordToLabelBhv.java @@ -222,27 +222,42 @@ public abstract class BsElevateWordToLabelBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFailureUrlBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFailureUrlBhv.java index c6f35f01573328fe02c06617cfd8343baf832aef..ded6e43f2c90f8ce0811ddb1f818eddb2a16ca84 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFailureUrlBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFailureUrlBhv.java @@ -226,27 +226,42 @@ public abstract class BsFailureUrlBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileAuthenticationBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileAuthenticationBhv.java index 427ee5ec715fc7984b8a9e5f8c8d53b130acbb58..190ba5826f19404572365ea27837a339b63789e8 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileAuthenticationBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileAuthenticationBhv.java @@ -231,27 +231,42 @@ public abstract class BsFileAuthenticationBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigBhv.java index 1255e4e3f06055208676b07fd6c37a658cd03eaf..b8a0015704a7832908284f6ce2205a64ed486ba9 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigBhv.java @@ -238,27 +238,42 @@ public abstract class BsFileConfigBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToLabelBhv.java index 00673fcebb3fde3dc5ae0c62531dd8b3557602ed..273daea6942bc244867bf28797a747882df3c4d8 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToLabelBhv.java @@ -222,27 +222,42 @@ public abstract class BsFileConfigToLabelBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToRoleBhv.java index 440375a7affb72d103e0687c6dd1e77f47f2bd3e..59ceab5dfb42da88de74a327b726e98c655f0b8c 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigToRoleBhv.java @@ -222,27 +222,42 @@ public abstract class BsFileConfigToRoleBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsJobLogBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsJobLogBhv.java index 8d8973459bb99e6f117550757de9781b1c08def7..4893c89ed0d49285cd1b8ed43acfc8e671ef5c10 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsJobLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsJobLogBhv.java @@ -227,27 +227,42 @@ public abstract class BsJobLogBhv extends EsAbstractBehavior { } public int[] batchInsert(List list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsKeyMatchBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsKeyMatchBhv.java index 58b062aa272025343ccf81d5a27e22ef5499e45f..38fb47037cab66a419d65f2c946875d813486947 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsKeyMatchBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsKeyMatchBhv.java @@ -227,27 +227,42 @@ public abstract class BsKeyMatchBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelToRoleBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelToRoleBhv.java index 299e2a0378b4c0e1333d57c4ab8cbd8fcf3a2773..06bf5345b770eda0ff767a8cced1f7134534050b 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelToRoleBhv.java @@ -221,27 +221,42 @@ public abstract class BsLabelToRoleBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelTypeBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelTypeBhv.java index bb73b99f6a2931a36fa1ae4cf42e6ec29a9b7b6a..07f1cf6e7478acfc88eebef54280750942f1c832 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelTypeBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsLabelTypeBhv.java @@ -228,27 +228,42 @@ public abstract class BsLabelTypeBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsPathMappingBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsPathMappingBhv.java index cafc2dad512eda7be26a31b08dfa1a12d92af4db..13d650a0f81a4de1b474b11af08a4297df448f35 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsPathMappingBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsPathMappingBhv.java @@ -227,27 +227,42 @@ public abstract class BsPathMappingBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRequestHeaderBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRequestHeaderBhv.java index 922b605e3850f1783f41bd7a95c6b585212df5ad..99e493043f010ab86dace21ab85cea23cbf6ee7f 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRequestHeaderBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRequestHeaderBhv.java @@ -226,27 +226,42 @@ public abstract class BsRequestHeaderBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRoleTypeBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRoleTypeBhv.java index d51a6b3048c71234b35da259cdd82089e7241bdc..1797f3e3cc27c2b8d2b8aef58942f3bc3ccd562f 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRoleTypeBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsRoleTypeBhv.java @@ -226,27 +226,42 @@ public abstract class BsRoleTypeBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsScheduledJobBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsScheduledJobBhv.java index 7008843be9221b1f569370089d76e4644ff9b478..60c1e80ee8404b988482deafbb490b5586bdc0b1 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsScheduledJobBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsScheduledJobBhv.java @@ -232,27 +232,42 @@ public abstract class BsScheduledJobBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebAuthenticationBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebAuthenticationBhv.java index 964e17c4dcdddd6f4b5f3d8930a8f0eaced50f68..3e7cb1be687ea0c4464c6f74d62b64472a154549 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebAuthenticationBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebAuthenticationBhv.java @@ -232,27 +232,42 @@ public abstract class BsWebAuthenticationBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigBhv.java index 1c5b26120a1ca0b0c8dac51870dda51fd74e7156..d0e1e18ebb97c423c0a676e09c3827f38969c82c 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigBhv.java @@ -239,27 +239,42 @@ public abstract class BsWebConfigBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToLabelBhv.java index 51d84564e1c76ed79701e58962e29fb7e46e3d60..05ac4a9a1ba3b904e8d0e3991ab8a5a64ebce612 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToLabelBhv.java @@ -222,27 +222,42 @@ public abstract class BsWebConfigToLabelBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToRoleBhv.java index ba2b7d3133b156915f9c4adc7f80b87af584ebd4..5d4b5c0ec798ff42abd77ca496e4c57431d2fba2 100644 --- a/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/config/bsbhv/BsWebConfigToRoleBhv.java @@ -222,27 +222,42 @@ public abstract class BsWebConfigToRoleBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/allcommon/EsAbstractBehavior.java b/src/main/java/org/codelibs/fess/es/log/allcommon/EsAbstractBehavior.java index 61e29b9172b9287c3a13c16f2958d89014518a09..818e1172f626657e62d070e8b2fa001d77d185c9 100644 --- a/src/main/java/org/codelibs/fess/es/log/allcommon/EsAbstractBehavior.java +++ b/src/main/java/org/codelibs/fess/es/log/allcommon/EsAbstractBehavior.java @@ -361,16 +361,27 @@ public abstract class EsAbstractBehavior int[] delegateBatchRequest(final List entityList, Function call) { - final BulkList bulkList = (BulkList) entityList; + @SuppressWarnings("unchecked") + final BulkList bulkList = (BulkList) entityList; + final RequestOptionCall builderEntityCall = bulkList.getEntityCall(); final BulkRequestBuilder bulkBuilder = client.prepareBulk(); for (final Entity entity : entityList) { final EsAbstractEntity esEntity = (EsAbstractEntity) entity; BUILDER builder = call.apply(esEntity); if (builder instanceof IndexRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((IndexRequestBuilder) builder); } else if (builder instanceof UpdateRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((UpdateRequestBuilder) builder); } else if (builder instanceof DeleteRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((DeleteRequestBuilder) builder); } } @@ -424,14 +435,17 @@ public abstract class EsAbstractBehavior implements List { + public static class BulkList implements List { private final List parent; private final RequestOptionCall call; - public BulkList(final List parent, final RequestOptionCall call) { + private final RequestOptionCall entityCall; + + public BulkList(final List parent, final RequestOptionCall call, final RequestOptionCall entityCall) { this.parent = parent; + this.entityCall = entityCall; this.call = call; } @@ -538,5 +552,9 @@ public abstract class EsAbstractBehavior getCall() { return call; } + + public RequestOptionCall getEntityCall() { + return entityCall; + } } } diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsClickLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsClickLogBhv.java index 0ddc3779ae27b0521ccfced38791baaeec7260eb..b88cdbae6dd227fe4b10dc35b270fa115f572471 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsClickLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsClickLogBhv.java @@ -226,27 +226,42 @@ public abstract class BsClickLogBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsEventLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsEventLogBhv.java index 7c8f1e173e8f1545fa5fdde7292f3be1e811b7e6..d3a4e01dd108546ed48562efd92c4579163f84be 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsEventLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsEventLogBhv.java @@ -224,27 +224,42 @@ public abstract class BsEventLogBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsFavoriteLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsFavoriteLogBhv.java index 5c7c0ec33cf8af4f72e509422feef7f69b24f624..518c2066fe2311a22888c274dc96ab3a433c0390 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsFavoriteLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsFavoriteLogBhv.java @@ -224,27 +224,42 @@ public abstract class BsFavoriteLogBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java index d6b5e44f7bd1a5b2364565891bf26f7e0bc063e1..d15d5d7b3b7252011ef2a2c4898aacdfc2cdf865 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java @@ -222,27 +222,42 @@ public abstract class BsSearchFieldLogBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java index 9e16ea3d250118145b1e97b937919b99211c4a9a..72807d1506f8b90e64043242c8ae29d9eab986aa 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java @@ -235,27 +235,42 @@ public abstract class BsSearchLogBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsUserInfoBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsUserInfoBhv.java index b2b1af49223e5803d586ac3bc627c3f331f569a8..7c248427819b3b3b486956fb1d1f65f4e7ef26f6 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsUserInfoBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsUserInfoBhv.java @@ -221,27 +221,42 @@ public abstract class BsUserInfoBhv extends EsAbstractBehavior list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, + RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java b/src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java index d7526854c77e840e716ed0966cbd6743372a846a..62eff78c696d515e80e264c9acc046fa5714f7de 100644 --- a/src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java +++ b/src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java @@ -361,16 +361,27 @@ public abstract class EsAbstractBehavior int[] delegateBatchRequest(final List entityList, Function call) { - final BulkList bulkList = (BulkList) entityList; + @SuppressWarnings("unchecked") + final BulkList bulkList = (BulkList) entityList; + final RequestOptionCall builderEntityCall = bulkList.getEntityCall(); final BulkRequestBuilder bulkBuilder = client.prepareBulk(); for (final Entity entity : entityList) { final EsAbstractEntity esEntity = (EsAbstractEntity) entity; BUILDER builder = call.apply(esEntity); if (builder instanceof IndexRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((IndexRequestBuilder) builder); } else if (builder instanceof UpdateRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((UpdateRequestBuilder) builder); } else if (builder instanceof DeleteRequestBuilder) { + if (builderEntityCall != null) { + builderEntityCall.callback(builder); + } bulkBuilder.add((DeleteRequestBuilder) builder); } } @@ -424,14 +435,17 @@ public abstract class EsAbstractBehavior implements List { + public static class BulkList implements List { private final List parent; private final RequestOptionCall call; - public BulkList(final List parent, final RequestOptionCall call) { + private final RequestOptionCall entityCall; + + public BulkList(final List parent, final RequestOptionCall call, final RequestOptionCall entityCall) { this.parent = parent; + this.entityCall = entityCall; this.call = call; } @@ -538,5 +552,9 @@ public abstract class EsAbstractBehavior getCall() { return call; } + + public RequestOptionCall getEntityCall() { + return entityCall; + } } } diff --git a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsGroupBhv.java b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsGroupBhv.java index ad65e64fa29b6ffd5e627e2107829fb08edbed1a..95ef3bf42ec557fd621f0b5ff3523292dc26212a 100644 --- a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsGroupBhv.java +++ b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsGroupBhv.java @@ -220,27 +220,39 @@ public abstract class BsGroupBhv extends EsAbstractBehavior { } public int[] batchInsert(List list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsRoleBhv.java b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsRoleBhv.java index ce1f91d0585ebcfb70ea649a186ea6b5b16b5e92..f05a45f1c7180c057198f1dbae2f8c13d44c44fa 100644 --- a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsRoleBhv.java @@ -220,27 +220,39 @@ public abstract class BsRoleBhv extends EsAbstractBehavior { } public int[] batchInsert(List list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove diff --git a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsUserBhv.java b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsUserBhv.java index 9e46789106de6aae7f6e65309adfe9916593be89..087139b14c8a35103c40e51c39375e68a53e9a54 100644 --- a/src/main/java/org/codelibs/fess/es/user/bsbhv/BsUserBhv.java +++ b/src/main/java/org/codelibs/fess/es/user/bsbhv/BsUserBhv.java @@ -223,27 +223,39 @@ public abstract class BsUserBhv extends EsAbstractBehavior { } public int[] batchInsert(List list) { - return batchInsert(list, null); + return batchInsert(list, null, null); } public int[] batchInsert(List list, RequestOptionCall call) { - return doBatchInsert(new BulkList<>(list, call), null); + return batchInsert(list, call, null); + } + + public int[] batchInsert(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchInsert(new BulkList<>(list, call, entityCall), null); } public int[] batchUpdate(List list) { - return batchUpdate(list, null); + return batchUpdate(list, null, null); } public int[] batchUpdate(List list, RequestOptionCall call) { - return doBatchUpdate(new BulkList<>(list, call), null); + return batchUpdate(list, call, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchUpdate(new BulkList<>(list, call, entityCall), null); } public int[] batchDelete(List list) { - return batchDelete(list, null); + return batchDelete(list, null, null); } public int[] batchDelete(List list, RequestOptionCall call) { - return doBatchDelete(new BulkList<>(list, call), null); + return batchDelete(list, call, null); + } + + public int[] batchDelete(List list, RequestOptionCall call, RequestOptionCall entityCall) { + return doBatchDelete(new BulkList<>(list, call, entityCall), null); } // #pending create, modify, remove