private ColumnDef toThrift() { ColumnDef d = new ColumnDef(); if ( indexName != null ) { d.setIndex_name(indexName); d.setIndex_type(indexTypeToThrift(indexType)); } d.setName(name); d.setValidation_class(validationClass); return d; }
columnDef.setName(columnInfo.getColumnName().getBytes()); columnDef.setValidation_class(CounterColumnType.class.getName()); counterColumnDefs.add(columnDef);
columnDef.setName(columnInfo.getColumnName().getBytes()); columnDef.setValidation_class(CassandraValidationClassMapper.getValidationClass( columnInfo.getType(), isCql3Enabled(tableInfo)));
@Override public ColumnDefinition setName(byte[] name) { columnDef.setName(name); return this; }
@Override public ColumnDefinition setName(byte[] name) { columnDef.setName(name); return this; }
List<ColumnDef> column_metadata = new ArrayList<ColumnDef>(); ColumnDef def = new ColumnDef(); def.setName("AGE".getBytes()); def.setValidation_class("UTF8Type"); def.setIndex_type(IndexType.KEYS); def1.setName("PERSON_NAME".getBytes()); def1.setValidation_class("BytesType"); def1.setIndex_type(IndexType.KEYS);
/** * getColumnMetadata use for getting column metadata for specific * columnInfo. * * @param columnInfo * the column info * @param tableInfo * the table info * @return the column metadata */ private ColumnDef getColumnMetadata(ColumnInfo columnInfo, TableInfo tableInfo) { ColumnDef columnDef = new ColumnDef(); columnDef.setName(columnInfo.getColumnName().getBytes()); columnDef.setValidation_class(CassandraValidationClassMapper.getValidationClass(columnInfo.getType(), isCql3Enabled(tableInfo))); if (columnInfo.isIndexable()) { IndexInfo indexInfo = tableInfo.getColumnToBeIndexed(columnInfo.getColumnName()); columnDef.setIndex_type(CassandraIndexHelper.getIndexType(indexInfo.getIndexType())); // if (!indexInfo.getIndexName().equals(indexInfo.getColumnName())) // { // columnDef.setIndex_name(indexInfo.getIndexName()); // } } return columnDef; }
List<ColumnDef> column_metadata = new ArrayList<ColumnDef>(); ColumnDef def = new ColumnDef(); def.setName("AGE".getBytes()); def.setValidation_class("Int32Type"); def.setIndex_type(IndexType.KEYS); def1.setName("PERSON_NAME".getBytes()); def1.setValidation_class("UTF8Type"); def1.setIndex_type(IndexType.KEYS);
@Override public ColumnDefinition setName(String name) { columnDef.setName(name.getBytes()); return this; }
@Override public ColumnDefinition setName(String name) { columnDef.setName(name.getBytes()); return this; }
@Override public ColumnDefinition setName(ByteBuffer name) { columnDef.setName(name.duplicate()); return this; }
@Override public ColumnDefinition setName(ByteBuffer name) { columnDef.setName(name.duplicate()); return this; }
public ColumnDef setName(byte[] name) { setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name)); return this; }
public ColumnDef setName(byte[] name) { setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name)); return this; }
columnDef.setName(column.getName()); columnDef.setValidation_class(CassandraValidationClassMapper.getValidationClass(columnType, false)); columnDef.setIndex_type(IndexType.KEYS);
public byte[] getName() { setName(org.apache.thrift.TBaseHelper.rightSize(name)); return name == null ? null : name.array(); }
public byte[] getName() { setName(org.apache.thrift.TBaseHelper.rightSize(name)); return name == null ? null : name.array(); }
private ColumnDef toThrift() { ColumnDef d = new ColumnDef(); if ( indexName != null ) { d.setIndex_name(indexName); d.setIndex_type(indexTypeToThrift(indexType)); } d.setName(name); d.setValidation_class(validationClass); return d; }
private ColumnDef toThrift() { ColumnDef d = new ColumnDef(); if ( indexName != null ) { d.setIndex_name(indexName); d.setIndex_type(indexTypeToThrift(indexType)); } d.setName(name); d.setValidation_class(validationClass); return d; }
public ColumnDef toThrift() { ColumnDef cd = new ColumnDef(); cd.setName(ByteBufferUtil.clone(name.bytes)); cd.setValidation_class(type.toString()); cd.setIndex_type(indexType == null ? null : org.apache.cassandra.thrift.IndexType.valueOf(indexType.name())); cd.setIndex_name(indexName == null ? null : indexName); cd.setIndex_options(indexOptions == null ? null : Maps.newHashMap(indexOptions)); return cd; }