Class ZoneBuilder
Example to create an instance using the builder pattern
Zone zone = Zone.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name("{name}")
.plusLocations(locationsBuilder -> locationsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.build()
builds Zone with checking for non-null required valuesbuilds Zone without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Zone was initially created.IDs and references that created the Zone.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Zone.description
(String description) Description of the Zone.Date and time (UTC) the Zone was initially created.IDs and references that created the Zone.Description of the Zone.getId()
Unique identifier of the Zone.getKey()
User-defined unique identifier of the Zone.Date and time (UTC) the Zone was last updated.IDs and references that last modified the Zone.List of locations that belong to the Zone.getName()
Name of the Zone.Current version of the Zone.Unique identifier of the Zone.User-defined unique identifier of the Zone.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Zone was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Zone.IDs and references that last modified the Zone.List of locations that belong to the Zone.List of locations that belong to the Zone.Name of the Zone.static ZoneBuilder
of()
factory method for an instance of ZoneBuilderstatic ZoneBuilder
create builder for Zone instanceplusLocations
(Location... locations) List of locations that belong to the Zone.plusLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.setLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.Current version of the Zone.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Zone.IDs and references that last modified the Zone.withLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.
-
Constructor Details
-
ZoneBuilder
public ZoneBuilder()
-
-
Method Details
-
id
Unique identifier of the Zone.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Zone.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Zone was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Zone was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Zone.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Zone.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Zone.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Zone.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Zone.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Zone.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Zone.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Zone.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the Zone.
- Parameters:
description
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
withLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
addLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
setLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
getId
Unique identifier of the Zone.
- Returns:
- id
-
getVersion
Current version of the Zone.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Zone was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Zone.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Zone.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Zone.
- Returns:
- key
-
getName
Name of the Zone.
- Returns:
- name
-
getDescription
Description of the Zone.
- Returns:
- description
-
getLocations
List of locations that belong to the Zone.
- Returns:
- locations
-
build
builds Zone with checking for non-null required values -
buildUnchecked
builds Zone without checking for non-null required values- Returns:
- Zone
-
of
factory method for an instance of ZoneBuilder- Returns:
- builder
-
of
create builder for Zone instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-