Package org.openqreg.bean

Examples of org.openqreg.bean.UserBean.create()


      CentreBean centre = BeanFactory.getCentre(id);
      centre.create(con);
     
      UserBean user = BeanFactory.getUser(id);
      user.setCentreid(centre.getId());
      user.create(con);
     
      Collection<UserBean> users = UserFinder.findByCentreid(con, centre.getId());
      assertTrue("Anv�ndaren hittades inte", users.contains(user));
      user.remove(con);
      centre.remove(con);
View Full Code Here


    try {
      con = DbHandler.getConnection();
      con.setAutoCommit(false);
     
      UserBean user = BeanFactory.getUser(Thread.currentThread().getId());
      user.create(con);
     
      UsergroupBean parent = new UsergroupBean();
      parent.setId("parent");
      parent.setStatus(new Integer(Status.ACTIVE));
      parent.setDescription("Parent usergroup");
View Full Code Here

      Connection con = DbHandler.getConnection();
      con.setAutoCommit(false);
     
      UserBean user1 = BeanFactory.getUser(Thread.currentThread().getId());
      user1.setAttribute("name1", "value1");
      user1.create(con);
      UserBean user2 = (UserBean)UserFinderBase.findByPrimaryKey(con, new UserKey(user1.getId()));
      assertEquals("Userna skall vara lika", user1, user2);
      con.rollback();
      con.close();
    } catch (SQLException sqle) {
View Full Code Here

      con.setAutoCommit(false);

      //Spara och ladda attribut
      UserBean user1 = BeanFactory.getUser(Thread.currentThread().getId());
      user1.setAttribute("name1", "value1");
      user1.create(con);
      UserBean user2 = (UserBean)UserFinderBase.findByPrimaryKey(con, new UserKey(user1.getId()));
      assertEquals("Attributen skall vara lika", user1.getAttribute("name1"), user2.getAttribute("name1"));
     
      //Radera attribut
      user2.removeAttribute("name1");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.