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) @NotNull String
A namespace to group custom objects.@NotNull ZonedDateTime
@Valid CreatedBy
Present on resources created after 2019-02-01 except for events not tracked.@NotNull String
getId()
The unique ID of this object.@NotNull String
getKey()
@NotNull ZonedDateTime
@Valid LastModifiedBy
Present on resources created after 2019-02-01 except for events not tracked.getValue()
@NotNull Long
static <T> GenericCustomObject<T>
of()
static <T> GenericCustomObject<T>
of
(GenericCustomObject<T> template) void
setContainer
(String container) void
setCreatedAt
(ZonedDateTime createdAt) set createdAtvoid
setCreatedBy
(CreatedBy createdBy) void
set idvoid
void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) set lastModifiedAtvoid
setLastModifiedBy
(LastModifiedBy lastModifiedBy) void
void
setVersion
(Long version) set versiondefault Reference
default <T> T
withCustomObject
(Function<GenericCustomObject<TValue>, T> helper) Methods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Description copied from interface:Identifiable
The unique ID of this object.- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<TValue>
- Specified by:
getId
in interfaceIdentifiable<TValue>
- Specified by:
getId
in interfaceVersioned<TValue>
- Returns:
- id
-
getVersion
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<TValue>
- Specified by:
getVersion
in interfaceVersioned<TValue>
- Returns:
- version
-
getCreatedAt
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
- Specified by:
getLastModifiedAt
in 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:BaseResource
set id- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Description copied from interface:BaseResource
set version- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Description copied from interface:BaseResource
set createdAt- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Description copied from interface:BaseResource
set lastModifiedAt- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
-
setCreatedBy
-
setContainer
-
setKey
-
setValue
-
of
-
of
-
builder
-
builder
-
withCustomObject
-
toReference
- Specified by:
toReference
in interfaceReferencable<TValue>
-