Package org.openmeetings.app.persistence.beans.adresses

Examples of org.openmeetings.app.persistence.beans.adresses.States


   * @return id of generated Adress-Object or NULL
   */
  public Long saveAddress(String street, String zip, String town,
      long states_id, String additionalname, String comment, String fax, String phone, String email) {
    try {
      States st = Statemanagement.getInstance().getStateById(states_id);

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
View Full Code Here


   * @return the updated Adress-Object or null
   */
  public Adresses updateAdress(long adresses_id, String street, String zip, String town,
      long states_id, String additionalname, String comment, String fax, String email, String phone) {
    try {
      States st = Statemanagement.getInstance().getStateById(states_id);
     
      Adresses adr = this.getAdressbyId(adresses_id);

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
View Full Code Here

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();

      States st = new States();
      st.setName(statename);
      st.setStarttime(new Date());
      st.setDeleted("false");

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

      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

      log.debug("added id " + id);
View Full Code Here

                String email = "";
                if (itemUsers.element("mail") != null) {
                  email = unformatString(itemUsers.element("mail").getText());
                }
               
                States st = Statemanagement.getInstance().getStateById(state_id);
                if (st == null) {
                  Statemanagement.getInstance().getStateById(1L);
                }
               
                Adresses adr = new Adresses();
View Full Code Here

    if(state != null){
      // Lookup for states
      List<States> states = Statemanagement.getInstance().getStates();
     
      for(int i = 0; i < states.size(); i++){
        States oneState = states.get(i);
     
        if(oneState.getName().equals(state)){
          state_id = oneState.getState_id();
          break;
        }
      }
     
    }
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 {

      States st = new States();
      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

    if (state != null) {
      // Lookup for states
      List<States> states = statemanagement.getStates();

      for (int i = 0; i < states.size(); i++) {
        States oneState = states.get(i);

        if (oneState.getName().equals(state)) {
          state_id = oneState.getState_id();
          break;
        }
      }

    }
View Full Code Here

            if (itemUsers.element("mail") != null) {
              email = unformatString(itemUsers.element("mail")
                  .getText());
            }

            States st = statemanagement.getStateById(state_id);
            if (st == null) {
              st = statemanagement.getStateById(1L);
            }

            us.setAdresses(street, zip, town,
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.adresses.States

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.