this is not a homework or the actual code. It is a quick example created to explain the situation.
public student {
private long studentId;
Private long studentName;
@Column(name = "ID")
getStudentId(){
}
@Column(name = "NAME"
getStudentName(){
}
}
is there a way to have a dyanmic way to get the column name
Criterion rest1 = Restrictions.eq("NAME", criteriaModel.getEncounterTypeClassCd());
dont want to hard code the column name is there a better way that doing what I am doing.