Interface CustomObject
- All Superinterfaces:
BaseResource,CustomObjectMixin,DomainResource<CustomObject>,Identifiable<CustomObject>,Referencable<CustomObject>,Versioned<CustomObject>
Example to create an instance using the builder pattern
CustomObject customObject = CustomObject.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.container("{container}")
.key("{key}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomObjectBuilderbuilder()builder factory method for CustomObjectstatic CustomObjectBuilderbuilder(CustomObject template) create builder for CustomObject instancecopyDeep()static CustomObjectdeepCopy(CustomObject template) factory method to create a deep copy of CustomObject@NotNull StringNamespace to group CustomObjects.@NotNull ZonedDateTimeDate and time (UTC) the CustomObject was initially created.@Valid CreatedByIDs and references that created the CustomObject.@NotNull StringgetId()Unique identifier of the CustomObject.@NotNull StringgetKey()User-defined unique identifier of the CustomObject within the definedcontainer.@NotNull ZonedDateTimeDate and time (UTC) the CustomObject was last updated.@Valid LastModifiedByIDs and references that last modified the CustomObject.@NotNull ObjectgetValue()Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.@NotNull LongCurrent version of the CustomObject.static CustomObjectof()factory methodstatic CustomObjectof(CustomObject template) factory method to create a shallow copy CustomObjectstatic ReferenceTypeIdvoidsetContainer(String container) Namespace to group CustomObjects.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the CustomObject was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the CustomObject.voidUnique identifier of the CustomObject.voidUser-defined unique identifier of the CustomObject within the definedcontainer.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the CustomObject was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the CustomObject.voidCan be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.voidsetVersion(Long version) Current version of the CustomObject.static com.fasterxml.jackson.core.type.TypeReference<CustomObject>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomObject(Function<CustomObject, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.custom_object.CustomObjectMixin
toReferenceMethods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the CustomObject.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<CustomObject>- Specified by:
getIdin interfaceIdentifiable<CustomObject>- Specified by:
getIdin interfaceVersioned<CustomObject>- Returns:
- id
-
getVersion
Current version of the CustomObject.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<CustomObject>- Specified by:
getVersionin interfaceVersioned<CustomObject>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the CustomObject was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the CustomObject.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the CustomObject.
- Returns:
- createdBy
-
getContainer
Namespace to group CustomObjects.
- Returns:
- container
-
getKey
User-defined unique identifier of the CustomObject within the defined
container.- Returns:
- key
-
getValue
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
valuepoints to a non-existing object in such case.
- Returns:
- value
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
-
setId
Unique identifier of the CustomObject.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the CustomObject.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the CustomObject was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the CustomObject.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the CustomObject.
- Parameters:
createdBy- value to be set
-
setContainer
Namespace to group CustomObjects.
- Parameters:
container- value to be set
-
setKey
User-defined unique identifier of the CustomObject within the defined
container.- Parameters:
key- value to be set
-
setValue
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
valuepoints to a non-existing object in such case.
- Parameters:
value- value to be set
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
-
of
factory method- Returns:
- instance of CustomObject
-
of
factory method to create a shallow copy CustomObject- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CustomObject copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of CustomObject- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomObject- Returns:
- builder
-
builder
create builder for CustomObject instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCustomObject
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-