Class JpaBulkUpdate
- java.lang.Object
-
- com.broadleafcommerce.bulk.provider.jpa.domain.JpaBulkUpdate
-
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
,com.broadleafcommerce.data.tracking.core.Identifiable
,com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
,com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
,Serializable
@Entity public class JpaBulkUpdate extends Object implements com.broadleafcommerce.data.tracking.core.Identifiable, Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
Persistent counter-part to aBulkUpdate
for use with a JPA-supported datastore.- Author:
- Samarth Dhruva (samarthd)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JpaBulkUpdate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
org.modelmapper.ModelMapper
fromMe()
String
get_errors()
Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.String
getApplicationId()
String
getAuthor()
Class<?>
getBusinessDomainType()
Instant
getCreated()
List<JpaBulkUpdateError>
getErrors()
Provides a way for callers to get the_errors
without dealing with the deserialization aspect.List<String>
getExclusions()
String
getFilterString()
String
getId()
List<String>
getInclusions()
Instant
getLastUpdated()
String
getName()
List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>
getNotificationStates()
List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>
getNotificationStates(boolean fetch)
long
getNumberOfRecordsProcessed()
String
getSerializedPayload()
BulkUpdateStatus
getStatus()
String
getTarget()
String
getTenantId()
long
getTotalRecordsToProcess()
String
getType()
String
getUpdatingApplicationId()
String
getUpdatingCatalogId()
String
getUpdatingCustomerContextId()
String
getUpdatingSandboxId()
String
getUpdatingSandboxName()
int
hashCode()
boolean
isProductionBulkUpdate()
void
set_errors(String _errors)
Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.void
setApplicationId(String applicationId)
void
setAuthor(String author)
void
setCreated(Instant created)
void
setErrors(List<JpaBulkUpdateError> errors)
Provides a way for callers to set the_errors
without dealing with the serialization aspect.void
setExclusions(List<String> exclusions)
void
setFilterString(String filterString)
void
setId(String id)
void
setInclusions(List<String> inclusions)
void
setLastUpdated(Instant lastUpdated)
void
setName(String name)
void
setNotificationStates(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates)
void
setNumberOfRecordsProcessed(long numberOfRecordsProcessed)
void
setProductionBulkUpdate(boolean productionBulkUpdate)
void
setSerializedPayload(String serializedPayload)
void
setStatus(BulkUpdateStatus status)
void
setTarget(String target)
void
setTenantId(String tenantId)
void
setTotalRecordsToProcess(long totalRecordsToProcess)
void
setType(String type)
void
setUpdatingApplicationId(String updatingApplicationId)
void
setUpdatingCatalogId(String updatingCatalogId)
void
setUpdatingCustomerContextId(String updatingCustomerContextId)
void
setUpdatingSandboxId(String updatingSandboxId)
void
setUpdatingSandboxName(String updatingSandboxName)
org.modelmapper.ModelMapper
toMe()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getStatus
@Nullable public BulkUpdateStatus getStatus()
-
setStatus
public void setStatus(@Nullable BulkUpdateStatus status)
-
setErrors
public void setErrors(@Nullable List<JpaBulkUpdateError> errors)
Provides a way for callers to set the_errors
without dealing with the serialization aspect.- Parameters:
errors
- the errors to serialize and set as_errors
- See Also:
BulkUpdateErrorListConverter
-
getErrors
@Nullable public List<JpaBulkUpdateError> getErrors()
Provides a way for callers to get the_errors
without dealing with the deserialization aspect.- Returns:
- a deserialized representation of
_errors
- See Also:
BulkUpdateErrorListConverter
-
setNotificationStates
public void setNotificationStates(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates)
- Specified by:
setNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates()
- Specified by:
getNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates(boolean fetch)
- Specified by:
getNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
fromMe
@NonNull public org.modelmapper.ModelMapper fromMe()
- Specified by:
fromMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
@NonNull public org.modelmapper.ModelMapper toMe()
- Specified by:
toMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getBusinessDomainType
public Class<?> getBusinessDomainType()
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getId
public String getId()
- Specified by:
getId
in interfacecom.broadleafcommerce.data.tracking.core.Identifiable
- See Also:
BulkUpdate.getId()
-
getName
public String getName()
- See Also:
BulkUpdate.getName()
-
get_errors
public String get_errors()
Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.Generally speaking, callers should use
getErrors()
andsetErrors(List)
and not directly deal with this field. In rare circumstances (such as update queries likeJpaCustomizedBulkUpdateRepository.setContainedErrors(JpaBulkUpdate)
), it may make sense to directly modify this value.Rather than simply annotating the column with the
@Convert
annotation, we have different methods that manually invoke theBulkUpdateErrorListConverter
. This is because the automatic-conversion does not work properly when usingCriteriaUpdate
. Hibernate would forcefully attempt to split the list into multiple query parameters and convert the elements individually (inQueryParameterBindingsImpl.expandListValuedParameters(java.lang.String, org.hibernate.engine.spi.SharedSessionContractImplementor)
), which caused errors to be thrown.- See Also:
BulkUpdate.getErrors()
,getErrors()
,setErrors(List)
-
getTotalRecordsToProcess
public long getTotalRecordsToProcess()
- See Also:
BulkUpdate.getTotalRecordsToProcess()
-
getNumberOfRecordsProcessed
public long getNumberOfRecordsProcessed()
- See Also:
BulkUpdate.getNumberOfRecordsProcessed()
-
getFilterString
public String getFilterString()
- See Also:
BulkUpdate.getFilterString()
-
getExclusions
public List<String> getExclusions()
- See Also:
BulkUpdate.getExclusions()
-
getInclusions
public List<String> getInclusions()
- See Also:
BulkUpdate.getInclusions()
-
getCreated
public Instant getCreated()
- See Also:
BulkUpdate.getCreated()
-
getLastUpdated
public Instant getLastUpdated()
- See Also:
BulkUpdate.getLastUpdated()
-
getType
public String getType()
- See Also:
BulkUpdate.getType()
-
getSerializedPayload
public String getSerializedPayload()
- See Also:
BulkUpdate.getSerializedPayload()
-
getTarget
public String getTarget()
- See Also:
BulkUpdate.getTarget()
-
getUpdatingSandboxId
public String getUpdatingSandboxId()
- See Also:
BulkUpdate.getUpdatingSandboxId()
-
getUpdatingSandboxName
public String getUpdatingSandboxName()
- See Also:
BulkUpdate.getUpdatingSandboxName()
-
getApplicationId
public String getApplicationId()
- See Also:
BulkUpdate.getApplicationId()
-
getTenantId
public String getTenantId()
- See Also:
BulkUpdate.getTenantId()
-
getAuthor
public String getAuthor()
- See Also:
BulkUpdate.getAuthor()
-
getUpdatingApplicationId
public String getUpdatingApplicationId()
- See Also:
BulkUpdate.getUpdatingApplicationId()
-
getUpdatingCatalogId
public String getUpdatingCatalogId()
- See Also:
BulkUpdate.getUpdatingCatalogId()
-
getUpdatingCustomerContextId
public String getUpdatingCustomerContextId()
-
isProductionBulkUpdate
public boolean isProductionBulkUpdate()
-
setId
public void setId(String id)
- See Also:
BulkUpdate.getId()
-
setName
public void setName(String name)
- See Also:
BulkUpdate.getName()
-
set_errors
public void set_errors(String _errors)
Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.Generally speaking, callers should use
getErrors()
andsetErrors(List)
and not directly deal with this field. In rare circumstances (such as update queries likeJpaCustomizedBulkUpdateRepository.setContainedErrors(JpaBulkUpdate)
), it may make sense to directly modify this value.Rather than simply annotating the column with the
@Convert
annotation, we have different methods that manually invoke theBulkUpdateErrorListConverter
. This is because the automatic-conversion does not work properly when usingCriteriaUpdate
. Hibernate would forcefully attempt to split the list into multiple query parameters and convert the elements individually (inQueryParameterBindingsImpl.expandListValuedParameters(java.lang.String, org.hibernate.engine.spi.SharedSessionContractImplementor)
), which caused errors to be thrown.- See Also:
BulkUpdate.getErrors()
,getErrors()
,setErrors(List)
-
setTotalRecordsToProcess
public void setTotalRecordsToProcess(long totalRecordsToProcess)
- See Also:
BulkUpdate.getTotalRecordsToProcess()
-
setNumberOfRecordsProcessed
public void setNumberOfRecordsProcessed(long numberOfRecordsProcessed)
- See Also:
BulkUpdate.getNumberOfRecordsProcessed()
-
setFilterString
public void setFilterString(String filterString)
- See Also:
BulkUpdate.getFilterString()
-
setExclusions
public void setExclusions(List<String> exclusions)
- See Also:
BulkUpdate.getExclusions()
-
setInclusions
public void setInclusions(List<String> inclusions)
- See Also:
BulkUpdate.getInclusions()
-
setCreated
public void setCreated(Instant created)
- See Also:
BulkUpdate.getCreated()
-
setLastUpdated
public void setLastUpdated(Instant lastUpdated)
- See Also:
BulkUpdate.getLastUpdated()
-
setType
public void setType(String type)
- See Also:
BulkUpdate.getType()
-
setSerializedPayload
public void setSerializedPayload(String serializedPayload)
- See Also:
BulkUpdate.getSerializedPayload()
-
setTarget
public void setTarget(String target)
- See Also:
BulkUpdate.getTarget()
-
setUpdatingSandboxId
public void setUpdatingSandboxId(String updatingSandboxId)
- See Also:
BulkUpdate.getUpdatingSandboxId()
-
setUpdatingSandboxName
public void setUpdatingSandboxName(String updatingSandboxName)
- See Also:
BulkUpdate.getUpdatingSandboxName()
-
setApplicationId
public void setApplicationId(String applicationId)
- See Also:
BulkUpdate.getApplicationId()
-
setTenantId
public void setTenantId(String tenantId)
- See Also:
BulkUpdate.getTenantId()
-
setAuthor
public void setAuthor(String author)
- See Also:
BulkUpdate.getAuthor()
-
setUpdatingApplicationId
public void setUpdatingApplicationId(String updatingApplicationId)
- See Also:
BulkUpdate.getUpdatingApplicationId()
-
setUpdatingCatalogId
public void setUpdatingCatalogId(String updatingCatalogId)
- See Also:
BulkUpdate.getUpdatingCatalogId()
-
setUpdatingCustomerContextId
public void setUpdatingCustomerContextId(String updatingCustomerContextId)
-
setProductionBulkUpdate
public void setProductionBulkUpdate(boolean productionBulkUpdate)
-
canEqual
protected boolean canEqual(Object other)
-
-