Package io.dialob.client.api
Class ImmutableDetachedEntity
- java.lang.Object
-
- io.dialob.client.api.ImmutableDetachedEntity
-
- All Implemented Interfaces:
DialobStore.DetachedEntity
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDetachedEntity extends Object implements DialobStore.DetachedEntity
Immutable implementation ofDialobStore.DetachedEntity.Use the builder to create immutable instances:
ImmutableDetachedEntity.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDetachedEntity.BuilderBuilds instances of typeImmutableDetachedEntity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDetachedEntity.Builderbuilder()Creates a builder forImmutableDetachedEntity.static ImmutableDetachedEntitycopyOf(DialobStore.DetachedEntity instance)Creates an immutable copy of aDialobStore.DetachedEntityvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDetachedEntitythat have equal attribute values.io.dialob.api.form.FormEntitygetBody()LocalDateTimegetCreated()StringgetHash()inthashCode()Computes a hash code from attributes:hash,created,body.StringtoString()Prints the immutable valueDetachedEntitywith attribute values.ImmutableDetachedEntitywithBody(io.dialob.api.form.FormEntity value)Copy the current immutable object by setting a value for thebodyattribute.ImmutableDetachedEntitywithCreated(LocalDateTime value)Copy the current immutable object by setting a value for thecreatedattribute.ImmutableDetachedEntitywithHash(String value)Copy the current immutable object by setting a value for thehashattribute.
-
-
-
Method Detail
-
getHash
public String getHash()
- Specified by:
getHashin interfaceDialobStore.DetachedEntity- Returns:
- The value of the
hashattribute
-
getCreated
public LocalDateTime getCreated()
- Specified by:
getCreatedin interfaceDialobStore.DetachedEntity- Returns:
- The value of the
createdattribute
-
getBody
public io.dialob.api.form.FormEntity getBody()
- Specified by:
getBodyin interfaceDialobStore.DetachedEntity- Returns:
- The value of the
bodyattribute
-
withHash
public final ImmutableDetachedEntity withHash(String value)
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withCreated
public final ImmutableDetachedEntity withCreated(LocalDateTime value)
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withBody
public final ImmutableDetachedEntity withBody(io.dialob.api.form.FormEntity value)
Copy the current immutable object by setting a value for thebodyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for body- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDetachedEntitythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:hash,created,body.
-
toString
public String toString()
Prints the immutable valueDetachedEntitywith attribute values.
-
copyOf
public static ImmutableDetachedEntity copyOf(DialobStore.DetachedEntity instance)
Creates an immutable copy of aDialobStore.DetachedEntityvalue. 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 DetachedEntity instance
-
builder
public static ImmutableDetachedEntity.Builder builder()
Creates a builder forImmutableDetachedEntity.ImmutableDetachedEntity.builder() .hash(String) // requiredhash.created(java.time.LocalDateTime) // requiredcreated.body(io.dialob.api.form.FormEntity) // requiredbody.build();- Returns:
- A new ImmutableDetachedEntity builder
-
-