Interface ReferenceField

All Superinterfaces:
CustomField

public interface ReferenceField extends CustomField

A field with a reference value.


Example to create an instance using the builder pattern

     ReferenceField referenceField = ReferenceField.builder()
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @Valid @NotNull @Valid KeyReference getValue()

      References a resource by key

      Returns:
      value
    • setValue

      void setValue(KeyReference value)

      References a resource by key

      Parameters:
      value - value to be set
    • of

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

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

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

      static ReferenceFieldBuilder builder()
      builder factory method for ReferenceField
      Returns:
      builder
    • builder

      static ReferenceFieldBuilder builder(ReferenceField template)
      create builder for ReferenceField instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReferenceField

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

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