Hibernate对象关系的QBC的几种查询方法:
基本查询,分组查询,使用内置聚集函数,组合查询,分页查询
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import javax.persistence.Query;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Expression;
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.ProjectionList;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import javassist.expr.NewArray;
public class test {
public static void main(String[]