Interface DateAttribute
- All Superinterfaces:
Attribute
This type represents an attribute whose value is a date.
Example to create an instance using the builder pattern
DateAttribute dateAttribute = DateAttribute.builder()
.value(LocalDate.parse("2022-01-01"))
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DateAttributeBuilderbuilder()builder factory method for DateAttributestatic DateAttributeBuilderbuilder(DateAttribute template) create builder for DateAttribute instancecopyDeep()static DateAttributedeepCopy(DateAttribute template) factory method to create a deep copy of DateAttribute@NotNull LocalDategetValue()A date in the formatYYYY-MM-DD.static DateAttributeof()factory methodstatic DateAttributeof(DateAttribute template) factory method to create a shallow copy DateAttributevoidA date in the formatYYYY-MM-DD.static com.fasterxml.jackson.core.type.TypeReference<DateAttribute>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDateAttribute(Function<DateAttribute, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.productvariants.Attribute
getName, getType, setName, withAttribute
-
Field Details
-
DATE
discriminator value for DateAttribute- See Also:
-
-
Method Details
-
getValue
A date in the format
YYYY-MM-DD.- Returns:
- value
-
setValue
A date in the format
YYYY-MM-DD.- Parameters:
value- value to be set
-
of
factory method- Returns:
- instance of DateAttribute
-
of
factory method to create a shallow copy DateAttribute- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DateAttribute copyDeep() -
deepCopy
factory method to create a deep copy of DateAttribute- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DateAttribute- Returns:
- builder
-
builder
create builder for DateAttribute instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDateAttribute
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-