Interface DataObjectReference.Builder<T extends DataObject>

Type Parameters:
T - type of DataObject held in the last step.
All Known Subinterfaces:
DataObjectIdentifier.Builder<T>, DataObjectIdentifier.Builder.WithKey<T,K>, DataObjectReference.Builder.WithKey<T,K>
All Known Implementing Classes:
AbstractDataObjectIdentifierBuilder, AbstractDataObjectReferenceBuilder, DataObjectIdentifierBuilder, DataObjectIdentifierBuilderWithKey, DataObjectReferenceBuilder, DataObjectReferenceBuilderWithKey, InstanceIdentifier.Builder, InstanceIdentifier.KeyedBuilder
Enclosing interface:
DataObjectReference<T extends DataObject>

public static sealed interface DataObjectReference.Builder<T extends DataObject> permits DataObjectReference.Builder.WithKey<T,K>, DataObjectIdentifier.Builder<T>, AbstractDataObjectReferenceBuilder<T>
A builder of DataObjectReference objects.
  • Method Details

    • augmentation

      <A extends Augmentation<? super T>> @NonNull DataObjectReference.Builder<A> augmentation(@NonNull Class<A> augmentation)
      Update this builder to build a reference to a specific augmentation of the data object this builder currently points to.
      Type Parameters:
      A - augmentation type
      Parameters:
      augmentation - augmentation class
      Returns:
      this builder
      Throws:
      NullPointerException - if augmentation is null
    • child

      <N extends ChildOf<? super T>> @NonNull DataObjectReference.Builder<N> child(@NonNull Class<N> container)
      Append the specified container as a child of the data object this build currently references. This method should be used when you want to build an instance identifier by appending top-level elements.
      Type Parameters:
      N - Container type
      Parameters:
      container - Container to append
      Returns:
      this builder
      Throws:
      NullPointerException - if container is null
    • child

      <C extends ChoiceIn<? super T> & DataObject, N extends ChildOf<? super C>> @NonNull DataObjectReference.Builder<N> child(Class<C> caze, @NonNull Class<N> container)
      Append the specified container as a child of the data object this build currently references. This method should be used when you want to build an reference by appending a container node to the identifier and the container is defined in a grouping used in a case statement.
      Type Parameters:
      C - Case type
      N - Container type
      Parameters:
      caze - Choice case class
      container - Container to append
      Returns:
      this builder
      Throws:
      NullPointerException - if container is null
    • child

      <N extends EntryObject<N, K> & ChildOf<? super T>, K extends Key<N>> @NonNull DataObjectReference.Builder.WithKey<N,K> child(@NonNull Class<@NonNull N> listItem, @NonNull K listKey)
      Append the specified listItem as a child of the data object this build currently references. This method should be used when you want to build a reference by appending a specific list element to the identifier.
      Type Parameters:
      N - List type
      K - Key type
      Parameters:
      listItem - List to append
      listKey - List key
      Returns:
      this builder
      Throws:
      NullPointerException - if any argument is null
    • child

      <C extends ChoiceIn<? super T> & DataObject, K extends Key<N>, N extends EntryObject<N, K> & ChildOf<? super C>> @NonNull DataObjectReference.Builder.WithKey<N,K> child(@NonNull Class<C> caze, @NonNull Class<N> listItem, @NonNull K listKey)
      Append the specified listItem as a child of the data object this build currently references. This method should be used when you want to build a reference by appending a specific list element to the identifier and the list is defined in a grouping used in a case statement.
      Type Parameters:
      C - Case type
      K - Key type
      N - List type
      Parameters:
      caze - Choice case class
      listItem - List to append
      listKey - List key
      Returns:
      this builder
      Throws:
      NullPointerException - if any argument is null
    • build

      @NonNull DataObjectReference<T> build()
      Build the data object reference.
      Returns:
      resulting DataObjectReference.