26 lines
581 B
Java
Executable File
26 lines
581 B
Java
Executable File
package com.ankurm.hibernatedemo.namedquery;
|
|
|
|
/** JPQL/native constructor-result projection target. Plain class version. */
|
|
public class EmployeeDto {
|
|
private final Long id;
|
|
private final String firstName;
|
|
|
|
public EmployeeDto(Long id, String firstName) {
|
|
this.id = id;
|
|
this.firstName = firstName;
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getFirstName() {
|
|
return firstName;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "EmployeeDto{id=%s, firstName=%s}".formatted(id, firstName);
|
|
}
|
|
}
|