@Test public void testEquals() { PojoBinding<SimpleKeyEntity> binding = getBindingFactory().createPojoBinding(SimpleKeyEntity.class); PojoBinding<SimpleKeyEntity> other = new DefaultPojoBindingFactory(getFacetProvider(), getConverterRegistry(), getNamingStrategy()).createPojoBinding(SimpleKeyEntity.class); assertEquals(binding, binding); assertEquals(binding, other); assertNotEquals(binding, null); assertNotEquals(binding, "Hello!"); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DefaultPojoBinding<?> that = (DefaultPojoBinding<?>) o; return pojoType.equals(that.pojoType); }
DefaultPojoBinding implements PojoBinding<P> { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DefaultPojoBinding<?> that = (DefaultPojoBinding<?>) o; return pojoType.equals(that.pojoType); } }
DefaultPojoBinding implements PojoBinding<P> { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DefaultPojoBinding<?> that = (DefaultPojoBinding<?>) o; return pojoType.equals(that.pojoType); } DefaultPojoBinding(Class<P> pojoType); }
DefaultPojoBinding implements PojoBinding<P> { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DefaultPojoBinding<?> that = (DefaultPojoBinding<?>) o; return pojoType.equals(that.pojoType); } DefaultPojoBinding(Class<P> pojoType); @Override BoundStatement bindInsert(PreparedStatement statement, P pojo, int ttl); @Override BoundStatement bindWhereIdEquals(PreparedStatement statement, List<Object> keys); @Override P createPojo(); @Override Delete.Where deleteFrom(String tableName); @Override void describe(Table table, Schema schema); @Override KeyBinding getKeyBinding(); @Override Map<String, ParameterBinding> getParameterBindings(); @Override Class<P> getPojoType(); @Override void injectValues(P pojo, Row row, PojoQueryContext context); @Override Insert insertInto(String tableName); @Override Select.Where selectFrom(String tableName); @Override Select.Where selectFromByKey(String tableName); @Override void verifySchema(KeyspaceMetadata keyspaceMetadata, String tableName); @Override void visitChildren(P pojo, Predicate<Facet> predicate, PojoVisitor visitor); void setKeyBinding(KeyBinding keyBinding); @Override boolean equals(Object o); @Override int hashCode(); void addFacetBinding(ColumnBinding facetBinding); }
DefaultPojoBinding implements PojoBinding<P> { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DefaultPojoBinding<?> that = (DefaultPojoBinding<?>) o; return pojoType.equals(that.pojoType); } DefaultPojoBinding(Class<P> pojoType); @Override BoundStatement bindInsert(PreparedStatement statement, P pojo, int ttl); @Override BoundStatement bindWhereIdEquals(PreparedStatement statement, List<Object> keys); @Override P createPojo(); @Override Delete.Where deleteFrom(String tableName); @Override void describe(Table table, Schema schema); @Override KeyBinding getKeyBinding(); @Override Map<String, ParameterBinding> getParameterBindings(); @Override Class<P> getPojoType(); @Override void injectValues(P pojo, Row row, PojoQueryContext context); @Override Insert insertInto(String tableName); @Override Select.Where selectFrom(String tableName); @Override Select.Where selectFromByKey(String tableName); @Override void verifySchema(KeyspaceMetadata keyspaceMetadata, String tableName); @Override void visitChildren(P pojo, Predicate<Facet> predicate, PojoVisitor visitor); void setKeyBinding(KeyBinding keyBinding); @Override boolean equals(Object o); @Override int hashCode(); void addFacetBinding(ColumnBinding facetBinding);  }