@Test public void testIsTupleMapping_NoTupleMapping() { MappingDefinition tupleMappingDefinition = new MappingDefinition(); tupleMappingDefinition.setMappingColumns( buildNoTupleMapping() ); boolean result = MappingUtils.isTupleMapping( tupleMappingDefinition ); assertFalse( result ); }
public static boolean isTupleMapping( MappingDefinition mappingDefinition ) { List<MappingColumn> mappingColumns = mappingDefinition.getMappingColumns(); int mappingSize = mappingColumns.size(); if ( !( mappingSize == TUPLE_COLUMNS_COUNT || mappingSize == TUPLE_COLUMNS_COUNT + 1 ) ) { return false; } int tupleIdCount = 0; for ( MappingColumn column : mappingColumns ) { if ( isTupleMappingColumn( column.getAlias() ) ) { tupleIdCount++; } } return tupleIdCount == TUPLE_COLUMNS_COUNT || tupleIdCount == TUPLE_COLUMNS_COUNT + 1; }
MappingUtils { public static boolean isTupleMapping( MappingDefinition mappingDefinition ) { List<MappingColumn> mappingColumns = mappingDefinition.getMappingColumns(); int mappingSize = mappingColumns.size(); if ( !( mappingSize == TUPLE_COLUMNS_COUNT || mappingSize == TUPLE_COLUMNS_COUNT + 1 ) ) { return false; } int tupleIdCount = 0; for ( MappingColumn column : mappingColumns ) { if ( isTupleMappingColumn( column.getAlias() ) ) { tupleIdCount++; } } return tupleIdCount == TUPLE_COLUMNS_COUNT || tupleIdCount == TUPLE_COLUMNS_COUNT + 1; } }
MappingUtils { public static boolean isTupleMapping( MappingDefinition mappingDefinition ) { List<MappingColumn> mappingColumns = mappingDefinition.getMappingColumns(); int mappingSize = mappingColumns.size(); if ( !( mappingSize == TUPLE_COLUMNS_COUNT || mappingSize == TUPLE_COLUMNS_COUNT + 1 ) ) { return false; } int tupleIdCount = 0; for ( MappingColumn column : mappingColumns ) { if ( isTupleMappingColumn( column.getAlias() ) ) { tupleIdCount++; } } return tupleIdCount == TUPLE_COLUMNS_COUNT || tupleIdCount == TUPLE_COLUMNS_COUNT + 1; }  }
MappingUtils { public static boolean isTupleMapping( MappingDefinition mappingDefinition ) { List<MappingColumn> mappingColumns = mappingDefinition.getMappingColumns(); int mappingSize = mappingColumns.size(); if ( !( mappingSize == TUPLE_COLUMNS_COUNT || mappingSize == TUPLE_COLUMNS_COUNT + 1 ) ) { return false; } int tupleIdCount = 0; for ( MappingColumn column : mappingColumns ) { if ( isTupleMappingColumn( column.getAlias() ) ) { tupleIdCount++; } } return tupleIdCount == TUPLE_COLUMNS_COUNT || tupleIdCount == TUPLE_COLUMNS_COUNT + 1; }  static MappingAdmin getMappingAdmin( ConfigurationProducer cProducer ); static MappingAdmin getMappingAdmin( HBaseService hBaseService, VariableSpace variableSpace, String siteConfig,
      String defaultConfig ); static Mapping getMapping( MappingDefinition mappingDefinition, HBaseService hBaseService ); static HBaseValueMetaInterface buildNonKeyValueMeta( String alias, String family, String columnName,
      String type, String indexedVals, HBaseService hBaseService ); static boolean isTupleMapping( MappingDefinition mappingDefinition ); static boolean isTupleMappingColumn( String columnName ); }
MappingUtils { public static boolean isTupleMapping( MappingDefinition mappingDefinition ) { List<MappingColumn> mappingColumns = mappingDefinition.getMappingColumns(); int mappingSize = mappingColumns.size(); if ( !( mappingSize == TUPLE_COLUMNS_COUNT || mappingSize == TUPLE_COLUMNS_COUNT + 1 ) ) { return false; } int tupleIdCount = 0; for ( MappingColumn column : mappingColumns ) { if ( isTupleMappingColumn( column.getAlias() ) ) { tupleIdCount++; } } return tupleIdCount == TUPLE_COLUMNS_COUNT || tupleIdCount == TUPLE_COLUMNS_COUNT + 1; }  static MappingAdmin getMappingAdmin( ConfigurationProducer cProducer ); static MappingAdmin getMappingAdmin( HBaseService hBaseService, VariableSpace variableSpace, String siteConfig,
      String defaultConfig ); static Mapping getMapping( MappingDefinition mappingDefinition, HBaseService hBaseService ); static HBaseValueMetaInterface buildNonKeyValueMeta( String alias, String family, String columnName,
      String type, String indexedVals, HBaseService hBaseService ); static boolean isTupleMapping( MappingDefinition mappingDefinition ); static boolean isTupleMappingColumn( String columnName ); static final int TUPLE_COLUMNS_COUNT; static final int UNDEFINED_VALUE; static final String TUPLE_MAPPING_VISIBILITY; }