Skip Headers

# Using Java

Previous

Next

You can specify a specific transformation method on your domain object or an instance of `oracle.toplink.mappings.Transfomers.FieldTransformer` (you can also extend the `FieldTransformerAdapter`). Using a `FieldTransformer` is non-intrusive: that is, your domain object does not need to implement a TopLink interface or provide a special transformation method.

You can configure a method-based field transformer using `AbstractTransformationMapping` method `addFieldTransformation`, passing in the name of the database field and the name of the domain object method to use.

You can configure a class-based field transformer using `AbstractTransformationMapping` method `addFieldTransformer`, passing in the name of the database field and an instance of `oracle.toplink.mappings.Transfomers.FieldTransformer`.

A convenient way to create a `FieldTransformer` is to extend `FieldTransformerAdapter`.