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()
DataBinder
getLocalData
in interface DataBinder
public String getFieldType(String name)
getFieldType
in interface DataBinder
name
- the property namepublic void setFieldType(String name, String type)
setFieldType
in interface DataBinder
name
- the field nametype
- the typepublic Collection<String> getFieldTypeNames()
DataBinder
getFieldTypeNames
in interface DataBinder
public void removeFieldType(String name)
removeFieldType
in interface DataBinder
name
- the property name to remove from the mappings tablepublic String getLocal(String name)
getLocalData().get(name)
getLocal
in interface DataBinder
name
- the local property namepublic void putLocal(String name, String value)
getLocalData().put(name,value)
putLocal
in interface DataBinder
name
- the local property namevalue
- the local property valuepublic DataResultSet getResultSet(String name)
getResultSet
in interface DataBinder
name
- the result set namepublic Map<String,DataResultSet> getResultSets()
DataBinder
DataBinder.addResultSet(String, DataResultSet)
and DataBinder.removeResultSet(String)
methods.getResultSets
in interface DataBinder
DataBinder.addResultSet(String, DataResultSet)
,
DataBinder.removeResultSet(String)
,
DataBinder.getResultSetNames()
public void removeResultSet(String name)
removeResultSet
in interface DataBinder
name
- the result set name to removepublic Collection<String> getResultSetNames()
DataBinder
getResultSetNames
in interface DataBinder
public void addResultSet(String name, DataResultSet resultSet)
addResultSet
in interface DataBinder
name
- the result set nameresultSet
- the result setpublic List<String> getOptionList(String name)
getOptionList
in interface DataBinder
name
- the list namepublic Collection<String> getOptionListNames()
DataBinder
getOptionListNames
in interface DataBinder
public void addOptionList(String name, List<String> values)
addOptionList
in interface DataBinder
name
- the option list namevalues
- the valuespublic void removeOptionList(String name)
removeOptionList
in interface DataBinder
name
- the option list namepublic Collection<String> getFileNames()
DataBinder
getFileNames
in interface DataBinder
public TransferFile getFile(String name)
getFile
in interface DataBinder
name
- the file namepublic void addFile(String name, File file) throws IOException
addFile (name, new TransferStream (file));
addFile
in interface DataBinder
name
- 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 DataBinder
name
- the file namefile
- the file streampublic void removeFile(String name)
removeFile
in interface DataBinder
name
- the file namepublic boolean containsFiles()
DataBinder
containsFiles
in interface DataBinder
public void merge(DataBinder source)
merge
in interface DataBinder
source
- the source databinderprotected Map<String,String> loadFieldTypes()
protected void serializeFieldTypes()