Package oracle.stellent.ridc.model.impl
Class DataBinderImpl
java.lang.Object
oracle.stellent.ridc.model.impl.DataBinderImpl
- All Implemented Interfaces:
DataBinder
Default databinder implementation. This object is NOT serializable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a file to this data binder.voidaddFile(String name, TransferFile file) Add a file to this data bindervoidaddOptionList(String name, List<String> values) Add an option list with the given namesvoidaddResultSet(String name, DataResultSet resultSet) Add a result set with the given namebooleanCheck if there are filesgetFieldType(String name) Retrieve the field type for a given property.Retrieve all field namesRetrieve a file from this data binderRetrieve all file namesgetFiles()Shortcut forgetLocalData().get(name)Retrieve the local datagetOptionList(String name) Retrieve a specific option list by nameRetrieve all option list namesgetResultSet(String name) Retrieve the result set by nameRetrieve all result set namesRetrieve a map representation of the result sets, indexed by result set name.Load the internal field types by examining the blFieldTypes local data.voidmerge(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.voidShortcut forgetLocalData().put(name,value)voidremoveFieldType(String name) Remove the field type mappingvoidremoveFile(String name) Remove a filevoidremoveOptionList(String name) Remove an option listvoidremoveResultSet(String name) Remove the result setprotected voidSerialize the field types into the blFieldTypesvoidsetFieldType(String name, String type) Set a field type for this data bindervoidCalled after the localdata is set to initialize the binder based on LocalData values (blFieldTypes, etc.)toString()
-
Constructor Details
-
DataBinderImpl
public DataBinderImpl()
-
-
Method Details
-
getOptionLists
-
getFiles
-
synchronizeData
Called after the localdata is set to initialize the binder based on LocalData values (blFieldTypes, etc.)- Parameters:
in- true to sync local into fields
-
getLocalData
Description copied from interface:DataBinderRetrieve the local data- Specified by:
getLocalDatain interfaceDataBinder- Returns:
- the binder local data
-
getFieldType
Retrieve the field type for a given property.- Specified by:
getFieldTypein interfaceDataBinder- Parameters:
name- the property name- Returns:
- the field type or null if no type is mapped to this property
-
setFieldType
Set a field type for this data binder- Specified by:
setFieldTypein interfaceDataBinder- Parameters:
name- the field nametype- the type
-
getFieldTypeNames
Description copied from interface:DataBinderRetrieve all field names- Specified by:
getFieldTypeNamesin interfaceDataBinder- Returns:
- a collection of the property names that have field type mappings
-
removeFieldType
Remove the field type mapping- Specified by:
removeFieldTypein interfaceDataBinder- Parameters:
name- the property name to remove from the mappings table
-
getLocal
Shortcut forgetLocalData().get(name)- Specified by:
getLocalin interfaceDataBinder- Parameters:
name- the local property name- Returns:
- the value or null if not found
-
putLocal
Shortcut forgetLocalData().put(name,value)- Specified by:
putLocalin interfaceDataBinder- Parameters:
name- the local property namevalue- the local property value
-
getResultSet
Retrieve the result set by name- Specified by:
getResultSetin interfaceDataBinder- Parameters:
name- the result set name- Returns:
- the result set or null if not found
-
getResultSets
Description copied from interface:DataBinderRetrieve a map representation of the result sets, indexed by result set name. Note: this is an unmodifiable map; add or removing of result sets is done through theDataBinder.addResultSet(String, DataResultSet)andDataBinder.removeResultSet(String)methods.- Specified by:
getResultSetsin interfaceDataBinder- Returns:
- a map of the available result sets, indexed by result set name
- See Also:
-
removeResultSet
Remove the result set- Specified by:
removeResultSetin interfaceDataBinder- Parameters:
name- the result set name to remove
-
getResultSetNames
Description copied from interface:DataBinderRetrieve all result set names- Specified by:
getResultSetNamesin interfaceDataBinder- Returns:
- a collection of the available result set names
-
addResultSet
Add a result set with the given name- Specified by:
addResultSetin interfaceDataBinder- Parameters:
name- the result set nameresultSet- the result set
-
getOptionList
Retrieve a specific option list by name- Specified by:
getOptionListin interfaceDataBinder- Parameters:
name- the list name- Returns:
- the list values
-
getOptionListNames
Description copied from interface:DataBinderRetrieve all option list names- Specified by:
getOptionListNamesin interfaceDataBinder- Returns:
- the names of the available option lists
-
addOptionList
Add an option list with the given names- Specified by:
addOptionListin interfaceDataBinder- Parameters:
name- the option list namevalues- the values
-
removeOptionList
Remove an option list- Specified by:
removeOptionListin interfaceDataBinder- Parameters:
name- the option list name
-
getFileNames
Description copied from interface:DataBinderRetrieve all file names- Specified by:
getFileNamesin interfaceDataBinder- Returns:
- a list of file names
-
getFile
Retrieve a file from this data binder- Specified by:
getFilein interfaceDataBinder- Parameters:
name- the file name- Returns:
- the file stream or null if not found
-
addFile
Add a file to this data binder. Shortcut for calling:addFile (name, new TransferStream (file));- Specified by:
addFilein interfaceDataBinder- Parameters:
name- the file namefile- the file object- Throws:
IOException- if the file cannot be read- See Also:
-
addFile
Add a file to this data binder- Specified by:
addFilein interfaceDataBinder- Parameters:
name- the file namefile- the file stream
-
removeFile
Remove a file- Specified by:
removeFilein interfaceDataBinder- Parameters:
name- the file name
-
containsFiles
public boolean containsFiles()Description copied from interface:DataBinderCheck if there are files- Specified by:
containsFilesin interfaceDataBinder- Returns:
- true if their are any files attached to this data binder
-
merge
This will merge copies of all the data from the source binder into this binder, overwriting existing values and result sets, if they exist.- Specified by:
mergein interfaceDataBinder- Parameters:
source- the source databinder
-
loadFieldTypes
Load the internal field types by examining the blFieldTypes local data.- Returns:
- a map of field types or empty map if no types are discovered
-
serializeFieldTypes
protected void serializeFieldTypes()Serialize the field types into the blFieldTypes -
toString
-