summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
deleted file mode 100644
index a9a2ce7cbb1..00000000000
--- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-package com.yahoo.schema.fieldoperation;
-
-import com.yahoo.schema.document.Case;
-import com.yahoo.schema.document.Dictionary;
-import com.yahoo.schema.document.SDField;
-
-/**
- * Represents operations controlling setup of dictionary used for queries
- *
- * @author baldersheim
- */
-public class DictionaryOperation implements FieldOperation {
- public enum Operation { HASH, BTREE, CASED, UNCASED }
- private final Operation operation;
-
- public DictionaryOperation(Operation type) {
- this.operation = type;
- }
- @Override
- public void apply(SDField field) {
- Dictionary dictionary = field.getOrSetDictionary();
- switch (operation) {
- case HASH:
- dictionary.updateType(Dictionary.Type.HASH);
- break;
- case BTREE:
- dictionary.updateType(Dictionary.Type.BTREE);
- break;
- case CASED:
- dictionary.updateMatch(Case.CASED);
- break;
- case UNCASED:
- dictionary.updateMatch(Case.UNCASED);
- break;
- default:
- throw new IllegalArgumentException("Unhandled operation " + operation);
- }
- }
-}