Package org.apache.openmeetings.db.entity.user

Examples of org.apache.openmeetings.db.entity.user.State


        && userdata.get(ldapAttrs.get("countryAttr")) != null)
      state = userdata.get(ldapAttrs.get("countryAttr"));
   
    if (state != null) {
      // Lookup for states
      State oneState = statemanagement.getStateByName(state);
      if (oneState != null) {
        state_id = oneState.getState_id();
      }
    }

    // Create Country
    if (state_id < 0) {
View Full Code Here


      state = userdata.get(ldapAttrs.get("countryAttr"));
    }
   
    if (state != null) {
      // Lookup for states
      State oneState = statemanagement.getStateByName(state);
      if (oneState != null) {
        state_id = oneState.getState_id();
      }
    }
    // Create Country if not found
    if (state_id < 0) {
      Long id = statemanagement.addState(state);
View Full Code Here

  private StateDao stateDao;
 
  @Test
  public void doTestQuery() {
   
    State state_alabania = stateDao.getStateByName("Albania");
   
    State state_alabania_lower = stateDao.getStateByName("albaNia");
   
    assertTrue(state_alabania != null);
    assertTrue(state_alabania_lower != null);
    assertTrue(state_alabania.getState_id().equals(3L));
    assertTrue(state_alabania_lower.getState_id().equals(3L));
    assertTrue(state_alabania.getState_id().equals(state_alabania_lower.getState_id()));
   
  }
View Full Code Here

   * @return the id of the new state or null if an error occurred
   */
  public Long addState(String name, String shortName, int code) {
    try {

      State st = new State();
      st.setName(name);
      st.setShortName(shortName);
      st.setCode(code);
      st.setStarttime(new Date());
      st.setDeleted(false);

      st = em.merge(st);
      Long id = st.getState_id();

      log.debug("added id " + id);

      return id;
    } catch (Exception ex2) {
View Full Code Here

        && userdata.get(ldapAttrs.get("countryAttr")) != null)
      state = userdata.get(ldapAttrs.get("countryAttr"));
   
    if (state != null) {
      // Lookup for states
      State oneState = statemanagement.getStateByName(state);
      if (oneState != null) {
        state_id = oneState.getState_id();
      }
    }

    // Create Country
    if (state_id < 0) {
View Full Code Here

        && userdata.get(ldapAttrs.get("countryAttr")) != null)
      state = userdata.get(ldapAttrs.get("countryAttr"));
   
    if (state != null) {
      // Lookup for states
      State oneState = statemanagement.getStateByName(state);
      if (oneState != null) {
        state_id = oneState.getState_id();
      }
    }
    // Create Country if not found
    if (state_id < 0) {
      Long id = statemanagement.addState(state);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.user.State

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.