Package org.openbravo.model.ad.access

Examples of org.openbravo.model.ad.access.SessionStatus


    log.debug("Disabling triggers");
    Check.isNull(sessionStatus.get(), "There is already a ADSessionStatus present in this thread, "
        + "call enable before calling disable again");
    final boolean prevMode = OBContext.getOBContext().setInAdministratorMode(true);
    try {
      final SessionStatus localSessionStatus = OBProvider.getInstance().get(SessionStatus.class);
      localSessionStatus.setImporting(true);
      localSessionStatus.setClient(OBDal.getInstance().get(Client.class, "0"));
      localSessionStatus.setOrganization(OBDal.getInstance().get(Organization.class, "0"));
      OBDal.getInstance().save(localSessionStatus);
      OBDal.getInstance().flush();
      Check.isNotNull(localSessionStatus.getId(), "The id is not set after insert");
      sessionStatus.set(localSessionStatus);
    } finally {
      OBContext.getOBContext().setInAdministratorMode(prevMode);
    }
  }
View Full Code Here

TOP

Related Classes of org.openbravo.model.ad.access.SessionStatus

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.