Package io.resys.thena.datasource
Class ImmutableTenantContext
java.lang.Object
io.resys.thena.datasource.TenantContext
io.resys.thena.datasource.ImmutableTenantContext
@Generated(from="TenantContext",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTenantContext
extends TenantContext
Immutable implementation of
TenantContext.
Use the builder to create immutable instances:
ImmutableTenantContext.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTenantContext.Nested classes/interfaces inherited from class io.resys.thena.datasource.TenantContext
TenantContext.WithTenant<T extends TenantContext.WithTenant<T>> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTenantContext.static ImmutableTenantContextcopyOf(TenantContext instance) Creates an immutable copy of aTenantContextvalue.booleanThis instance is equal to all instances ofImmutableTenantContextthat have equal attribute values.getDb()inthashCode()Computes a hash code from attributes:db,tenant,prefix.toString()Prints the immutable valueTenantContextwith attribute values.final ImmutableTenantContextCopy the current immutable object by setting a value for thedbattribute.final ImmutableTenantContextwithPrefix(String value) Copy the current immutable object by setting a value for theprefixattribute.final ImmutableTenantContextwithTenant(String value) Copy the current immutable object by setting a value for thetenantattribute.Methods inherited from class io.resys.thena.datasource.TenantContext
defaults, withTenant, withTenantPrefix
-
Method Details
-
getDb
- Specified by:
getDbin classTenantContext- Returns:
- The value of the
dbattribute
-
getTenant
- Specified by:
getTenantin classTenantContext- Returns:
- The value of the
tenantattribute
-
getPrefix
- Specified by:
getPrefixin classTenantContext- Returns:
- The value of the
prefixattribute
-
withDb
Copy the current immutable object by setting a value for thedbattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for db- Returns:
- A modified copy or the
thisobject
-
withTenant
Copy the current immutable object by setting a value for thetenantattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tenant- Returns:
- A modified copy or the
thisobject
-
withPrefix
Copy the current immutable object by setting a value for theprefixattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prefix- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableTenantContextthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:db,tenant,prefix. -
toString
Prints the immutable valueTenantContextwith attribute values. -
copyOf
Creates an immutable copy of aTenantContextvalue. 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 TenantContext instance
-
builder
Creates a builder forImmutableTenantContext.ImmutableTenantContext.builder() .db(String) // requireddb.tenant(String) // requiredtenant.prefix(String) // requiredprefix.build();- Returns:
- A new ImmutableTenantContext builder
-