@Test public void testFieldManagerSubNameWithMainColumnNameNoFieldLess() throws IOException { FieldManager memoryFieldManager = newFieldManager(true); memoryFieldManager.addColumnDefinition("fam1", "col1", null, false, "text", false, false, null); try { memoryFieldManager.addColumnDefinition("fam1", "col1", "sub1", true, "text", false, false, null); fail("Should throw IllegalArgumentException"); } catch (IllegalArgumentException e) { } }
@Override public boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed, String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props) throws IOException { if (family == null) { family = BlurConstants.DEFAULT_FAMILY; } String baseFieldName = family + "." + columnName; String fieldName; if (subColumnName != null) { FieldTypeDefinition primeFieldTypeDefinition = getFieldTypeDefinition(baseFieldName); if (primeFieldTypeDefinition == null) { throw new IllegalArgumentException("Base column of [" + baseFieldName + "] not found, please add base before adding sub column."); } if (fieldLessIndexed) { throw new IllegalArgumentException("Subcolumn of [" + subColumnName + "] from base of [" + baseFieldName + "] cannot be added with fieldLessIndexing set to true."); } fieldName = baseFieldName + "." + subColumnName; } else { fieldName = baseFieldName; } return addFieldTypeDefinition(family, columnName, subColumnName, fieldName, fieldLessIndexed, fieldType, sortable, multiValueField, props); }
BaseFieldManager extends FieldManager { @Override public boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed, String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props) throws IOException { if (family == null) { family = BlurConstants.DEFAULT_FAMILY; } String baseFieldName = family + "." + columnName; String fieldName; if (subColumnName != null) { FieldTypeDefinition primeFieldTypeDefinition = getFieldTypeDefinition(baseFieldName); if (primeFieldTypeDefinition == null) { throw new IllegalArgumentException("Base column of [" + baseFieldName + "] not found, please add base before adding sub column."); } if (fieldLessIndexed) { throw new IllegalArgumentException("Subcolumn of [" + subColumnName + "] from base of [" + baseFieldName + "] cannot be added with fieldLessIndexing set to true."); } fieldName = baseFieldName + "." + subColumnName; } else { fieldName = baseFieldName; } return addFieldTypeDefinition(family, columnName, subColumnName, fieldName, fieldLessIndexed, fieldType, sortable, multiValueField, props); } }
BaseFieldManager extends FieldManager { @Override public boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed, String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props) throws IOException { if (family == null) { family = BlurConstants.DEFAULT_FAMILY; } String baseFieldName = family + "." + columnName; String fieldName; if (subColumnName != null) { FieldTypeDefinition primeFieldTypeDefinition = getFieldTypeDefinition(baseFieldName); if (primeFieldTypeDefinition == null) { throw new IllegalArgumentException("Base column of [" + baseFieldName + "] not found, please add base before adding sub column."); } if (fieldLessIndexed) { throw new IllegalArgumentException("Subcolumn of [" + subColumnName + "] from base of [" + baseFieldName + "] cannot be added with fieldLessIndexing set to true."); } fieldName = baseFieldName + "." + subColumnName; } else { fieldName = baseFieldName; } return addFieldTypeDefinition(family, columnName, subColumnName, fieldName, fieldLessIndexed, fieldType, sortable, multiValueField, props); } BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, Configuration configuration);  BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, boolean strict,
      String defaultMissingFieldType, boolean defaultMissingFieldLessIndexing,
      Map<String, String> defaultMissingFieldProps, Configuration configuration); }
BaseFieldManager extends FieldManager { @Override public boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed, String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props) throws IOException { if (family == null) { family = BlurConstants.DEFAULT_FAMILY; } String baseFieldName = family + "." + columnName; String fieldName; if (subColumnName != null) { FieldTypeDefinition primeFieldTypeDefinition = getFieldTypeDefinition(baseFieldName); if (primeFieldTypeDefinition == null) { throw new IllegalArgumentException("Base column of [" + baseFieldName + "] not found, please add base before adding sub column."); } if (fieldLessIndexed) { throw new IllegalArgumentException("Subcolumn of [" + subColumnName + "] from base of [" + baseFieldName + "] cannot be added with fieldLessIndexing set to true."); } fieldName = baseFieldName + "." + subColumnName; } else { fieldName = baseFieldName; } return addFieldTypeDefinition(family, columnName, subColumnName, fieldName, fieldLessIndexed, fieldType, sortable, multiValueField, props); } BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, Configuration configuration);  BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, boolean strict,
      String defaultMissingFieldType, boolean defaultMissingFieldLessIndexing,
      Map<String, String> defaultMissingFieldProps, Configuration configuration); @Override Set<String> getFieldNames(); @Override void loadFromStorage(); @Override void registerType(Class<? extends FieldTypeDefinition> c); @Override List<Field> getFields(String rowId, Record record); @Override boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed,
      String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props); @Override boolean isValidColumnDefinition(String family, String columnName); @Override Analyzer getAnalyzerForIndex(String fieldName); @Override Analyzer getAnalyzerForQuery(String fieldName); void addColumnDefinitionGisPointVector(String family, String columnName); void addColumnDefinitionGisRecursivePrefixTree(String family, String columnName); void addColumnDefinitionDate(String family, String columnName, String format); void addColumnDefinitionInt(String family, String columnName); void addColumnDefinitionLong(String family, String columnName); void addColumnDefinitionFloat(String family, String columnName); void addColumnDefinitionDouble(String family, String columnName); void addColumnDefinitionString(String family, String columnName); void addColumnDefinitionText(String family, String columnName); void addColumnDefinitionTextFieldLess(String family, String columnName); @Override Analyzer getAnalyzerForQuery(); @Override Analyzer getAnalyzerForIndex(); @Override boolean isFieldLessIndexed(String field); @Override Boolean checkSupportForFuzzyQuery(String field); @Override Boolean checkSupportForPrefixQuery(String field); @Override Boolean checkSupportForWildcardQuery(String field); @Override Boolean checkSupportForRegexQuery(String field); @Override Boolean checkSupportForCustomQuery(String field); @Override Query getNewRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive); @Override Query getTermQueryIfNumeric(String field, String text); @Override FieldTypeDefinition getFieldTypeDefinition(String field); @Override SortField getSortField(String field, boolean reverse); @Override Query getCustomQuery(String field, String text); @Override String getFieldLessFieldName(); @Override Map<String, String> getDefaultMissingFieldProps(); @Override String getDefaultMissingFieldType(); @Override boolean getDefaultMissingFieldLessIndexing(); @Override boolean isStrict(); @Override String resolveField(String field); }
BaseFieldManager extends FieldManager { @Override public boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed, String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props) throws IOException { if (family == null) { family = BlurConstants.DEFAULT_FAMILY; } String baseFieldName = family + "." + columnName; String fieldName; if (subColumnName != null) { FieldTypeDefinition primeFieldTypeDefinition = getFieldTypeDefinition(baseFieldName); if (primeFieldTypeDefinition == null) { throw new IllegalArgumentException("Base column of [" + baseFieldName + "] not found, please add base before adding sub column."); } if (fieldLessIndexed) { throw new IllegalArgumentException("Subcolumn of [" + subColumnName + "] from base of [" + baseFieldName + "] cannot be added with fieldLessIndexing set to true."); } fieldName = baseFieldName + "." + subColumnName; } else { fieldName = baseFieldName; } return addFieldTypeDefinition(family, columnName, subColumnName, fieldName, fieldLessIndexed, fieldType, sortable, multiValueField, props); } BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, Configuration configuration);  BaseFieldManager(String fieldLessField, final Analyzer defaultAnalyzerForQuerying, boolean strict,
      String defaultMissingFieldType, boolean defaultMissingFieldLessIndexing,
      Map<String, String> defaultMissingFieldProps, Configuration configuration); @Override Set<String> getFieldNames(); @Override void loadFromStorage(); @Override void registerType(Class<? extends FieldTypeDefinition> c); @Override List<Field> getFields(String rowId, Record record); @Override boolean addColumnDefinition(String family, String columnName, String subColumnName, boolean fieldLessIndexed,
      String fieldType, boolean sortable, boolean multiValueField, Map<String, String> props); @Override boolean isValidColumnDefinition(String family, String columnName); @Override Analyzer getAnalyzerForIndex(String fieldName); @Override Analyzer getAnalyzerForQuery(String fieldName); void addColumnDefinitionGisPointVector(String family, String columnName); void addColumnDefinitionGisRecursivePrefixTree(String family, String columnName); void addColumnDefinitionDate(String family, String columnName, String format); void addColumnDefinitionInt(String family, String columnName); void addColumnDefinitionLong(String family, String columnName); void addColumnDefinitionFloat(String family, String columnName); void addColumnDefinitionDouble(String family, String columnName); void addColumnDefinitionString(String family, String columnName); void addColumnDefinitionText(String family, String columnName); void addColumnDefinitionTextFieldLess(String family, String columnName); @Override Analyzer getAnalyzerForQuery(); @Override Analyzer getAnalyzerForIndex(); @Override boolean isFieldLessIndexed(String field); @Override Boolean checkSupportForFuzzyQuery(String field); @Override Boolean checkSupportForPrefixQuery(String field); @Override Boolean checkSupportForWildcardQuery(String field); @Override Boolean checkSupportForRegexQuery(String field); @Override Boolean checkSupportForCustomQuery(String field); @Override Query getNewRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive); @Override Query getTermQueryIfNumeric(String field, String text); @Override FieldTypeDefinition getFieldTypeDefinition(String field); @Override SortField getSortField(String field, boolean reverse); @Override Query getCustomQuery(String field, String text); @Override String getFieldLessFieldName(); @Override Map<String, String> getDefaultMissingFieldProps(); @Override String getDefaultMissingFieldType(); @Override boolean getDefaultMissingFieldLessIndexing(); @Override boolean isStrict(); @Override String resolveField(String field); static FieldType ID_TYPE; }