Class BasicJpaEntity<E extends IdentifiableEntity,I extends EntityIdentifier>
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity<E,I>
-
- org.silverpeas.core.persistence.datasource.model.jpa.BasicJpaEntity<E,I>
-
- Type Parameters:
E
- the class name of the represented entity.I
- the unique identifier class used by the entity to identify it uniquely in the persistence context.
- All Implemented Interfaces:
Serializable
,IdentifiableEntity
- Direct Known Subclasses:
ActiveState
,CalendarEvent
,CalendarEventOccurrence
,ContributionTrackingEvent
,DelayedNotificationData
,DelayedNotificationUserSetting
,DocumentPermalink
,DownloadDetail
,ExternalAccount
,HistoryStepImpl
,InterestedUser
,LockingUser
,NotificationResourceData
,PdcAxisValue
,PdcClassification
,PersistentResourceToken
,POPUPMessageBean
,ProcessInstanceImpl
,QuestionImpl
,Quota
,Rating
,Reminder
,ServerMessageBean
,SILVERMAILMessageBean
,SPGroup
,SPUser
,Ticket
,UndoHistoryStep
,UserInfoImpl
,UserPreferences
,UserSettingsImpl
,VersionPermalink
,WorkflowErrorImpl
,WorkingUser
@MappedSuperclass public abstract class BasicJpaEntity<E extends IdentifiableEntity,I extends EntityIdentifier> extends AbstractJpaEntity<E,I>
This abstract class must be extended by all basic JPA entities that don't fit to the persistence rules of the Silverpeas Persistence API. Usually it means to be used for the migration of entities from the old persistence way (J2EE BMP) to JPA. Please be careful into the child entity classes about the use of @PrePersist and @PreUpdate annotations. In most of cases you don't need to use them, but to overrideperformBeforePersist()
orperformBeforeUpdate()
methods without forgetting to invoke the super call.- Author:
- ebonnet
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicJpaEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
performBeforePersist()
Performs some treatments before this entity is persisted into a repository.protected void
performBeforeRemove()
Performs some treatments before this entity is removed from a repository.protected void
performBeforeUpdate()
Performs some treatments before its counterpart in a repository is updated with the changes in this entity.-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity
equals, getId, getNativeId, hashCode, isPersisted, setId
-
-
-
-
Method Detail
-
performBeforePersist
protected void performBeforePersist()
Description copied from class:AbstractJpaEntity
Performs some treatments before this entity is persisted into a repository.- Specified by:
performBeforePersist
in classAbstractJpaEntity<E extends IdentifiableEntity,I extends EntityIdentifier>
-
performBeforeUpdate
protected void performBeforeUpdate()
Description copied from class:AbstractJpaEntity
Performs some treatments before its counterpart in a repository is updated with the changes in this entity.- Specified by:
performBeforeUpdate
in classAbstractJpaEntity<E extends IdentifiableEntity,I extends EntityIdentifier>
-
performBeforeRemove
protected void performBeforeRemove()
Description copied from class:AbstractJpaEntity
Performs some treatments before this entity is removed from a repository.- Specified by:
performBeforeRemove
in classAbstractJpaEntity<E extends IdentifiableEntity,I extends EntityIdentifier>
-
-