|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xulux.dataprovider.bean.BeanDataProvider
public final class BeanDataProvider
The BeanDataProvider is the main entry point for the dataprovider. It is the datasource
Constructor Summary | |
---|---|
BeanDataProvider()
Constructor for BeanDataProvider. |
Method Summary | |
---|---|
void |
addConverter(java.lang.Class clazz)
|
void |
addConverter(java.lang.String clazz)
Convenience method. |
void |
addMapping(org.xulux.api.dataprovider.IMapping mapping)
|
void |
clearMappings()
Clears all the mappings currently available |
org.xulux.api.dataprovider.IMapping |
createMapping(java.lang.Object object)
|
java.lang.Class |
getBaseClass()
Returns the baseClass. |
java.util.List |
getCache()
|
org.xulux.api.dataprovider.IConverter |
getConverter(java.lang.Class clazz)
|
org.xulux.api.dataprovider.IConverter |
getConverter(java.lang.Object object)
|
java.util.Map |
getConverters()
|
org.xulux.api.dataprovider.IMapping |
getMapping(java.lang.Class clazz)
|
BeanMapping |
getMapping(java.lang.Class clazz,
boolean newMapping)
|
BeanMapping |
getMapping(java.lang.Class clazz,
java.lang.String preferredName)
Tries to get a mapping based on the specified bean |
org.xulux.api.dataprovider.IMapping |
getMapping(java.lang.Object object)
Convenience method. |
org.xulux.api.dataprovider.IMapping |
getMapping(java.lang.String name)
|
java.util.Map |
getMappings()
Returns a clone of the original mapping map, so alteration doesn't effect the registry.. |
java.lang.String |
getPlainBeanName(java.lang.Class clazz)
|
java.lang.String |
getPossibleMappingName(java.lang.Class clazz)
Tries to find a possible name for the mapping |
java.lang.Object |
getValue(java.lang.Object mapping,
java.lang.String field,
java.lang.Object object)
|
void |
initialize()
|
void |
initialize(java.io.InputStream stream)
Initializes the dictionary from a stream The stream will be closed. |
void |
initialize(java.lang.Object object)
|
boolean |
isInCache(java.lang.Class clazz)
Checks to see if this class is currently being discovered. |
boolean |
needsPartValue()
|
void |
reset()
Reset all dictionary settings.. |
void |
setBaseClass(java.lang.Class baseClass)
Sets the baseClass. |
void |
setProperty(java.lang.String name,
java.lang.String value)
|
java.lang.Object |
setValue(java.lang.Object mapping,
java.lang.String field,
java.lang.Object object,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanDataProvider()
Method Detail |
---|
public org.xulux.api.dataprovider.IMapping getMapping(java.lang.String name)
name
- the name of the mapping
public java.util.Map getMappings()
getMappings
in interface org.xulux.api.dataprovider.IDataProvider
public void addMapping(org.xulux.api.dataprovider.IMapping mapping)
addMapping
in interface org.xulux.api.dataprovider.IDataProvider
org.xulux.dataprovider.IDataProvider#addMapping(org.xulux.dataprovider.IMapping)
public org.xulux.api.dataprovider.IMapping getMapping(java.lang.Class clazz)
clazz
- the class
public org.xulux.api.dataprovider.IMapping getMapping(java.lang.Object object)
getMapping
in interface org.xulux.api.dataprovider.IDataProvider
object
- the object to get the mapping for
public BeanMapping getMapping(java.lang.Class clazz, boolean newMapping)
clazz
- the class to get the mapping fornewMapping
- if true it creates the mapping and adds
it to the dictionary, if the name is not
yet known.
public BeanMapping getMapping(java.lang.Class clazz, java.lang.String preferredName)
clazz
- the classpreferredName
- the name to use for the mapping if it needs to be created
public java.lang.String getPlainBeanName(java.lang.Class clazz)
clazz
- the class
public java.lang.String getPossibleMappingName(java.lang.Class clazz)
clazz
- the class to investigate
public void initialize(java.lang.Object object)
org.xulux.dataprovider.IDictionary#initialize(java.lang.Object)
public void initialize(java.io.InputStream stream)
stream
- - a stream with the dictionary.xmlpublic java.lang.Class getBaseClass()
public void setBaseClass(java.lang.Class baseClass)
baseClass
- The baseClass to setpublic void clearMappings()
public void reset()
public boolean isInCache(java.lang.Class clazz)
clazz
- the class to look for
public java.util.List getCache()
public void addConverter(java.lang.Class clazz)
clazz
- - the class of the converter.public void addConverter(java.lang.String clazz)
clazz
- the clazz to add the converter forpublic org.xulux.api.dataprovider.IConverter getConverter(java.lang.Object object)
getConverter
in interface org.xulux.api.dataprovider.IDataProvider
object
- the object to get the convert for
public java.util.Map getConverters()
public org.xulux.api.dataprovider.IConverter getConverter(java.lang.Class clazz)
clazz
- the class to get the convert for
public void initialize()
initialize
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.initialize()
public java.lang.Object setValue(java.lang.Object mapping, java.lang.String field, java.lang.Object object, java.lang.Object value)
setValue
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.setValue(java.lang.Object, java.lang.String, java.lang.Object,
java.lang.Object)
public java.lang.Object getValue(java.lang.Object mapping, java.lang.String field, java.lang.Object object)
getValue
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.getValue(java.lang.Object, java.lang.String, java.lang.Object)
public boolean needsPartValue()
needsPartValue
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.needsPartValue()
public void setProperty(java.lang.String name, java.lang.String value)
setProperty
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.setProperty(java.lang.String, java.lang.String)
public org.xulux.api.dataprovider.IMapping createMapping(java.lang.Object object)
createMapping
in interface org.xulux.api.dataprovider.IDataProvider
IDataProvider.createMapping(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |