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 booleanbooleanorg.modelmapper.ModelMapperfromMe()Stores aListofJpaBulkUpdateErrorserialized as a JSON in the data store.Class<?>Provides a way for callers to get the_errorswithout 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) longlonggetType()inthashCode()booleanvoidset_errors(String _errors) Stores aListofJpaBulkUpdateErrorserialized as a JSON in the data store.voidsetApplicationId(String applicationId) voidvoidsetCreated(Instant created) voidsetErrors(List<JpaBulkUpdateError> errors) Provides a way for callers to set the_errorswithout dealing with the serialization aspect.voidsetExclusions(List<String> exclusions) voidsetFilterString(String filterString) voidvoidsetInclusions(List<String> inclusions) voidsetLastUpdated(Instant lastUpdated) voidvoidsetNotificationStates(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates) voidsetNumberOfRecordsProcessed(long numberOfRecordsProcessed) voidsetProductionBulkUpdate(boolean productionBulkUpdate) voidsetSerializedPayload(String serializedPayload) voidsetStatus(BulkUpdateStatus status) voidvoidsetTenantId(String tenantId) voidsetTotalRecordsToProcess(long totalRecordsToProcess) voidvoidsetUpdatingApplicationId(String updatingApplicationId) voidsetUpdatingCatalogId(String updatingCatalogId) voidsetUpdatingCustomerContextId(String updatingCustomerContextId) voidsetUpdatingSandboxId(String updatingSandboxId) voidsetUpdatingSandboxName(String updatingSandboxName) org.modelmapper.ModelMappertoMe()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMeMethods 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_errorswithout 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_errorswithout 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:
setNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates()- Specified by:
getNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates(boolean fetch) - Specified by:
getNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
fromMe
@NonNull public org.modelmapper.ModelMapper fromMe()- Specified by:
fromMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
@NonNull public org.modelmapper.ModelMapper toMe()- Specified by:
toMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getBusinessDomainType
- Specified by:
getBusinessDomainTypein interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getId
- Specified by:
getIdin interfacecom.broadleafcommerce.data.tracking.core.Identifiable- See Also:
-
getName
- See Also:
-
get_errors
Stores aListofJpaBulkUpdateErrorserialized 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
@Convertannotation, 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 aListofJpaBulkUpdateErrorserialized 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
@Convertannotation, 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()
-