SessionImpl Class

com.beasys.commerce.foundation
SessionImpl Class

public abstract class SessionImpl

    extends Object
    implements SessionBean

This is the base implementation of the Business Smart Component (BSC) Session interface. For each BSC Session derived interface, there will be a corresponding BSC SessionImpl with business methods that are mirrored. It also provides storage for an SessionContext and an implementation of the Set and Get Session Context methods.

Related Topics

Session


Hierarchy
Object
  SessionImpl
All Implemented Interfaces

EnterpriseBean, Serializable, SessionBean
Direct Known Subclasses

CatalogServiceImpl, CatalogWSImpl, DecryptorImpl, EncryptorImpl, ShippingHelperImpl

Field Summary

public SessionContext
_ctx
SessionContext
protected transient Context
_environmentNamingContext
Context
protected transient Hashtable
_environmentPropertyCache
Hashtable
protected transient boolean
_isDirty
boolean
 

Constructor Summary

SessionImpl()

SessionImpl constructor.
 

Method Summary

public void
clearRelationalBinding(String attributeIdentifier, Collection collection)
public void
clearRelationalBinding(String attributeIdentifier, Collection collection, Object o)
public void
clearRelationalBinding(String attributeIdentifier, Map map, Object key)
public void
clearRelationalBinding(String attributeIdentifier, Map map)
protected Collection
doRelationalBinding(String attributeIdentifier, Collection collection)
Add relational information to each element in a collection, AND synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off
protected Map
doRelationalBinding(String attributeIdentifier, Map map)
Add relational information to each element in a map, AND synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off
protected Object
doRelationalBindingOnElement(String attributeIdentifier, Object value)
Add relational information to a dependent object.
protected Belonging
doRelationalBindingOnElement(String attributeIdentifier, Belonging value)
Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
protected EJBObject
doRelationalBindingOnElement(String attributeIdentifier, EJBObject value)
Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off
protected Object
doRelationalBindingOnSingleton(String attributeIdentifier, Object value)
Add relational information to a dependent object.
protected Belonging
doRelationalBindingOnSingleton(String attributeIdentifier, Belonging value)
Add relational information to a belonging This feature is implemented by a plugin and by default is turned off
protected EJBObject
doRelationalBindingOnSingleton(String attributeIdentifier, EJBObject ejbObject)
Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off
protected Object
doRelationalBindingWithMapKey(String attributeIdentifier, Object object, Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off
protected EJBObject
doRelationalBindingWithMapKey(String attributeIdentifier, EJBObject ejbObject, Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off
protected Object
doRelationalBindingWithMapKey(String attributeIdentifier, Belonging belonging, Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off
public void
ejbActivate()
ejbActivate method.
public void
ejbCreate()
ejbCreate method.
public void
ejbPassivate()
ejbPassivate method.
public void
ejbPostCreate()
ejbPostCreate method.
public void
ejbRemove()
ejbRemove method.
protected Collection
enumerateRelationalBinding(String attributeIdentifier, Collection collection)
Add relational information to each element in a collection, but do not synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off
protected Map
enumerateRelationalBinding(String attributeIdentifier, Map map)
Add relational information to each element in a map, but do not synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off
protected Context
getEnvironmentNamingContext()
Returns the bean's environment naming context.
public Object
getEnvironmentProperty(String propertyName)
This method returns the value of the specified environment property.
public Object
getEnvironmentProperty(String propertyName, Object defaultValue)
This method returns the value of the specified environment property or the specified default value if the environment property is not found.
protected Hashtable
getEnvironmentPropertyCache()
Returns the bean's environment property cache
public PersistenceHelperPlugin
getPersistenceHelperPlugin()
Instantiates PersistenceHelperPlugin based on "...PersistenceHelperPlugin" property in commerce.properties file.
public SessionContext
getSessionContext()
getSessionContext method.
public void
setSessionContext(SessionContext ctx)
setSessionContext method.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.ejb.SessionBean
ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 

Field Detail

_ctx

public SessionContext _ctx


_environmentNamingContext

protected transient Context _environmentNamingContext


_environmentPropertyCache

protected transient Hashtable _environmentPropertyCache


_isDirty

protected transient boolean _isDirty

 

Constructor Detail

SessionImpl

public SessionImpl()
SessionImpl constructor.
 

Method Detail

clearRelationalBinding(String, Collection) Method

public void clearRelationalBinding(String attributeIdentifier, 
                                   Collection collection)

clearRelationalBinding(String, Collection, Object) Method

public void clearRelationalBinding(String attributeIdentifier, 
                                   Collection collection, 
                                   Object o)

clearRelationalBinding(String, Map, Object) Method

public void clearRelationalBinding(String attributeIdentifier, 
                                   Map map, 
                                   Object key)

clearRelationalBinding(String, Map) Method

public void clearRelationalBinding(String attributeIdentifier, 
                                   Map map)

doRelationalBinding(String, Collection) Method

protected Collection doRelationalBinding(String attributeIdentifier, 
                                         Collection collection)
Add relational information to each element in a collection, AND synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection
the target collection

Returns

the input collection

doRelationalBinding(String, Map) Method

protected Map doRelationalBinding(String attributeIdentifier, 
                                  Map map)
Add relational information to each element in a map, AND synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
map
the target map

Returns

the input map

doRelationalBindingOnElement(String, Object) Method

protected Object doRelationalBindingOnElement(String attributeIdentifier, 
                                              Object value)
Add relational information to a dependent object. This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value
instance of a dependent object

Returns

the input value with relational information added.

doRelationalBindingOnElement(String, Belonging) Method

protected Belonging doRelationalBindingOnElement(String attributeIdentifier, 
                                                 Belonging value)
Add relational information to a belonging This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value
instance of a belonging

Returns

the input value, with relational inforamtion added.

doRelationalBindingOnElement(String, EJBObject) Method

protected EJBObject doRelationalBindingOnElement(String attributeIdentifier, 
                                                 EJBObject value)
Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value
instance of an EJB object

Returns

the input value, with relational information added.

doRelationalBindingOnSingleton(String, Object) Method

protected Object doRelationalBindingOnSingleton(String attributeIdentifier, 
                                                Object value)
Add relational information to a dependent object. This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value
instance of a dependent object

Returns

the input value with relational information added.

doRelationalBindingOnSingleton(String, Belonging) Method

protected Belonging doRelationalBindingOnSingleton(String attributeIdentifier, 
                                                   Belonging value)
Add relational information to a belonging This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
value
instance of a belonging

Returns

the input value, with relational inforamtion added.

doRelationalBindingOnSingleton(String, EJBObject) Method

protected EJBObject doRelationalBindingOnSingleton(String attributeIdentifier, 
                                                   EJBObject ejbObject)
Add relational information to an EJBObject This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
ejbObject
instance of an EJB object

Returns

the input value, with relational information added.

doRelationalBindingWithMapKey(String, Object, Object) Method

protected Object doRelationalBindingWithMapKey(String attributeIdentifier, 
                                               Object object, 
                                               Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
object
the target collection

Returns

the input collection

doRelationalBindingWithMapKey(String, EJBObject, Object) Method

protected EJBObject doRelationalBindingWithMapKey(String attributeIdentifier, 
                                                  EJBObject ejbObject, 
                                                  Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
ejbObject
the target collection

Returns

the input collection

doRelationalBindingWithMapKey(String, Belonging, Object) Method

protected Object doRelationalBindingWithMapKey(String attributeIdentifier, 
                                               Belonging belonging, 
                                               Object key)
Add relational information to an element in a map, AND synchronize the element with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
belonging
the target collection

Returns

the input collection

ejbActivate() Method

public void ejbActivate()
throws EJBException
ejbActivate method.

Exceptions

EJBException

ejbCreate() Method

public void ejbCreate()
throws CreateException, EJBException
ejbCreate method.

Exceptions

CreateException
EJBException

ejbPassivate() Method

public void ejbPassivate()
throws EJBException
ejbPassivate method.

Exceptions

EJBException

ejbPostCreate() Method

public void ejbPostCreate()
throws CreateException, EJBException
ejbPostCreate method.

Exceptions

CreateException
EJBException

ejbRemove() Method

public void ejbRemove()
throws EJBException
ejbRemove method.

Exceptions

EJBException

enumerateRelationalBinding(String, Collection) Method

protected Collection enumerateRelationalBinding(String attributeIdentifier, 
                                                Collection collection)
Add relational information to each element in a collection, but do not synchronize the collection with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
collection
the target collection

Returns

the input collection

enumerateRelationalBinding(String, Map) Method

protected Map enumerateRelationalBinding(String attributeIdentifier, 
                                         Map map)
Add relational information to each element in a map, but do not synchronize the map with the persistence cache This feature is implemented by a plugin and by default is turned off

Parameters

attributeIdentifier
identifier for an attribute on a bean e.g. examples.buybeans.BeanieHat.numberOfPropellers
map
the target map

Returns

the input map

getEnvironmentNamingContext() Method

protected Context getEnvironmentNamingContext()
throws NamingException
Returns the bean's environment naming context.

Exceptions

NamingException

getEnvironmentProperty(String) Method

public Object getEnvironmentProperty(String propertyName)
throws NamingException
This method returns the value of the specified environment property.

Exceptions

NamingException

getEnvironmentProperty(String, Object) Method

public Object getEnvironmentProperty(String propertyName, 
                                     Object defaultValue)
throws NamingException
This method returns the value of the specified environment property or the specified default value if the environment property is not found.

Exceptions

NamingException

getEnvironmentPropertyCache() Method

protected Hashtable getEnvironmentPropertyCache()
Returns the bean's environment property cache


getPersistenceHelperPlugin() Method

public PersistenceHelperPlugin getPersistenceHelperPlugin()
Instantiates PersistenceHelperPlugin based on "...PersistenceHelperPlugin" property in commerce.properties file. This property can be specified either for each session, or as a "DefaultPersistenceHelperPlugin" property.

Returns

PersistenceHelperPlugin specific class that implements PersistenceHelperPlugin or null, if no HelperPlugin is specified

getSessionContext() Method

public SessionContext getSessionContext()
getSessionContext method.


setSessionContext(SessionContext) Method

public void setSessionContext(SessionContext ctx)
throws EJBException
setSessionContext method.

Exceptions

EJBException