Interface Type

All Superinterfaces:
BaseResource, DomainResource<Type>, Identifiable<Type>, Referencable<Type>, ResourceIdentifiable<Type>, TypeMixin, Versioned<Type>, WithKey

Type
Example to create an instance using the builder pattern

     Type type = Type.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .key("{key}")
             .name(nameBuilder -> nameBuilder)
             .plusResourceTypeIds(resourceTypeIdsBuilder -> resourceTypeIdsBuilder)
             .plusFieldDefinitions(fieldDefinitionsBuilder -> fieldDefinitionsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Type.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Type>
      Specified by:
      getId in interface Identifiable<Type>
      Specified by:
      getId in interface Versioned<Type>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Type.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Type>
      Specified by:
      getVersion in interface Versioned<Type>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Type was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Type was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      createdBy
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier of the Type.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Name of the Type.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Type.

      Returns:
      description
    • getResourceTypeIds

      @NotNull @NotNull List<ResourceTypeId> getResourceTypeIds()

      Resources and/or data types for which the Type is defined.

      Returns:
      resourceTypeIds
    • getFieldDefinitions

      @NotNull @Valid @NotNull @Valid List<FieldDefinition> getFieldDefinitions()

      Defines Custom Fields.

      Specified by:
      getFieldDefinitions in interface TypeMixin
      Returns:
      fieldDefinitions
    • setId

      void setId(String id)

      Unique identifier of the Type.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Type.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Type was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the Type was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Type.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the Type.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Type.

      Parameters:
      description - value to be set
    • setResourceTypeIds

      void setResourceTypeIds(ResourceTypeId... resourceTypeIds)

      Resources and/or data types for which the Type is defined.

      Parameters:
      resourceTypeIds - values to be set
    • setResourceTypeIds

      void setResourceTypeIds(List<ResourceTypeId> resourceTypeIds)

      Resources and/or data types for which the Type is defined.

      Parameters:
      resourceTypeIds - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(FieldDefinition... fieldDefinitions)

      Defines Custom Fields.

      Parameters:
      fieldDefinitions - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(List<FieldDefinition> fieldDefinitions)

      Defines Custom Fields.

      Parameters:
      fieldDefinitions - values to be set
    • of

      static Type of()
      factory method
      Returns:
      instance of Type
    • of

      static Type of(Type template)
      factory method to create a shallow copy Type
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Type deepCopy(@Nullable Type template)
      factory method to create a deep copy of Type
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static TypeBuilder builder()
      builder factory method for Type
      Returns:
      builder
    • builder

      static TypeBuilder builder(Type template)
      create builder for Type instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withType

      default <T> T withType(Function<Type,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Type> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference