Interface GenericCustomObject<TValue>
- Type Parameters:
TValue- The type of the value of this custom object.
- All Superinterfaces:
BaseResource,DomainResource<GenericCustomObject<TValue>>,Identifiable<GenericCustomObject<TValue>>,Referencable<GenericCustomObject<TValue>>,Versioned<GenericCustomObject<TValue>>
public interface GenericCustomObject<TValue>
extends BaseResource, DomainResource<GenericCustomObject<TValue>>, Referencable<GenericCustomObject<TValue>>
entity to implement a type safe generic custom object
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> GenericCustomObjectBuilder<T>builder(GenericCustomObject<T> template) static <T> GenericCustomObjectBuilder<T>builder(T value) static <TValue> GenericCustomObject<TValue>deepCopy(GenericCustomObject<TValue> template) factory method to create a deep copy of CustomObject@NotNull StringA namespace to group custom objects.@NotNull ZonedDateTime@Valid CreatedByPresent on resources created after 2019-02-01 except for events not tracked.@NotNull StringgetId()The unique ID of this object.@NotNull StringgetKey()@NotNull ZonedDateTime@Valid LastModifiedByPresent on resources created after 2019-02-01 except for events not tracked.getValue()@NotNull Longstatic <T> GenericCustomObject<T>of()static <T> GenericCustomObject<T>of(GenericCustomObject<T> template) voidsetContainer(String container) voidsetCreatedAt(ZonedDateTime createdAt) set createdAtvoidsetCreatedBy(CreatedBy createdBy) voidset idvoidvoidsetLastModifiedAt(ZonedDateTime lastModifiedAt) set lastModifiedAtvoidsetLastModifiedBy(LastModifiedBy lastModifiedBy) voidvoidsetVersion(Long version) set versiondefault Referencedefault <T> TwithCustomObject(Function<GenericCustomObject<TValue>, T> helper) Methods inherited from interface com.commercetools.api.models.common.BaseResource
copyDeep, withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Description copied from interface:IdentifiableThe unique ID of this object.- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<TValue>- Specified by:
getIdin interfaceIdentifiable<TValue>- Specified by:
getIdin interfaceVersioned<TValue>- Returns:
- id
-
getVersion
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<TValue>- Specified by:
getVersionin interfaceVersioned<TValue>- Returns:
- version
-
getCreatedAt
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources created after 2019-02-01 except for events not tracked.
- Returns:
- LastModifiedBy
-
getCreatedBy
Present on resources created after 2019-02-01 except for events not tracked.
- Returns:
- CreatedBy
-
getContainer
A namespace to group custom objects.
- Returns:
- container name
-
getKey
-
getValue
-
setId
Description copied from interface:BaseResourceset id- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Description copied from interface:BaseResourceset version- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Description copied from interface:BaseResourceset createdAt- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Description copied from interface:BaseResourceset lastModifiedAt- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
-
setCreatedBy
-
setContainer
-
setKey
-
setValue
-
of
-
of
-
builder
-
builder
-
withCustomObject
-
toReference
- Specified by:
toReferencein interfaceReferencable<TValue>
-
deepCopy
@Nullable static <TValue> GenericCustomObject<TValue> deepCopy(@Nullable GenericCustomObject<TValue> template) factory method to create a deep copy of CustomObject- Parameters:
template- instance to be copied- Returns:
- copy instance
-