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 CustomObjectBuilder
builder()
builder factory method for CustomObjectstatic CustomObjectBuilder
builder
(CustomObject template) create builder for CustomObject instancestatic CustomObject
deepCopy
(CustomObject template) factory method to create a deep copy of CustomObject@NotNull String
Namespace to group CustomObjects.@NotNull ZonedDateTime
Date and time (UTC) the CustomObject was initially created.@Valid CreatedBy
IDs and references that created the CustomObject.@NotNull String
getId()
Unique identifier of the CustomObject.@NotNull String
getKey()
User-defined unique identifier of the CustomObject within the definedcontainer
.@NotNull ZonedDateTime
Date and time (UTC) the CustomObject was last updated.@Valid LastModifiedBy
IDs and references that last modified the CustomObject.@NotNull Object
getValue()
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.@NotNull Long
Current version of the CustomObject.static CustomObject
of()
factory methodstatic CustomObject
of
(CustomObject template) factory method to create a shallow copy CustomObjectstatic ReferenceTypeId
void
setContainer
(String container) Namespace to group CustomObjects.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the CustomObject was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the CustomObject.void
Unique identifier of the CustomObject.void
User-defined unique identifier of the CustomObject within the definedcontainer
.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the CustomObject was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the CustomObject.void
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.void
setVersion
(Long version) Current version of the CustomObject.static com.fasterxml.jackson.core.type.TypeReference<CustomObject>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomObject
(Function<CustomObject, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.custom_object.CustomObjectMixin
toReference
Methods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the CustomObject.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<CustomObject>
- Specified by:
getId
in interfaceIdentifiable<CustomObject>
- Specified by:
getId
in interfaceVersioned<CustomObject>
- Returns:
- id
-
getVersion
Current version of the CustomObject.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<CustomObject>
- Specified by:
getVersion
in interfaceVersioned<CustomObject>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the CustomObject was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Specified by:
getLastModifiedAt
in 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
value
points 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:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the CustomObject.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the CustomObject was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Specified by:
setLastModifiedAt
in 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
value
points 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
-
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
-