Пример #1
0
 /** Finalize. Remove Role */
 @Override
 protected void finalize() throws Throwable {
   if (m_context != null) {
     int gwtServerID = m_context.getContextAsInt(MRole.GWTSERVERID);
     if (gwtServerID > 0) MRole.resetGwt(gwtServerID);
   }
   super.finalize();
 } // finalize
Пример #2
0
 /**
  * Execute Query for Tab
  *
  * @param AD_Tab_ID tab
  * @param queryVO optional query
  * @param context record context for link columns and other variables
  * @param queryResultID stored query identifier provided by client
  * @return number of records or -1 if error
  */
 public int executeQuery(
     int AD_Tab_ID, QueryVO queryVO, HashMap<String, String> context, int queryResultID) {
   UITab tab = getTab(AD_Tab_ID);
   if (tab == null) {
     log.config("Not found AD_Tab_ID=" + AD_Tab_ID);
     return -1;
   }
   ArrayList<String[]> result = tab.executeQueryString(queryVO, context, m_context);
   if (result == null) {
     log.config("Not Result for AD_Tab_ID=" + AD_Tab_ID);
     return -1;
   }
   MRole role = getRole();
   // return -1 to indicate query exceeds
   if (role.isQueryMax(result.size())) {
     m_results.put(queryResultID, new ArrayList<String[]>());
     return -1;
   }
   m_results.put(queryResultID, result);
   return result.size();
 } // executeQuery
Пример #3
0
  /**
   * Logout
   *
   * @param expired expire
   */
  public void logout(boolean expired) {

    // End Session
    MSession session = MSession.get(m_context); // finish
    if (session != null) {
      if (expired) {
        if (session.getDescription() == null) session.setDescription("Expired");
        else session.setDescription(session.getDescription() + " Expired");
      }
      session.logout(); // saves
    }
    if (m_context != null) {
      int gwtServerID = m_context.getContextAsInt(MRole.GWTSERVERID);
      if (gwtServerID > 0) MRole.resetGwt(gwtServerID);
    }
    // Clear Cache
    m_tabs.clear();
    m_fields.clear();
    // m_windows.clear();
    m_context.clear();
    m_results.clear();
    //

  } // logout