@Test public void testGetKeyParameters() { when(converter.toColumnValue("1")).thenReturn("2"); List<Object> keys = binding.getKeyParameters(Lists.newArrayList("1")); assertEquals(Lists.newArrayList("2"), keys); verify(converter).toColumnValue("1"); }
@Override public List<Object> getKeyParameters(List<Object> keys) { return keys.stream().map(facetValue -> getConverter().toColumnValue(facetValue)).collect(Collectors.toList()); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public List<Object> getKeyParameters(List<Object> keys) { return keys.stream().map(facetValue -> getConverter().toColumnValue(facetValue)).collect(Collectors.toList()); } }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public List<Object> getKeyParameters(List<Object> keys) { return keys.stream().map(facetValue -> getConverter().toColumnValue(facetValue)).collect(Collectors.toList()); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public List<Object> getKeyParameters(List<Object> keys) { return keys.stream().map(facetValue -> getConverter().toColumnValue(facetValue)).collect(Collectors.toList()); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); @Override void describe(Table table, Schema schema); @Override void verifySchema(KeyspaceMetadata keyspaceMetadata, TableMetadata tableMetadata); @Override KeyComponent createClusteringColumnReferenceComponent(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override ColumnBinding createReferenceBinding(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override void delete(Delete.Where delete); @Override List<Object> elementToKeys(Object element); @Override DataType getElementDataType(); @Override Object getElementValue(Object pojo); @Override List<Object> getKeyParameters(List<Object> keys); @Override void selectWhere(Select.Where select); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public List<Object> getKeyParameters(List<Object> keys) { return keys.stream().map(facetValue -> getConverter().toColumnValue(facetValue)).collect(Collectors.toList()); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); @Override void describe(Table table, Schema schema); @Override void verifySchema(KeyspaceMetadata keyspaceMetadata, TableMetadata tableMetadata); @Override KeyComponent createClusteringColumnReferenceComponent(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override ColumnBinding createReferenceBinding(Facet referenceFacet, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy); @Override void delete(Delete.Where delete); @Override List<Object> elementToKeys(Object element); @Override DataType getElementDataType(); @Override Object getElementValue(Object pojo); @Override List<Object> getKeyParameters(List<Object> keys); @Override void selectWhere(Select.Where select);  }