public abstract class BridgeAbstraction extends Object implements Serializable
On of the main tasks of this class is to provide methods to set/get and remove transient objects. The main purpose
of this concept is to store information which is not meant to be made persistent. for example you can store the last visited
webpages in the JaloSession object.
Note: You cannot assume that a transient value assigned to a jalo object is still bound if you are not explicitly holding the reference of the jalo object. if you for example bind a value to a product with a specific PK and are using some finder method to get this product back, the value could be removed. this is because the internal jalo object cache could have been purged.
| Modifier and Type | Field and Description |
|---|---|
protected BridgeInterface |
impl
the bridge implementation.
|
protected Tenant |
tenant |
| Constructor and Description |
|---|
BridgeAbstraction() |
| Modifier and Type | Method and Description |
|---|---|
BridgeInterface |
getImplementation()
returns the implementation object of this jalo bridge abstraction
|
Tenant |
getTenant() |
abstract Object |
getTransientObject(String key)
get a transient object.
|
abstract Map |
getTransientObjectMap()
Returns the Complete Map of transient objects.
|
void |
setImplementation(BridgeInterface impl)
sets the implementation object of this jalo bridge abstraction.
|
void |
setTenant(Tenant tenant) |
abstract void |
setTransientObject(String key,
Object value)
sets a transient object.
|
protected BridgeInterface impl
this variable is protected because of performance reasons. you can also use getImplementation(), but keep in mind, that every jalo method needs to call their relating implementation so we suggest to use 'impl'.
protected Tenant tenant
public void setImplementation(BridgeInterface impl)
impl - the BridgeInterface objectpublic Tenant getTenant()
public void setTenant(Tenant tenant)
public BridgeInterface getImplementation()
public abstract void setTransientObject(String key, Object value)
the value will be mapped to this object until
setTransientObject(key,null)
key - the keyvalue - may be null; this will remove the transient object mappingpublic abstract Object getTransientObject(String key)
a null is returned if no transient object is mapped to the given key.
key - public abstract Map getTransientObjectMap()
Note: Changes are directly reflected to the BridgeAbstraction object. The returned map is bound to the object. So be careful when modifying the map.
Copyright © 2017 SAP SE. All Rights Reserved.