31 lines
745 B
Java
Executable File
31 lines
745 B
Java
Executable File
package com.ankurm.hibernatedemo.procedure;
|
|
|
|
/**
|
|
* Plain DTO (NOT an @Entity) used as the {@code @ConstructorResult} target for
|
|
* {@code EmployeeSummaryMapping} in {@link ProcEmployee}, backing the "result set mapped to a
|
|
* DTO via @SqlResultSetMapping" requirement in docs/08-stored-procedures.md.
|
|
*/
|
|
public class EmployeeSummary {
|
|
|
|
private final Integer id;
|
|
private final String name;
|
|
|
|
public EmployeeSummary(Integer id, String name) {
|
|
this.id = id;
|
|
this.name = name;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "EmployeeSummary{id=%s, name=%s}".formatted(id, name);
|
|
}
|
|
}
|