Class JpaPersistOperation
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.PersistenceOperation
-
- org.silverpeas.core.persistence.datasource.model.jpa.JpaPersistOperation
-
@PersistOperation @Technical @JPA @Bean public class JpaPersistOperation extends PersistenceOperation
- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Constructor Description JpaPersistOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyTechnicalDataTo(Entity entity)
Applying information of the context to the given entity on a persist operation.void
clear(Entity entity)
Clears the specified entity for the current persistence operation.void
setManuallyTechnicalDataFor(Entity entity, User creator, Date creationDate)
Indicates the creation properties of the specified entity was set explicitly.
-
-
-
Method Detail
-
applyTechnicalDataTo
protected void applyTechnicalDataTo(Entity entity)
Applying information of the context to the given entity on a persist operation.- Specified by:
applyTechnicalDataTo
in classPersistenceOperation
- Parameters:
entity
- an entity.
-
setManuallyTechnicalDataFor
public void setManuallyTechnicalDataFor(Entity entity, User creator, Date creationDate)
Indicates the creation properties of the specified entity was set explicitly. Useful when this information is lost when the entity is persisted with its counterpart in the persistence context.- Specified by:
setManuallyTechnicalDataFor
in classPersistenceOperation
- Parameters:
entity
- the entity for which the update properties were set.creator
- the user for which the persistence operation will be performed.creationDate
- the date at which the persistence operation will be considered as performed.
-
clear
public void clear(Entity entity)
Description copied from class:PersistenceOperation
Clears the specified entity for the current persistence operation. Any technical data manually set will be lost.- Specified by:
clear
in classPersistenceOperation
- Parameters:
entity
- the entity.
-
-