se.citerus.dddsample.domain.shared.experimental
Interface Entity<T,ID>

All Known Implementing Classes:
EntitySupport

public interface Entity<T,ID>

An entity, as explained in the DDD book.


Method Summary
 ID identity()
          Entities have an identity.
 boolean sameIdentityAs(T other)
          Entities compare by identity, not by attributes.
 

Method Detail

sameIdentityAs

boolean sameIdentityAs(T other)
Entities compare by identity, not by attributes.

Parameters:
other - The other entity.
Returns:
true if the identities are the same, regardles of other attributes.

identity

ID identity()
Entities have an identity.

Returns:
The identity of this entity.


Copyright © 2009. All Rights Reserved.