Contact Free trial Login

POJO Class Bindings and Factory Classes

Anypoint DataMapper allows you to map an interface or abstract class as a POJO. Binding, in this case, refers to linking your POJO (which can be an interface or abstract class) to a concrete class. Thus, when instantiating your POJO, Mule uses the concrete class you specified.

Factory classes allow you to delegate object construction to another class. In this case, your factory class must have a static method called create, that returns the object you want to instantiate.

Assumptions

This document assumes the reader is familiar with the Anypoint DataMapper Transformer. Consult the DataMapper User Guide and Reference document for details. For a listing of all available tools in DataMapper, consult DataMapper Visual Reference.

Setting POJO Binding and Factory Definitions

  1. To specify bindings and factories, open the Properties dialog by clicking the cog icon (highlighted below) in the Output mapping pane of the DataMapper view. The Properties icon displays the output Pojo Properties window (below, bottom).

    overview modif
    datamapper.POJO.classes
  2. Click Binding Definition or Factory Definition to add, remove or edit binding or factory properties.

  3. Uncheck the Cache Data in Memory checkbox if you want DataMapper to cache process data to disk instead of in memory.

  4. Click OK to save your changes.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.