Class ReplacementImpl
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity<E,I>
-
- org.silverpeas.core.persistence.datasource.model.jpa.SilverpeasJpaEntity<ReplacementImpl,UuidIdentifier>
-
- org.silverpeas.core.workflow.engine.user.ReplacementImpl
-
- All Implemented Interfaces:
Serializable
,Entity<ReplacementImpl,UuidIdentifier>
,IdentifiableEntity
,Replacement<ReplacementImpl>
@Entity public class ReplacementImpl extends SilverpeasJpaEntity<ReplacementImpl,UuidIdentifier> implements Replacement<ReplacementImpl>
Implementation of the replacement business object by using JPA for the persistence.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.workflow.api.user.Replacement
Replacement.Constructor, Replacement.Repository
-
-
Constructor Summary
Constructors Constructor Description ReplacementImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
User
getIncumbent()
Gets the incumbent of responsibilities of tasks that is replaced in a given period of time.Period
getPeriod()
Gets the period in days over which this replacement is enabled.User
getSubstitute()
Gets the substitute of the incumbent to exercise his responsibilities on some tasks.String
getWorkflowInstanceId()
Gets the unique identifier of the instance of the workflow in which this replacement is done.int
hashCode()
ReplacementImpl
setPeriod(Period period)
Sets a new period in days over which this replacement will be enabled.ReplacementImpl
setSubstitute(User substitute)
Sets a new substitute to this replacement.-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.SilverpeasJpaEntity
createdBy, createdBy, createdBy, getCreationDate, getCreator, getCreatorId, getLastUpdateDate, getLastUpdater, getLastUpdaterId, getVersion, hasBeenModified, lastUpdatedBy, markAsModified, performBeforePersist, performBeforeRemove, performBeforeUpdate, setCreationDate, setCreator, setLastUpdateDate, setLastUpdater, setVersion, updatedBy, updatedBy
-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity
getId, getNativeId, isPersisted, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.persistence.datasource.model.Entity
createdBy, createdBy, getCreationDate, getCreator, getCreatorId, getLastUpdateDate, getLastUpdater, getLastUpdaterId, getVersion, hasBeenModified, markAsModified, updatedBy, updatedBy
-
Methods inherited from interface org.silverpeas.core.persistence.datasource.model.IdentifiableEntity
getId, isPersisted
-
Methods inherited from interface org.silverpeas.core.workflow.api.user.Replacement
delete, isSameAs, save
-
-
-
-
Method Detail
-
getIncumbent
public User getIncumbent()
Description copied from interface:Replacement
Gets the incumbent of responsibilities of tasks that is replaced in a given period of time.- Specified by:
getIncumbent
in interfaceReplacement<ReplacementImpl>
- Returns:
- the user that is replaced.
-
getSubstitute
public User getSubstitute()
Description copied from interface:Replacement
Gets the substitute of the incumbent to exercise his responsibilities on some tasks.- Specified by:
getSubstitute
in interfaceReplacement<ReplacementImpl>
- Returns:
- the user to whom this replacement was done.
-
getPeriod
public Period getPeriod()
Description copied from interface:Replacement
Gets the period in days over which this replacement is enabled. The start and end dates of the period areLocalDate
instances.- Specified by:
getPeriod
in interfaceReplacement<ReplacementImpl>
- Returns:
- a period in days.
-
getWorkflowInstanceId
public String getWorkflowInstanceId()
Description copied from interface:Replacement
Gets the unique identifier of the instance of the workflow in which this replacement is done.- Specified by:
getWorkflowInstanceId
in interfaceReplacement<ReplacementImpl>
- Returns:
- the unique identifier of a workflow instance.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSilverpeasJpaEntity<ReplacementImpl,UuidIdentifier>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classSilverpeasJpaEntity<ReplacementImpl,UuidIdentifier>
-
setSubstitute
public ReplacementImpl setSubstitute(User substitute)
Description copied from interface:Replacement
Sets a new substitute to this replacement.- Specified by:
setSubstitute
in interfaceReplacement<ReplacementImpl>
- Parameters:
substitute
- the user that will replace the incumbent of some tasks- Returns:
- itself.
-
setPeriod
public ReplacementImpl setPeriod(Period period)
Description copied from interface:Replacement
Sets a new period in days over which this replacement will be enabled. The start date and end date of the period should beLocalDate
instances.- Specified by:
setPeriod
in interfaceReplacement<ReplacementImpl>
- Parameters:
period
- the new period of this replacement.- Returns:
- itself.
-
-