Class MSession

    • Constructor Detail

      • MSession

        public MSession​(Properties ctx,
                        int AD_Session_ID,
                        String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_Session_ID - id
        trxName - transaction
      • MSession

        public MSession​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load Costructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MSession

        public MSession​(Properties ctx,
                        String Remote_Addr,
                        String Remote_Host,
                        String WebSession,
                        String trxName)
        New (remote) Constructor
        Parameters:
        ctx - context
        Remote_Addr - remote address
        Remote_Host - remote host
        WebSession - web session
        trxName - transaction
      • MSession

        public MSession​(Properties ctx,
                        String trxName)
        New (local) Constructor
        Parameters:
        ctx - context
        trxName - transaction
    • Method Detail

      • get

        public static MSession get​(Properties ctx,
                                   boolean createNew)
        Get existing or create local session
        Parameters:
        ctx - context
        createNew - create if not found
        Returns:
        session session
      • get

        public static MSession get​(Properties ctx,
                                   String Remote_Addr,
                                   String Remote_Host,
                                   String WebSession)
        Get existing or create remote session
        Parameters:
        ctx - context
        Remote_Addr - remote address
        Remote_Host - remote host
        WebSession - web session
        Returns:
        session
      • isWebStoreSession

        public boolean isWebStoreSession()
        Is it a Web Store Session
        Returns:
        Returns true if Web Store Session.
      • setWebStoreSession

        public void setWebStoreSession​(boolean webStoreSession)
        Set Web Store Session
        Parameters:
        webStoreSession - The webStoreSession to set.
      • logout

        public void logout()
        Session Logout
      • changeLog

        public MChangeLog changeLog​(String TrxName,
                                    int AD_ChangeLog_ID,
                                    int AD_Table_ID,
                                    int AD_Column_ID,
                                    int Record_ID,
                                    int AD_Client_ID,
                                    int AD_Org_ID,
                                    Object OldValue,
                                    Object NewValue)
        Deprecated.
        Preserved for backward compatibility
      • changeLog

        public MChangeLog changeLog​(String TrxName,
                                    int AD_ChangeLog_ID,
                                    int AD_Table_ID,
                                    int AD_Column_ID,
                                    int Record_ID,
                                    int AD_Client_ID,
                                    int AD_Org_ID,
                                    Object OldValue,
                                    Object NewValue,
                                    String event)
        Create Change Log only if table is logged
        Parameters:
        TrxName - transaction name
        AD_ChangeLog_ID - 0 for new change log
        AD_Table_ID - table
        AD_Column_ID - column
        Record_ID - record
        AD_Client_ID - client
        AD_Org_ID - org
        OldValue - old
        NewValue - new
        Returns:
        saved change log or null
      • getCachedSessionCount

        public static int getCachedSessionCount()
        Returns:
        number of cached sessions