Class MSession

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_Session, I_Persistent, Evaluatee, ImmutablePOSupport

public class MSession extends X_AD_Session implements ImmutablePOSupport
Session Model.
Version:
$Id: MSession.java,v 1.3 2006/07/30 00:58:05 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1810182 ] Session lost after cache reset
  • BF [ 1892156 ] MSession is not really cached
  • See Also:
    • Constructor Details

      • MSession

        public MSession(Properties ctx, String AD_Session_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        AD_Session_UU - UUID key
        trxName - Transaction
      • 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 Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MSession

        public MSession(Properties ctx, String Remote_Addr, String Remote_Host, String WebSession, String trxName)
        New Session 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 Session Constructor
        Parameters:
        ctx - context
        trxName - transaction
      • MSession

        public MSession(MSession copy)
        Copy constructor
        Parameters:
        copy -
      • MSession

        public MSession(Properties ctx, MSession copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MSession

        public MSession(Properties ctx, MSession copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • get

        @Deprecated public static MSession get(Properties ctx, boolean createNew)
        Deprecated.
        use Get and Create functions.
        Get existing or create local session
        Parameters:
        ctx - context
        createNew - create if not found
        Returns:
        session session
      • get

        public static MSession get(Properties ctx)
        Get session from context
        Parameters:
        ctx - context
        Returns:
        session
      • create

        public static MSession create(Properties ctx)
        Create new session for context
        Parameters:
        ctx - context
        Returns:
        session
      • get

        public static MSession get(Properties ctx, String Remote_Addr, String Remote_Host, String WebSession)
        Get existing or create new 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:
        true if this is a Web Store Session.
      • setWebStoreSession

        public void setWebStoreSession(boolean webStoreSession)
        Set Web Store Session
        Parameters:
        webStoreSession - Web Store Session flag
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_AD_Session
        Returns:
        info
      • logout

        public void logout()
        Logout this session
      • changeLog

        @Deprecated 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 (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
        event -
        Returns:
        saved change log or null
      • changeLog

        public MChangeLog changeLog(String TrxName, int AD_ChangeLog_ID, int AD_Table_ID, int AD_Column_ID, int Record_ID, String Record_UU, int AD_Client_ID, int AD_Org_ID, Object OldValue, Object NewValue, String event)
        Create Change Log (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
        Record_UU - record UUID
        AD_Client_ID - client
        AD_Org_ID - org
        OldValue - old
        NewValue - new
        event -
        Returns:
        saved change log or null
      • getCachedSessionCount

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

        public MSession markImmutable()
        Description copied from interface: ImmutablePOSupport
        mark PO as immutable
        Specified by:
        markImmutable in interface ImmutablePOSupport
        Returns:
        PO