public class FormPopulator extends Object implements Serializable
Constructor and Description |
---|
FormPopulator() |
Modifier and Type | Method and Description |
---|---|
static void |
populateForm(Object fromForm,
Object toForm)
Copies the properties from the
fromForm to the toForm . |
static void |
populateForm(Object fromForm,
Object toForm,
boolean override)
Copies the properties from the
fromForm to the toForm . |
static void |
populateFormFromPropertyMap(Object form,
Map<String,DateFormat> formatters,
Map<String,?> properties)
Populates the form from the given map of properties.
|
static void |
populateFormFromPropertyMap(Object form,
Map<String,DateFormat> formatters,
Map<String,?> properties,
boolean override)
Populates the form from the given map of properties.
|
static void |
populateFormFromPropertyMap(Object form,
Map<String,DateFormat> formatters,
Map<String,?> properties,
String[] ignoreProperties)
Populates the form from the given map of properties.
|
static void |
populateFormFromPropertyMap(Object form,
Map<String,DateFormat> formatters,
Map<String,?> properties,
String[] ignoreProperties,
boolean override,
boolean assignableTypesOnly)
Populates the form from the given map of properties.
|
static void |
populateFormFromPropertyMapAssignableTypesOnly(Object form,
Map<String,DateFormat> formatters,
Map<String,?> properties)
Populates the form from the given map of properties and populates only if the types
the properties are assignable.
|
static void |
populateFormFromRequestAttributes(Object form,
Map<String,DateFormat> formatters,
boolean override)
Populates the form from the attributes contained in the request object.
|
static void |
populateFormFromRequestAttributes(Object form,
Map<String,DateFormat> formatters,
boolean override,
boolean assignableTypesOnly)
Populates the form from the attributes contained in the request object.
|
public FormPopulator()
public static final void populateForm(Object fromForm, Object toForm)
fromForm
to the toForm
. Only passes not-null values to the toForm.fromForm
- the form from which we're populatingtoForm
- the form to which we're populatingpublic static final void populateForm(Object fromForm, Object toForm, boolean override)
fromForm
to the toForm
. Only passes not-null values to the toForm.fromForm
- the form from which we're populatingtoForm
- the form to which we're populatingoverride
- whether or not properties that have already been copied, should be overridden.public static final void populateFormFromRequestAttributes(Object form, Map<String,DateFormat> formatters, boolean override, boolean assignableTypesOnly)
form
- the form to populate.formatters
- any date or time formatters.override
- whether or not to override properties already set on the given form.assignableTypesOnly
- whether or not copying should be attempted only if the property types are assignable.public static final void populateFormFromRequestAttributes(Object form, Map<String,DateFormat> formatters, boolean override)
form
- the form to populate.formatters
- any date or time formatters.override
- whether or not to override properties already set on the given form.public static final void populateFormFromPropertyMap(Object form, Map<String,DateFormat> formatters, Map<String,?> properties, boolean override)
form
- the form to populate.formatters
- any date or time formatters.properties
- the properties to populate from.override
- whether or not to override properties already set on the given form.public static final void populateFormFromPropertyMap(Object form, Map<String,DateFormat> formatters, Map<String,?> properties)
form
- the form to populate.formatters
- any date or time formatters.properties
- the properties to populate from.public static final void populateFormFromPropertyMapAssignableTypesOnly(Object form, Map<String,DateFormat> formatters, Map<String,?> properties)
form
- the form to populate.formatters
- any date or time formatters.properties
- the properties to populate from.public static final void populateFormFromPropertyMap(Object form, Map<String,DateFormat> formatters, Map<String,?> properties, String[] ignoreProperties)
form
- the form to populate.formatters
- any date or time formatters.properties
- the properties to populate from.ignoreProperties
- names of any properties to ignore when it comes to populating on the form.public static final void populateFormFromPropertyMap(Object form, Map<String,DateFormat> formatters, Map<String,?> properties, String[] ignoreProperties, boolean override, boolean assignableTypesOnly)
form
- the form to populate.formatters
- any date or time formatters.properties
- the properties to populate from.ignoreProperties
- names of any properties to ignore when it comes to populating on the form.override
- whether or not to override properties already set on the given form.assignableTypesOnly
- whether or not copying should be attempted only if the property types are assignable.Copyright © 2014 AndroMDA.org. All rights reserved.