if ( vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED && vm.isString() ) { Object[] labels = vm.getIndex(); StringBuffer vals = new StringBuffer();
public static HBaseValueMetaInterface buildNonKeyValueMeta( String alias, String family, String columnName, String type, String indexedVals, HBaseService hBaseService ) throws KettleException { HBaseValueMetaInterfaceFactory valueMetaInterfaceFactory = hBaseService.getHBaseValueMetaInterfaceFactory(); HBaseValueMetaInterface valueMeta = valueMetaInterfaceFactory.createHBaseValueMetaInterface( family, columnName, alias, 0, UNDEFINED_VALUE, UNDEFINED_VALUE ); try { valueMeta.setHBaseTypeFromString( type ); if ( valueMeta.isString() && !Const.isEmpty( indexedVals ) ) { ByteConversionUtil byteConversionUtil = hBaseService.getByteConversionUtil(); Object[] vals = byteConversionUtil.stringIndexListToObjects( indexedVals ); valueMeta.setIndex( vals ); valueMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_INDEXED ); } return valueMeta; } catch ( IllegalArgumentException e ) { throw new KettleException( e ); } }
if ( vm.isString() && indexedVals != null && indexedVals.length() > 0 ) { Object[] vals = byteConversionUtil.stringIndexListToObjects( indexedVals ); vm.setIndex( vals );
public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) { String[] comboValues = colinf2[ 2 ].getComboValues(); // try to fill in the type String alias = tableItem.getText( 1 ); HBaseValueMetaInterface vm = null; if ( !Const.isEmpty( alias ) ) { vm = setFilterTableTypeColumn( tableItem ); } if ( vm != null ) { if ( vm.isNumeric() || vm.isDate() || vm.isBoolean() ) { comboValues = ColumnFilter.ComparisonType.getNumericOperators(); } else if ( vm.isString() ) { comboValues = ColumnFilter.ComparisonType.getStringOperators(); } else { comboValues = new String[ 1 ]; comboValues[ 0 ] = ""; } } else { // if we've not got a connection, or there is no user-specified // columns saved in the meta class, then just get all the // operators comboValues = ColumnFilter.ComparisonType.getAllOperators(); } return comboValues; } } );
HBaseValueMetaInterface column = mappedColumns.get( alias ); String aliasS = column.getAlias(); if ( column.isNumeric() || column.isDate() || column.isString() || column.isBoolean() ) { filterAliasNames.add( aliasS ); if ( column.isNumeric() || column.isDate() || column.isString() ) { if ( !filterAliasesDone ) { filterAliasNames.add( aliasS );