Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.binding.mapping.impl
Class DefaultMapping

    java.lang.Object
      org.springframework.binding.mapping.impl.DefaultMapping

All Implemented Interfaces:
  Mapping

    public class DefaultMapping

extends java.lang.Object
implements Mapping

A single mapping definition, encapsulating the information necessary to map the result of evaluating an expression on a source object to a property on a target object, optionally applying a type conversion during the mapping process.

Author:
  Keith Donald, Scott Andrews

Constructor Summary
`DefaultMapping(Expression sourceExpression, Expression targetExpression)` Creates a new mapping.

Method Summary
`boolean` | `equals(java.lang.Object o)`
`Expression` | `getSourceExpression()` The source of the mapping.
`Expression` | `getTargetExpression()` The target of the mapping.
`ConversionExecutor` | `getTypeConverter()` Returns the type conversion executor to use during mapping execution.
`int` | `hashCode()`
`boolean` | `isRequired()` Whether this is a required mapping.
`void` | `map(DefaultMappingContext context)` Execute this mapping.
`void` | `setRequired(boolean required)` Indicates if this mapping is a required mapping.
`void` | `setTypeConverter(ConversionExecutor typeConverter)` Sets a specific type conversion executor to use during mapping execution.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DefaultMapping

    public DefaultMapping(Expression sourceExpression,
                          Expression targetExpression)

  Creates a new mapping.

  Parameters:
    `sourceExpression` - the source expression
    `targetExpression` - the target expression

Method Detail

### getSourceExpression

    public Expression getSourceExpression()

  Description copied from interface: `Mapping`
  The source of the mapping.

  Specified by:
    `getSourceExpression` in interface `Mapping`

### getTargetExpression

    public Expression getTargetExpression()

  Description copied from interface: `Mapping`
  The target of the mapping.

  Specified by:
    `getTargetExpression` in interface `Mapping`

### isRequired

    public boolean isRequired()

  Description copied from interface: `Mapping`
  Whether this is a required mapping.

  Specified by:
    `isRequired` in interface `Mapping`

### getTypeConverter

    public ConversionExecutor getTypeConverter()

  Returns the type conversion executor to use during mapping execution. May be null.

### setTypeConverter

    public void setTypeConverter(ConversionExecutor typeConverter)

  Sets a specific type conversion executor to use during mapping execution.

  Parameters:
    `typeConverter` - the type converter

### setRequired

    public void setRequired(boolean required)

  Indicates if this mapping is a required mapping. Default is false.

  Parameters:
    `required` - required status

### map

    public void map(DefaultMappingContext context)

  Execute this mapping.

  Parameters:
    `context` - the mapping context

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD