Package org.omnifaces.persistence.model
Class GeneratedIdEntity<I extends Comparable<I> & Serializable>
- java.lang.Object
-
- org.omnifaces.persistence.model.BaseEntity<I>
-
- org.omnifaces.persistence.model.GeneratedIdEntity<I>
-
- Type Parameters:
I- The generic ID type.
- All Implemented Interfaces:
Serializable,Comparable<BaseEntity<I>>,Identifiable<I>
- Direct Known Subclasses:
TimestampedEntity
@MappedSuperclass public abstract class GeneratedIdEntity<I extends Comparable<I> & Serializable> extends BaseEntity<I>
Mapped superclass for entity with generated ID. It extends from
BaseEntity. It specifies aIdcolumn, named "id". JPA will automatically take care of the ID.- Author:
- Bauke Scholtz
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.omnifaces.persistence.model.Identifiable
ID
-
-
Constructor Summary
Constructors Constructor Description GeneratedIdEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgetId()Returns the ID.voidsetId(I id)Sets the ID.-
Methods inherited from class org.omnifaces.persistence.model.BaseEntity
compareTo, equals, hashCode, toString
-
-
-
-
Method Detail
-
getId
public I getId()
Description copied from interface:IdentifiableReturns the ID.- Returns:
- The ID.
-
setId
public void setId(I id)
Description copied from interface:IdentifiableSets the ID.- Parameters:
id- The ID.
-
-