UserType usertype = (UserType) mapType.getValuesType();
if (((MapType) type).getValuesType().getClass().getSimpleName().equals("UserType"))
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
private int compareMapType(MapType<?, ?> type, MapType<?, ?> otherType) { int test = compare(type.getKeysType(), otherType.getKeysType()); return test != 0 ? test : compare(type.getValuesType(), otherType.getValuesType()); }
private int compareMapType(MapType<?, ?> type, MapType<?, ?> otherType) { int test = compare(type.getKeysType(), otherType.getKeysType()); return test != 0 ? test : compare(type.getValuesType(), otherType.getValuesType()); }
private int compareMapType(MapType<?, ?> type, MapType<?, ?> otherType) { int test = compare(type.getKeysType(), otherType.getKeysType()); return test != 0 ? test : compare(type.getValuesType(), otherType.getValuesType()); }
/** * Find a SuperColumn value column if it's available (for example, when it was renamed) or create one with a default name. */ public static ColumnDefinition getSuperCfValueColumn(CFMetaData cfm, PartitionColumns partitionColumns, ColumnDefinition superCfKeyColumn, CompactTables.DefaultNames defaultNames) { assert cfm.isDense(); MapType mapType = (MapType) cfm.compactValueColumn().type; for (ColumnDefinition def: partitionColumns.regulars) { if (!def.name.bytes.equals(SUPER_COLUMN_MAP_COLUMN) && def.type.equals(mapType.getValuesType()) && !def.equals(superCfKeyColumn)) return def; } ColumnIdentifier identifier = ColumnIdentifier.getInterned(defaultNames.defaultCompactValueName(), true); return new ColumnDefinition(cfm.ksName, cfm.cfName, identifier, mapType.getValuesType(), ColumnDefinition.NO_POSITION, ColumnDefinition.Kind.REGULAR); }
@Override public boolean referencesUserType(String userTypeName) { return getKeysType().referencesUserType(userTypeName) || getValuesType().referencesUserType(userTypeName); }
@Override public boolean referencesUserType(String userTypeName) { return getKeysType().referencesUserType(userTypeName) || getValuesType().referencesUserType(userTypeName); }
@Override public boolean referencesUserType(String userTypeName) { return getKeysType().referencesUserType(userTypeName) || getValuesType().referencesUserType(userTypeName); }
@Override public boolean referencesUserType(String userTypeName) { return getKeysType().referencesUserType(userTypeName) || getValuesType().referencesUserType(userTypeName); }
public static ColumnSpecification valueSpecOf(ColumnSpecification column) { return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), ((MapType)column.type).getValuesType()); }
public static ColumnSpecification valueSpecOf(ColumnSpecification column) { return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), ((MapType)column.type).getValuesType()); }
public static ColumnSpecification valueSpecOf(ColumnSpecification column) { return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), ((MapType)column.type).getValuesType()); }
public static ColumnSpecification valueSpecOf(ColumnSpecification column) { return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), ((MapType)column.type).getValuesType()); }
public static ColumnSpecification valueSpecOf(ColumnSpecification column) { return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), ((MapType)column.type).getValuesType()); }
private void generateMapCQLLiteral(ByteBuffer buffer, ProtocolVersion version, StringBuilder target, int size) { CQL3Type keys = ((MapType) type).getKeysType().asCQL3Type(); CQL3Type values = ((MapType) type).getValuesType().asCQL3Type(); for (int i = 0; i < size; i++) { if (i > 0) target.append(", "); ByteBuffer element = CollectionSerializer.readValue(buffer, version); target.append(keys.toCQLLiteral(element, version)); target.append(": "); element = CollectionSerializer.readValue(buffer, version); target.append(values.toCQLLiteral(element, version)); } }