Record Class EmployeeVO
java.lang.Object
java.lang.Record
com.dataset.service.model.response.EmployeeVO
- Record Components:
id
- This is the unique identifier for employee record.name
- This is the name of the employee.departmentName
- This is the departmentName where employee works.location
- This is the location associated with department.age
- This is the age of employee.
public record EmployeeVO(UUID id, String name, String departmentName, String location, int age)
extends Record
This is the response class for returning the EmployeeVO(Employee view object) after transformation from entity layer.
-
Constructor Summary
ConstructorsConstructorDescriptionEmployeeVO
(UUID id, String name, String departmentName, String location, int age) Creates an instance of aEmployeeVO
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
age()
Returns the value of theage
record component.Returns the value of thedepartmentName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.location()
Returns the value of thelocation
record component.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EmployeeVO
Creates an instance of aEmployeeVO
record class.- Parameters:
id
- the value for theid
record componentname
- the value for thename
record componentdepartmentName
- the value for thedepartmentName
record componentlocation
- the value for thelocation
record componentage
- the value for theage
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
departmentName
Returns the value of thedepartmentName
record component.- Returns:
- the value of the
departmentName
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
age
public int age()Returns the value of theage
record component.- Returns:
- the value of the
age
record component
-