Class ContributionTrackingEvent
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity<E,I>
-
- org.silverpeas.core.persistence.datasource.model.jpa.BasicJpaEntity<ContributionTrackingEvent,UuidIdentifier>
-
- org.silverpeas.core.contribution.tracking.ContributionTrackingEvent
-
- All Implemented Interfaces:
Serializable
,IdentifiableEntity
@Entity public class ContributionTrackingEvent extends BasicJpaEntity<ContributionTrackingEvent,UuidIdentifier>
An event in the tracking of modifications on a given contribution. The event is about a given action that was occurred on the related contribution by a given user at a given date.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContributionTrackingEvent()
ContributionTrackingEvent(TrackedAction action, ContributionIdentifier contributionId)
Constructs a new tracking event about the specified action being performed against the given contribution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
TrackedAction
getAction()
Gets the action that is reported by this event.String
getContext()
Gets a description about the context on the modification that was operated on the underlying contribution.ContributionIdentifier
getContributionId()
Gets the identifier of the contribution that is related by this event.int
hashCode()
ContributionTrackingEvent
save()
Saves the specified event into the modification history of the related contribution.ContributionTrackingEvent
setContext(String context)
Sets a short text explaining the context under which the tracked modification of the underlying contribution was operated.-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.BasicJpaEntity
performBeforePersist, performBeforeRemove, performBeforeUpdate
-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity
getId, getNativeId, isPersisted, setId
-
-
-
-
Constructor Detail
-
ContributionTrackingEvent
protected ContributionTrackingEvent()
-
ContributionTrackingEvent
public ContributionTrackingEvent(TrackedAction action, ContributionIdentifier contributionId)
Constructs a new tracking event about the specified action being performed against the given contribution.- Parameters:
action
- the action that has been done.contributionId
- the unique identifier of the contribution on which the action has be done.
-
-
Method Detail
-
getContext
public String getContext()
Gets a description about the context on the modification that was operated on the underlying contribution.- Returns:
- a short description of the modification context or an empty string if no description was provided about it.
-
setContext
public ContributionTrackingEvent setContext(String context)
Sets a short text explaining the context under which the tracked modification of the underlying contribution was operated.- Parameters:
context
-- Returns:
-
getAction
public TrackedAction getAction()
Gets the action that is reported by this event.- Returns:
- the tracked action on the contribution related by this event.
-
getContributionId
public ContributionIdentifier getContributionId()
Gets the identifier of the contribution that is related by this event.- Returns:
- the identifier of a contribution in Silverpeas.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractJpaEntity<ContributionTrackingEvent,UuidIdentifier>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractJpaEntity<ContributionTrackingEvent,UuidIdentifier>
-
save
public ContributionTrackingEvent save()
Saves the specified event into the modification history of the related contribution.
-
-