@Test public void testHashCode() { final SimpleId entityId = new SimpleId( "test" ); final UUID version = UUIDGenerator.newTimeUUID(); final Entity entity = new Entity( entityId ); MvccEntityImpl first = new MvccEntityImpl( entityId, version, MvccEntity.Status.COMPLETE,Optional.of( entity ) ); MvccEntityImpl second = new MvccEntityImpl( entityId, version, MvccEntity.Status.COMPLETE, Optional.of( entity ) ); assertEquals( first.hashCode(), second.hashCode() ); }
@Override public int hashCode() { int result = entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + status.hashCode(); return result; }
MvccEntityImpl implements MvccEntity { @Override public int hashCode() { int result = entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + status.hashCode(); return result; } }
MvccEntityImpl implements MvccEntity { @Override public int hashCode() { int result = entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + status.hashCode(); return result; } MvccEntityImpl( final Id entityId, final UUID version, final Status status, final Entity entity );  MvccEntityImpl(
        final Id entityId, final UUID version, final Status status, final Optional<Entity> entity);  MvccEntityImpl(
            final Id entityId, final UUID version, final Status status, final Optional<Entity> entity, final long size); }
MvccEntityImpl implements MvccEntity { @Override public int hashCode() { int result = entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + status.hashCode(); return result; } MvccEntityImpl( final Id entityId, final UUID version, final Status status, final Entity entity );  MvccEntityImpl(
        final Id entityId, final UUID version, final Status status, final Optional<Entity> entity);  MvccEntityImpl(
            final Id entityId, final UUID version, final Status status, final Optional<Entity> entity, final long size); @Override Optional<Entity> getEntity(); @Override UUID getVersion(); @Override Id getId(); @Override Status getStatus(); @Override long getSize(); @Override void setSize(long size); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString(); }
MvccEntityImpl implements MvccEntity { @Override public int hashCode() { int result = entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + status.hashCode(); return result; } MvccEntityImpl( final Id entityId, final UUID version, final Status status, final Entity entity );  MvccEntityImpl(
        final Id entityId, final UUID version, final Status status, final Optional<Entity> entity);  MvccEntityImpl(
            final Id entityId, final UUID version, final Status status, final Optional<Entity> entity, final long size); @Override Optional<Entity> getEntity(); @Override UUID getVersion(); @Override Id getId(); @Override Status getStatus(); @Override long getSize(); @Override void setSize(long size); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString();  }