net.dontdrinkandroot.persistence.entity
Interface Entity<K>
- Type Parameters:
K - Type of the primary key.
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- AbstractEntity, AbstractGeneratedIdEntity, AbstractIdEntity, GeneratedLongIdEntity, LongIdEntity
public interface Entity<K>
- extends java.io.Serializable
Represents an entity with a primary key. The methods getId() and setId() must be implemented,
even if the primary key has a different field name, also make sure that the primary key
implements equals/hashcode correctly.
- Author:
- Philip W. Sorst
|
Method Summary |
K |
getId()
Get the primary key of the entity. |
getId
K getId()
- Get the primary key of the entity.
Copyright © 2013 dontdrinkandroot. All Rights Reserved.