Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.common
Class ApplSessionNamespace

java.lang.Object
  extended by oracle.apps.fnd.applcore.common.ApplSessionNamespace
All Implemented Interfaces:
java.io.Serializable, LwsSessionNamespace

public class ApplSessionNamespace
extends java.lang.Object
implements LwsSessionNamespace, java.io.Serializable

The ApplSessionNamespace contains the attribute-value pairs of a given namespace for a given session.

See Also:
Serialized Form

Method Summary
static ApplSessionNamespace createNamespace(ApplSession session, java.lang.String namespaceName)
          This associates a brand new namespace with the specified session, and returns it.
 ApplSessionAttribute deleteAttribute(java.lang.String attrName)
          This deletes the attribute on this instance of the namespace and updates the database as well.
static java.lang.String[] getAllNameSpaces(java.lang.String SessionId)
           
 ApplSessionAttribute getAttribute(java.lang.String attrName)
          This fetches the specified attribute.
 java.util.HashMap<java.lang.String,LwsSessionAttribute> getAttributeMap()
          Returns a HashMap containing all the name, value pairs of this current namespace.
 java.util.Hashtable<java.lang.String,LwsSessionAttribute> getAttributes()
          Deprecated. use the get that returns a HashMap instead
 java.lang.String getName()
          Return the name of the namespace.
static ApplSessionNamespace getNamespace(ApplSession session, java.lang.String namespaceName)
          Return the ApplSessionNamespace representation of the specified namespace belonging to the passed in session.
static ApplSessionNamespace getNamespace(ApplSession session, java.lang.String namespaceName, java.sql.Connection conn)
          Return the ApplSessionNamespace representation of the specified namespace belonging to the passed in session.
static ApplSessionNamespace getSparseNamespace(ApplSession session, java.lang.String namespaceName)
          Deprecated. - for performance reasons, we are moving away from the use of sparse namespaces.
static boolean namespaceExists(ApplSession session, java.lang.String namespaceName)
          Return whether the namespace exists for the specified session.
static boolean namespaceExists(ApplSession session, java.lang.String namespaceName, java.sql.Connection conn)
          Return whether the namespace exists for the specified session.
 ApplSessionAttribute setAttribute(java.lang.String attrName, java.lang.String attrValue)
          This sets the attribute on this instance of the namespace and updates the database as well.
 ApplSessionAttribute setAttribute(java.lang.String attrName, java.lang.String attrValue, boolean isTransient)
          This sets the attribute on this instance of the namespace but allows you to specify a flag specifying that the attribute not be persisted to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNamespace

public static ApplSessionNamespace getNamespace(ApplSession session,
                                                java.lang.String namespaceName)
Return the ApplSessionNamespace representation of the specified namespace belonging to the passed in session. The session passed in must already be attached to a connection. This creates a new, fully-populated ApplSessionNamespace instance every time.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
Returns:
the namespace object, or null if it does not exist

getNamespace

public static ApplSessionNamespace getNamespace(ApplSession session,
                                                java.lang.String namespaceName,
                                                java.sql.Connection conn)
Return the ApplSessionNamespace representation of the specified namespace belonging to the passed in session. The session passed in must already be attached to a connection. This creates a new, fully-populated ApplSessionNamespace instance every time.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
conn - the connection to use, if null one will be fetched
Returns:
the namespace object, or null if it does not exist

getSparseNamespace

public static ApplSessionNamespace getSparseNamespace(ApplSession session,
                                                      java.lang.String namespaceName)
Deprecated. - for performance reasons, we are moving away from the use of sparse namespaces.

Return the ApplSessionNamespace representation of the specified namespace belonging to the passed in session. The session passed in must already be attached to a connection. This creates a sparse representation of the namespace - no attributes are selected. A new ApplSessionNamespace instance is returned every time.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
Returns:
the namespace object, or null if it does not exist

createNamespace

public static ApplSessionNamespace createNamespace(ApplSession session,
                                                   java.lang.String namespaceName)
This associates a brand new namespace with the specified session, and returns it. The session passed in must already be attached to a connection.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
Returns:
the namespace object

getName

public java.lang.String getName()
Return the name of the namespace.

Specified by:
getName in interface LwsSessionNamespace
Returns:
the name of the namespace as a String

getAttribute

public ApplSessionAttribute getAttribute(java.lang.String attrName)
This fetches the specified attribute. It first checks if it is cached in the java layer, if not it will hit the database

Specified by:
getAttribute in interface LwsSessionNamespace
Parameters:
attrName - name of the attribute to get
Returns:
the ApplSessionAttribute associated with this name

setAttribute

public ApplSessionAttribute setAttribute(java.lang.String attrName,
                                         java.lang.String attrValue)
This sets the attribute on this instance of the namespace and updates the database as well.

Specified by:
setAttribute in interface LwsSessionNamespace
Parameters:
attrName - name of the attribute to set
attrValue - value to set the attribute to
Returns:

setAttribute

public ApplSessionAttribute setAttribute(java.lang.String attrName,
                                         java.lang.String attrValue,
                                         boolean isTransient)
This sets the attribute on this instance of the namespace but allows you to specify a flag specifying that the attribute not be persisted to the database. This is useful for temporary storage of attributes that are only needed in the middle tier. Once an attribute is created as a transient attribute, it will always be transient even if subsequent set calls do not specify the isTransient flag (similarly, non-transient attributes will always be non-transient).

Parameters:
attrName - name of the attribute to set
attrValue - value to set the attribute to
isTransient - whether the attribute should be saved to the database
Returns:

deleteAttribute

public ApplSessionAttribute deleteAttribute(java.lang.String attrName)
This deletes the attribute on this instance of the namespace and updates the database as well.

Parameters:
attrName - name of the attribute to delete
Returns:
the attribute that was deleted

getAttributes

public java.util.Hashtable<java.lang.String,LwsSessionAttribute> getAttributes()
Deprecated. use the get that returns a HashMap instead

Returns a HashMap containing all the name, value pairs of this current namespace. If this is not a fully populated namespace, this hashtable will be empty.

Specified by:
getAttributes in interface LwsSessionNamespace
Returns:
a Hashtable containing the name/value pairs of this namespace

getAttributeMap

public java.util.HashMap<java.lang.String,LwsSessionAttribute> getAttributeMap()
Returns a HashMap containing all the name, value pairs of this current namespace.

Returns:
a Hashtable containing the name/value pairs of this namespace

namespaceExists

public static boolean namespaceExists(ApplSession session,
                                      java.lang.String namespaceName)
Return whether the namespace exists for the specified session.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
Returns:
whether the namespace exists in the specified session

namespaceExists

public static boolean namespaceExists(ApplSession session,
                                      java.lang.String namespaceName,
                                      java.sql.Connection conn)
Return whether the namespace exists for the specified session.

Parameters:
session - the attached parent session of the namespace
namespaceName - the name of the namespace
conn - the attached connection to execute this check against
Returns:
whether the namespace exists in the specified session

getAllNameSpaces

public static java.lang.String[] getAllNameSpaces(java.lang.String SessionId)

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.