Class 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
BulkUpdate
for use with a JPA-supported datastore.- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
org.modelmapper.ModelMapper
fromMe()
Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.Class<?>
Provides a way for callers to get the_errors
without dealing with the deserialization aspect.getId()
getName()
List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>
List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>
getNotificationStates
(boolean fetch) long
long
getType()
int
hashCode()
boolean
void
set_errors
(String _errors) Stores aList
ofJpaBulkUpdateError
serialized as a JSON in the data store.void
setApplicationId
(String applicationId) void
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
void
setInclusions
(List<String> inclusions) void
setLastUpdated
(Instant lastUpdated) void
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
void
setTenantId
(String tenantId) void
setTotalRecordsToProcess
(long totalRecordsToProcess) void
void
setUpdatingApplicationId
(String updatingApplicationId) void
setUpdatingCatalogId
(String updatingCatalogId) void
setUpdatingCustomerContextId
(String updatingCustomerContextId) void
setUpdatingSandboxId
(String updatingSandboxId) void
setUpdatingSandboxName
(String updatingSandboxName) org.modelmapper.ModelMapper
toMe()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMe
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationState
-
Constructor Details
-
JpaBulkUpdate
public JpaBulkUpdate()
-
-
Method Details
-
getStatus
-
setStatus
-
setErrors
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:
-
getErrors
Provides a way for callers to get the_errors
without dealing with the deserialization aspect.- Returns:
- a deserialized representation of
_errors
- See Also:
-
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
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getId
- Specified by:
getId
in interfacecom.broadleafcommerce.data.tracking.core.Identifiable
- See Also:
-
getName
- See Also:
-
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:
-
getTotalRecordsToProcess
public long getTotalRecordsToProcess()- See Also:
-
getNumberOfRecordsProcessed
public long getNumberOfRecordsProcessed()- See Also:
-
getFilterString
- See Also:
-
getExclusions
- See Also:
-
getInclusions
- See Also:
-
getCreated
- See Also:
-
getLastUpdated
- See Also:
-
getType
- See Also:
-
getSerializedPayload
- See Also:
-
getTarget
- See Also:
-
getUpdatingSandboxId
- See Also:
-
getUpdatingSandboxName
- See Also:
-
getApplicationId
- See Also:
-
getTenantId
- See Also:
-
getAuthor
- See Also:
-
getUpdatingApplicationId
- See Also:
-
getUpdatingCatalogId
- See Also:
-
getUpdatingCustomerContextId
-
isProductionBulkUpdate
public boolean isProductionBulkUpdate() -
setId
- See Also:
-
setName
- See Also:
-
set_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:
-
setTotalRecordsToProcess
public void setTotalRecordsToProcess(long totalRecordsToProcess) - See Also:
-
setNumberOfRecordsProcessed
public void setNumberOfRecordsProcessed(long numberOfRecordsProcessed) - See Also:
-
setFilterString
- See Also:
-
setExclusions
- See Also:
-
setInclusions
- See Also:
-
setCreated
- See Also:
-
setLastUpdated
- See Also:
-
setType
- See Also:
-
setSerializedPayload
- See Also:
-
setTarget
- See Also:
-
setUpdatingSandboxId
- See Also:
-
setUpdatingSandboxName
- See Also:
-
setApplicationId
- See Also:
-
setTenantId
- See Also:
-
setAuthor
- See Also:
-
setUpdatingApplicationId
- See Also:
-
setUpdatingCatalogId
- See Also:
-
setUpdatingCustomerContextId
-
setProductionBulkUpdate
public void setProductionBulkUpdate(boolean productionBulkUpdate) -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-