DreamTiger的梦幻乐园

随便写写,自得其乐,生活就是这样

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  29 Posts :: 0 Stories :: 13 Comments :: 0 Trackbacks
        Class classT = SequestPeptide.class;

        Criteria criteria 
= arg0.createCriteria(classT, "p");
        criteria.add(Restrictions.eq(
"project.id", projectId));
        criteria.setFirstResult(startRecord);
        criteria.setFetchSize(recordCount);
        criteria.setMaxResults(recordCount);
        criteria.addOrder(Order.asc(
"peptide"));

        Projection projection
=Projections.projectionList()
        .add( Projections.property(
"p.id"), "id" )
        .add( Projections.property(
"p.peptide"), "peptide" )
        .add( Projections.property(
"p.dtaFilename"), "dtaFilename" )
        .add( Projections.property(
"p.outFilename"), "outFilename" );
        criteria.setProjection(projection).setResultTransformer( 
new AliasToBeanResultTransformer(classT) );
        
return criteria.list();

posted on 2006-02-23 13:42 梦幻乐园 阅读(1020) 评论(0)  编辑  收藏 所属分类: Java

只有注册用户登录后才能发表评论。


网站导航: