public class DataBinderImpl extends Object implements DataBinder
| Constructor and Description |
|---|
DataBinderImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(String name, File file)
Add a file to this data binder.
|
void |
addFile(String name, TransferFile file)
Add a file to this data binder
|
void |
addOptionList(String name, List<String> values)
Add an option list with the given names
|
void |
addResultSet(String name, DataResultSet resultSet)
Add a result set with the given name
|
boolean |
containsFiles()
Check if there are files
|
String |
getFieldType(String name)
Retrieve the field type for a given property.
|
Collection<String> |
getFieldTypeNames()
Retrieve all field names
|
TransferFile |
getFile(String name)
Retrieve a file from this data binder
|
Collection<String> |
getFileNames()
Retrieve all file names
|
Map<String,TransferFile> |
getFiles() |
String |
getLocal(String name)
Shortcut for
getLocalData().get(name) |
DataObject |
getLocalData()
Retrieve the local data
|
List<String> |
getOptionList(String name)
Retrieve a specific option list by name
|
Collection<String> |
getOptionListNames()
Retrieve all option list names
|
Map<String,List<String>> |
getOptionLists() |
DataResultSet |
getResultSet(String name)
Retrieve the result set by name
|
Collection<String> |
getResultSetNames()
Retrieve all result set names
|
Map<String,DataResultSet> |
getResultSets()
Retrieve a map representation of the result sets, indexed by result set name.
|
protected Map<String,String> |
loadFieldTypes()
Load the internal field types by examining the blFieldTypes local data.
|
void |
merge(DataBinder source)
This will merge copies of all the data from the source binder into this binder, overwriting existing values and result sets, if they exist.
|
void |
putLocal(String name, String value)
Shortcut for
getLocalData().put(name,value) |
void |
removeFieldType(String name)
Remove the field type mapping
|
void |
removeFile(String name)
Remove a file
|
void |
removeOptionList(String name)
Remove an option list
|
void |
removeResultSet(String name)
Remove the result set
|
protected void |
serializeFieldTypes()
Serialize the field types into the blFieldTypes
|
void |
setFieldType(String name, String type)
Set a field type for this data binder
|
void |
synchronizeData(DataFactory.Direction in)
Called after the localdata is set to initialize the binder based on LocalData values (blFieldTypes, etc.)
|
String |
toString() |
public Map<String,TransferFile> getFiles()
public void synchronizeData(DataFactory.Direction in)
in - true to sync local into fieldspublic DataObject getLocalData()
DataBindergetLocalData in interface DataBinderpublic String getFieldType(String name)
getFieldType in interface DataBindername - the property namepublic void setFieldType(String name, String type)
setFieldType in interface DataBindername - the field nametype - the typepublic Collection<String> getFieldTypeNames()
DataBindergetFieldTypeNames in interface DataBinderpublic void removeFieldType(String name)
removeFieldType in interface DataBindername - the property name to remove from the mappings tablepublic String getLocal(String name)
getLocalData().get(name)getLocal in interface DataBindername - the local property namepublic void putLocal(String name, String value)
getLocalData().put(name,value)putLocal in interface DataBindername - the local property namevalue - the local property valuepublic DataResultSet getResultSet(String name)
getResultSet in interface DataBindername - the result set namepublic Map<String,DataResultSet> getResultSets()
DataBinderDataBinder.addResultSet(String, DataResultSet) and DataBinder.removeResultSet(String) methods.getResultSets in interface DataBinderDataBinder.addResultSet(String, DataResultSet), DataBinder.removeResultSet(String), DataBinder.getResultSetNames()public void removeResultSet(String name)
removeResultSet in interface DataBindername - the result set name to removepublic Collection<String> getResultSetNames()
DataBindergetResultSetNames in interface DataBinderpublic void addResultSet(String name, DataResultSet resultSet)
addResultSet in interface DataBindername - the result set nameresultSet - the result setpublic List<String> getOptionList(String name)
getOptionList in interface DataBindername - the list namepublic Collection<String> getOptionListNames()
DataBindergetOptionListNames in interface DataBinderpublic void addOptionList(String name, List<String> values)
addOptionList in interface DataBindername - the option list namevalues - the valuespublic void removeOptionList(String name)
removeOptionList in interface DataBindername - the option list namepublic Collection<String> getFileNames()
DataBindergetFileNames in interface DataBinderpublic TransferFile getFile(String name)
getFile in interface DataBindername - the file namepublic void addFile(String name, File file) throws IOException
addFile (name, new TransferStream (file));
addFile in interface DataBindername - the file namefile - the file objectIOException - if the file cannot be readaddFile(String, oracle.stellent.ridc.model.TransferFile)public void addFile(String name, TransferFile file)
addFile in interface DataBindername - the file namefile - the file streampublic void removeFile(String name)
removeFile in interface DataBindername - the file namepublic boolean containsFiles()
DataBindercontainsFiles in interface DataBinderpublic void merge(DataBinder source)
merge in interface DataBindersource - the source databinderprotected Map<String,String> loadFieldTypes()
protected void serializeFieldTypes()