Class CustomObjectCompositeIdentifier
- java.lang.Object
 - 
- com.commercetools.sync.customobjects.helpers.CustomObjectCompositeIdentifier
 
 
- 
public final class CustomObjectCompositeIdentifier extends java.lang.ObjectThis class is only meant for the internal use of the commercetools-sync-java library.Since there is no one unique identifier for customObjects on the commercetools API, we uniquely identify a customObject as a composite id of the following fields: key, container. This class models such composite key.
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetContainer()java.lang.StringgetKey()inthashCode()static CustomObjectCompositeIdentifierof(io.sphere.sdk.customobjects.CustomObject customObject)Given aCustomObjectDraft, creates aCustomObjectCompositeIdentifierusing the following fields from the suppliedCustomObject:key: key ofCustomObject.getKey()container: container ofCustomObject.getContainer()static CustomObjectCompositeIdentifierof(io.sphere.sdk.customobjects.CustomObjectDraft customObjectDraft)Given aCustomObjectDraft, creates aCustomObjectCompositeIdentifierusing the following fields from the suppliedCustomObjectDraft:key: key ofCustomObjectDraft.getKey()container: container ofCustomObjectDraft.getContainer()static CustomObjectCompositeIdentifierof(java.lang.String identifierAsString)Given aStringwith a format "container|key", creates aCustomObjectCompositeIdentifierusing the following fields from the supplied identifier as string.static CustomObjectCompositeIdentifierof(java.lang.String key, java.lang.String container)Given aStringandString, creates aCustomObjectCompositeIdentifierusing the following fields from the supplied attributes.java.lang.StringtoString() 
 - 
 
- 
- 
Method Detail
- 
of
@Nonnull public static CustomObjectCompositeIdentifier of(@Nonnull io.sphere.sdk.customobjects.CustomObjectDraft customObjectDraft)
Given aCustomObjectDraft, creates aCustomObjectCompositeIdentifierusing the following fields from the suppliedCustomObjectDraft:- Parameters:
 customObjectDraft- a composite id is built using its fields.- Returns:
 - a composite id comprised of the fields of the supplied 
CustomObjectDraft. 
 
- 
of
@Nonnull public static CustomObjectCompositeIdentifier of(@Nonnull io.sphere.sdk.customobjects.CustomObject customObject)
Given aCustomObjectDraft, creates aCustomObjectCompositeIdentifierusing the following fields from the suppliedCustomObject:- Parameters:
 customObject- a composite id is built using its fields.- Returns:
 - a composite id comprised of the fields of the supplied 
CustomObject. 
 
- 
of
@Nonnull public static CustomObjectCompositeIdentifier of(@Nonnull java.lang.String key, @Nonnull java.lang.String container)
Given aStringandString, creates aCustomObjectCompositeIdentifierusing the following fields from the supplied attributes.- Parameters:
 key- key of CustomerObject to build composite Id.container- container of CustomerObject to build composite Id.- Returns:
 - a composite id comprised of the fields of the supplied 
keyandcontainer. 
 
- 
of
@Nonnull public static CustomObjectCompositeIdentifier of(@Nonnull java.lang.String identifierAsString)
Given aStringwith a format "container|key", creates aCustomObjectCompositeIdentifierusing the following fields from the supplied identifier as string.- Parameters:
 identifierAsString- string format of the identifier to build composite Id.- Returns:
 - a composite id comprised of the fields of the supplied 
keyandcontainer. 
 
- 
getKey
public java.lang.String getKey()
 
- 
getContainer
public java.lang.String getContainer()
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -