Class ImmutableEntityState

java.lang.Object
io.resys.hdes.client.spi.store.ImmutableEntityState
All Implemented Interfaces:
ThenaConfig.EntityState

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEntityState extends Object implements ThenaConfig.EntityState
Immutable implementation of ThenaConfig.EntityState.

Use the builder to create immutable instances: ImmutableEntityState.builder().

  • Method Details

    • getSrc

      Specified by:
      getSrc in interface ThenaConfig.EntityState
      Returns:
      The value of the src attribute
    • getEntity

      public HdesStore.StoreEntity getEntity()
      Specified by:
      getEntity in interface ThenaConfig.EntityState
      Returns:
      The value of the entity attribute
    • withSrc

      Copy the current immutable object by setting a value for the src attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for src
      Returns:
      A modified copy of the this object
    • withEntity

      public final ImmutableEntityState withEntity(HdesStore.StoreEntity value)
      Copy the current immutable object by setting a value for the entity attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for entity
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableEntityState that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: src, entity.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value EntityState with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableEntityState copyOf(ThenaConfig.EntityState instance)
      Creates an immutable copy of a ThenaConfig.EntityState value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable EntityState instance
    • builder

      public static ImmutableEntityState.Builder builder()
      Creates a builder for ImmutableEntityState.
       ImmutableEntityState.builder()
          .src(io.resys.thena.api.envelope.QueryEnvelope<io.resys.thena.api.actions.GitPullActions.PullObject>) // required src
          .entity(io.resys.hdes.client.api.HdesStore.StoreEntity) // required entity
          .build();
       
      Returns:
      A new ImmutableEntityState builder