首页 试题广场 > 试题详情
多选题

【C015260】下面代码中,能正确返回用户名为tom,并且密码为12345678的所有User对象的有():

  • A.String hql= "from User u where u.name=? and u.password=?"
    this.getHibernateTemplate().find(hql, new String[]{"tom", "12345678"});
  • B.User u=new User();    
    u.setPassword("12345678");
    u.setName("tom");
    this.getHibernateTemplate().findByExample(u);
  • C.this.getHibernateTemplate().find("from User u where u.name=? and u.passowrd=?", "tom","12345678");
  • D.String queryString = "select * from User u where u.name=:xname and u.password=:xpassword"; 
    String[] paramName= new String[]{"xname", "xpassword"};
    String[] values= new String[]{"tom", "12345678"};
    this.getHibernateTemplate().findByNamedParam(queryString, paramName, values);
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 0个回答
    Ke星小伙伴儿们都不晓得答案吖~
    快来帮帮他们吧~
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部