for the query you can do
Code:
Criteria criteria = session.createCriteria(Student.class);
criteria.add(Expression.like("remarks", remark);
criteria.add(Expression.eq("rollino", rollino);
return criteria.list()
don't create a hbm file for the mapping you have annotations to do that
Code:
@Entity
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private long rollino;
@Column(name = "remarks", length = 20, nullable = true)
private String remarks;
...getter and setter
}