@Test public void testGetElementValue() { SimpleEntity entity = new SimpleEntity(); when(converter.toColumnValue(entity.getId())).thenReturn("2"); assertEquals("2", binding.getElementValue(entity)); verify(converter).toColumnValue(entity.getId()); }
@Override public Object getElementValue(Object pojo) { return getConverter().toColumnValue(getFacet().getValue(pojo)); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public Object getElementValue(Object pojo) { return getConverter().toColumnValue(getFacet().getValue(pojo)); } }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public Object getElementValue(Object pojo) { return getConverter().toColumnValue(getFacet().getValue(pojo)); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public Object getElementValue(Object pojo) { return getConverter().toColumnValue(getFacet().getValue(pojo)); } 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 Object getElementValue(Object pojo) { return getConverter().toColumnValue(getFacet().getValue(pojo)); } 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);  }