Class ImmutableUserRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableUserRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,UserRecordValue
Immutable implementation of
UserRecordValue.
Use the builder to create immutable instances:
ImmutableUserRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableUserRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableUserRecordValue.static ImmutableUserRecordValuecopyOf(UserRecordValue instance) Creates an immutable copy of aUserRecordValuevalue.booleanThis instance is equal to all instances ofImmutableUserRecordValuethat have equal attribute values.getEmail()getName()inthashCode()Returns a lazily computed hash code from attributes:userKey,username,name,email,password,userType.toString()Prints the immutable valueUserRecordValuewith attribute values.final ImmutableUserRecordValueCopy the current immutable object by setting a value for theemailattribute.final ImmutableUserRecordValueCopy the current immutable object by setting a value for thenameattribute.final ImmutableUserRecordValuewithPassword(String value) Copy the current immutable object by setting a value for thepasswordattribute.final ImmutableUserRecordValuewithUserKey(Long value) Copy the current immutable object by setting a value for theuserKeyattribute.final ImmutableUserRecordValuewithUsername(String value) Copy the current immutable object by setting a value for theusernameattribute.final ImmutableUserRecordValuewithUserType(UserType value) Copy the current immutable object by setting a value for theuserTypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getUserKey
- Specified by:
getUserKeyin interfaceUserRecordValue- Returns:
- The value of the
userKeyattribute
-
getUsername
- Specified by:
getUsernamein interfaceUserRecordValue- Returns:
- The value of the
usernameattribute
-
getName
- Specified by:
getNamein interfaceUserRecordValue- Returns:
- The value of the
nameattribute
-
getEmail
- Specified by:
getEmailin interfaceUserRecordValue- Returns:
- The value of the
emailattribute
-
getPassword
- Specified by:
getPasswordin interfaceUserRecordValue- Returns:
- The value of the
passwordattribute
-
getUserType
- Specified by:
getUserTypein interfaceUserRecordValue- Returns:
- The value of the
userTypeattribute
-
withUserKey
Copy the current immutable object by setting a value for theuserKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userKey (can benull)- Returns:
- A modified copy of the
thisobject
-
withUsername
Copy the current immutable object by setting a value for theusernameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for username (can benull)- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withEmail
Copy the current immutable object by setting a value for theemailattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for email (can benull)- Returns:
- A modified copy of the
thisobject
-
withPassword
Copy the current immutable object by setting a value for thepasswordattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for password (can benull)- Returns:
- A modified copy of the
thisobject
-
withUserType
Copy the current immutable object by setting a value for theuserTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userType (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableUserRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:userKey,username,name,email,password,userType. -
toString
Prints the immutable valueUserRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aUserRecordValuevalue. 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 UserRecordValue instance
-
builder
Creates a builder forImmutableUserRecordValue.ImmutableUserRecordValue.builder() .withUserKey(Long | null) // nullableuserKey.withUsername(String | null) // nullableusername.withName(String | null) // nullablename.withEmail(String | null) // nullableemail.withPassword(String | null) // nullablepassword.withUserType(io.camunda.zeebe.protocol.record.value.UserType | null) // nullableuserType.build();- Returns:
- A new ImmutableUserRecordValue builder
-