public class PojoPathContextBean extends Object implements PojoPathContext
PojoPathContext interface as simple Java bean.DefaultPojoPathContext| Modifier and Type | Field and Description |
|---|---|
private ComposedValueConverter |
additionalConverter |
private PojoPathFunctionManager |
additionalFunctionManager |
private Map<Object,Object> |
cache |
private PojoFactory |
pojoFactory |
private Properties |
properties |
private PojoPathRecognizer |
recognizer |
| Constructor and Description |
|---|
PojoPathContextBean()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ComposedValueConverter |
getAdditionalConverter()
This method gets an optional
ComposedValueConverter that is used in favor to
ComposedValueConverter registered to the PojoPathNavigator itself. |
PojoPathFunctionManager |
getAdditionalFunctionManager()
This method gets an optional
PojoPathFunctionManager. |
Map<Object,Object> |
getCache()
This method provides a cache that is used by the
PojoPathNavigator to speed up repetitive calls
with the same initial Pojo and PojoPaths with a common prefix. |
PojoFactory |
getPojoFactory()
This method gets an optional
PojoFactory instance used if favor to the PojoFactory
registered to the PojoPathNavigator itself. |
Properties |
getProperties()
This method gets the properties of the context.
|
PojoPathRecognizer |
getRecognizer()
This method gets an optional
recognizer that adds support for the
visitor-pattern. |
void |
setAdditionalConverter(ComposedValueConverter additionalConverter)
This method sets the
additional converter . |
void |
setAdditionalFunctionManager(PojoPathFunctionManager additionalFunctionManager)
This method sets the
additional function-manager. |
void |
setCache(Map<Object,Object> cache)
This method sets the
cache. |
void |
setPojoFactory(PojoFactory pojoFactory)
This method sets the
pojo-factory. |
void |
setProperties(Properties properties)
This method sets the
properties. |
void |
setRecognizer(PojoPathRecognizer recognizer)
This method sets the
recognizer. |
private Map<Object,Object> cache
getCache()private Properties properties
getProperties()private PojoPathRecognizer recognizer
getRecognizer()private ComposedValueConverter additionalConverter
getAdditionalConverter()private PojoPathFunctionManager additionalFunctionManager
getAdditionalFunctionManager()private PojoFactory pojoFactory
getPojoFactory()public PojoPathContextBean()
null.public PojoPathFunctionManager getAdditionalFunctionManager()
PojoPathFunctionManager. PojoPathFunctions
provided by this manager overrules the
PojoPathFunctions that may be provided by the PojoPathNavigator itself. While
PojoPathFunctions that may be registered globally in the PojoPathNavigator should be
stateless and thread-safe, the PojoPathFunctions provided here may be stateful depending on the
usage of this context.getAdditionalFunctionManager in interface PojoPathContextPojoPathFunctionManager of this context or null if no context-specific
PojoPathFunctions should be provided.public void setAdditionalFunctionManager(PojoPathFunctionManager additionalFunctionManager)
additional function-manager.additionalFunctionManager - is the PojoPathFunctionManager to set.public ComposedValueConverter getAdditionalConverter()
ComposedValueConverter that is used in favor to
ComposedValueConverter registered to the PojoPathNavigator itself.getAdditionalConverter in interface PojoPathContextComposedValueConverter of this context or null if no context-specific
ComposedValueConverter is provided.public void setAdditionalConverter(ComposedValueConverter additionalConverter)
additional converter .additionalConverter - is the ComposedValueConverter to set.public Map<Object,Object> getCache()
PojoPathNavigator to speed up repetitive calls
with the same initial Pojo and PojoPaths with a common prefix. Pojo changed
outside the navigator the result will be wrong because the evaluation used an old value from the cache. PojoPathNavigator only adds objects from the cache.
It will never remove cached objects. To avoid memory-leaks, you should use a PojoPathContext
instance only per transaction, per request, or whatever your grouping block will be. PojoPathNavigator to be thread-safe and more efficient and NOT to expose it for external usage.
The internal structure of the cache may change in future releases. Use the recognizer to track visited Pojos. getCache in interface PojoPathContextMap to use as cache or null to disable caching.HashMap,
WeakHashMappublic void setCache(Map<Object,Object> cache)
cache.cache - is the cache to set.public Properties getProperties()
PojoPathFunctions for
evaluation. Please note that conditional evaluation can conflict with caching. Ensure
that such PojoPathFunctions are declared to be NOT deterministic.getProperties in interface PojoPathContextpublic void setProperties(Properties properties)
properties.properties - are the Properties to set.public PojoPathRecognizer getRecognizer()
recognizer that adds support for the
visitor-pattern. Therefore all POJOs traversed by the PojoPathNavigator are
recognized by the returned object.getRecognizer in interface PojoPathContextPojoPathRecognizer or null to turn this feature off.public void setRecognizer(PojoPathRecognizer recognizer)
recognizer.recognizer - is the PojoPathRecognizer to set.public PojoFactory getPojoFactory()
PojoFactory instance used if favor to the PojoFactory
registered to the PojoPathNavigator itself. The PojoFactory is used to
create new Pojos.getPojoFactory in interface PojoPathContextPojoFactory or null if no context-specific PojoFactory is
provided.public void setPojoFactory(PojoFactory pojoFactory)
pojo-factory.pojoFactory - is the PojoFactory to set.Copyright © 2001–2015 mmm-Team. All rights reserved.