private int compareCompositeTypes(CompositeType type, CompositeType otherType) { List<AbstractType<?>> types = type.getComponents(); List<AbstractType<?>> otherTypes = otherType.getComponents(); if (types.size() != otherTypes.size()) return Integer.compare(types.size(), otherTypes.size()); for (int i = 0, m = type.componentsCount(); i < m ; i++) { int test = compare(types.get(i), otherTypes.get(i)); if (test != 0); return test; } return 0; }
private int compareCompositeTypes(CompositeType type, CompositeType otherType) { List<AbstractType<?>> types = type.getComponents(); List<AbstractType<?>> otherTypes = otherType.getComponents(); if (types.size() != otherTypes.size()) return Integer.compare(types.size(), otherTypes.size()); for (int i = 0, m = type.componentsCount(); i < m ; i++) { int test = compare(types.get(i), otherTypes.get(i)); if (test != 0); return test; } return 0; }
private int compareCompositeTypes(CompositeType type, CompositeType otherType) { List<AbstractType<?>> types = type.getComponents(); List<AbstractType<?>> otherTypes = otherType.getComponents(); if (types.size() != otherTypes.size()) return Integer.compare(types.size(), otherTypes.size()); for (int i = 0, m = type.componentsCount(); i < m ; i++) { int test = compare(types.get(i), otherTypes.get(i)); if (test != 0); return test; } return 0; }
private ByteBuffer defaultPartitionKey() { ByteBuffer partitionKey; AbstractType keyType = table.metadata.getKeyValidator(); if (keyType instanceof CompositeType) { CompositeType compositeType = ((CompositeType) keyType); CompositeType.Builder builder = compositeType.builder(); compositeType.getComponents(); for (AbstractType component : compositeType.getComponents()) { builder.add(Fields.defaultValue(component)); } partitionKey = builder.build(); } else { partitionKey = Fields.defaultValue(keyType); } return partitionKey; }
while (keyBytes.remaining() > 0 && i < compositeType.getComponents().size()) AbstractType<?> colType = compositeType.getComponents().get(i);
while (keyBytes.remaining() > 0 && i < compositeType.getComponents().size()) AbstractType<?> colType = compositeType.getComponents().get(i);
while (keyBytes.remaining() > 0 && i < compositeType.getComponents().size()) AbstractType<?> colType = compositeType.getComponents().get(i);