Class AbstractExchangeObject
- All Implemented Interfaces:
PassthroughProperties,ExchangeObject,Serializable
- Direct Known Subclasses:
Attribute,DefaultBatchItemErrorHandler.ErrorExchangeObject,EntityExchangeObject,Prices,Translation
EntityExchangeObject instead.
The intention for this is to be used on any entities that will be passed to APIs for persistence or perhaps a class containing a group of entities.
If the class is just a property of an entity, this is unneeded. NOTE: If the previous statement
is true, re-consider if you need to define a class at all. This service just passes data through
as-is without needing to explicitly define every property on an entity. Unless you need to
perform some kind of action using the data, you do not need to define a class.
If you need a custom complex data structure, it is recommended that you extend an existing entity
and define the relationship there rather than use the
AbstractPassthroughProperties.getCustomProperties(), which makes use of @JsonAnyGetter
and JsonAnySetter.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()booleanvoidsetCorrelationId(String correlationId) voidsetJsonPath(String jsonPath) voidsetNewlyCreated(boolean newlyCreated) Set to true if the object is newly created.voidsetParentCorrelationId(String parentCorrelationId) toString()Methods inherited from class com.broadleafcommerce.dataexchange.domain.catalog.product.AbstractPassthroughProperties
containsCustomProperty, getCustomProperties, getCustomProperty, setCustomProperties, setCustomPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.dataexchange.domain.ExchangeObject
getContextState, getId, setContextState, setId
-
Constructor Details
-
AbstractExchangeObject
public AbstractExchangeObject()
-
-
Method Details
-
getParentCorrelationId
- Specified by:
getParentCorrelationIdin interfaceExchangeObject
-
getCorrelationId
- Specified by:
getCorrelationIdin interfaceExchangeObject
-
isNewlyCreated
public boolean isNewlyCreated()- Specified by:
isNewlyCreatedin interfaceExchangeObject- Returns:
- true if the object is newly created. Note that this is not always applicable to all objects.
-
getJsonPath
- Specified by:
getJsonPathin interfaceExchangeObject
-
setParentCorrelationId
- Specified by:
setParentCorrelationIdin interfaceExchangeObject
-
setCorrelationId
- Specified by:
setCorrelationIdin interfaceExchangeObject
-
setNewlyCreated
public void setNewlyCreated(boolean newlyCreated) Description copied from interface:ExchangeObjectSet to true if the object is newly created. This may not be applicable to all objects.- Specified by:
setNewlyCreatedin interfaceExchangeObject- Parameters:
newlyCreated- true if the object is newly created
-
setJsonPath
- Specified by:
setJsonPathin interfaceExchangeObject
-
toString
- Overrides:
toStringin classAbstractPassthroughProperties
-
equals
-
canEqual
-
hashCode
public int hashCode()
-