Package org.openqreg.bean

Examples of org.openqreg.bean.Centre


    if (null == centreId) {
      return false;
    }

    // check if the center id is an existing one.
    Centre center = Dispatcher.getInstance().getCentre(centreId);
    if (center.getId() == null) {
      // No center having current id was found.
      return false;
    }

    // get ucrBean for the user on this centreId
View Full Code Here


     
      User user = Dispatcher.getInstance().getUser(userId);

      AjaxWidgetListAnswer awla = addDefaultAnswer(user, awlr, "centrenameList");
     
      Centre centre = Dispatcher.getInstance().getCentre(
          user.getCentreid());
      String countryId = centre.getCountryid();
      String centreValue = getOtherAsString(awlr, "centreValue");
      Collection<CentreBean> col = CentreFinder
          .findByCountryIdAndSearchOthers(user, 100, countryId,
              centreValue);
      awla.setRowList(col);
View Full Code Here

  }

  @Test
  public void testHashCode() {

    Centre c1 = new Centre();
    Centre c2 = new Centre();

    assertTrue("Hashkoden skall vara samma f�r b�da Centre", c1.hashCode() == c2.hashCode());

    c1.setId("id");
    assertFalse("Hashkoden skall vara olika f�r Centren", c1.hashCode() == c2.hashCode());
    c2.setId("id");
    assertTrue("Hashkoden skall vara samma f�r b�da Centre", c1.hashCode() == c2.hashCode());

  }
View Full Code Here

  @Test
    @Ignore
  public void testGetCentreString(){
    String centreid = "TESTSE";
    Centre c1 = dispatcher.getCentre(centreid);
   
    try {
      Centre c2 = (Centre)CentreFinderBase.findByPrimaryKey(new CentreKey(centreid));
      assertEquals("Centreid should be the same", c1, c2);
    } catch (SQLException e) {
      fail("Database exception: "+ e.getMessage());
    }
   
View Full Code Here

  }

  @Test
  public void testEqualsObject() {
    Centre c1 = new Centre();
    Centre c2 = new Centre();

    assertEquals("Centren skall betraktas som lika", c1, c2);

    c1.setId("id");
    assertNotSame("Centren skall betraktas som lika", c1, c2);
    c2.setId("id");
    assertEquals("Centren skall betraktas som lika", c1, c2);
  }
View Full Code Here

  protected void createData(Connection con) throws SQLException {
    if (disp.checkAccess(user.getId(), "ADMINCENTRE_CREATE")) {
      long time = System.currentTimeMillis();
     
      if (!disp.checkAccess(user.getId(), "ADMINCENTRE_COUNTRYID")) {
        Centre usersCentre = disp.getCentre(user.getCentreid());
        centreBean.setCountryid(usersCentre.getCountryid());
      }     

        populateWithRequestData();

     
View Full Code Here

TOP

Related Classes of org.openqreg.bean.Centre

Copyright © 2018 www.massapicom. 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.