@Test @Cassandra public void testClusteringColumnReference() { PojoDao<SimpleEntity> refDao = createPojoDao(SimpleEntity.class); PojoDao<ClusteringColumnReferenceEntity> dao = createPojoDao(ClusteringColumnReferenceEntity.class); ClusteringColumnReferenceEntity entity = new ClusteringColumnReferenceEntity(); entity.setSimpleEntity(new SimpleEntity()); dao.save(entity); assertNotNull(refDao.findByKey(entity.getSimpleEntity().getId())); dao.delete(entity); assertNull(refDao.findByKey(entity.getSimpleEntity().getId())); }
@Override public void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); } }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); } SimpleKeyBinding(Facet facet, String columnName, Converter converter); }
SimpleKeyBinding extends SimpleColumnBinding implements KeyBinding { @Override public void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); } 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 void delete(Delete.Where delete) { delete.and(eq(getColumnName(), bindMarker())); } 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);  }