EJB 2.0 Development with WebSphere Studio Application Developer
by Ueli Wahli, Wouter Denayer, Lars Schunk, Deborah Shaddon, Martin Weiss
Converters and composers
Converters and composers are used to perform the mapping operation between an entity attribute and one or more table columns:
A converter maps one attribute to one column. Many converters are provided to convert SQL data into Java types, but you can write your own as well. A converter is specified in the mapping editor and is used for simple mapping.
A composer maps one attribute (which can be a complex class) to multiple table columns. A composer is specified in the mapping editor and is used for complex mapping.
The mapping editor allows you to specify a “complex mapping” for a CMP field. When you use this option, you have to provide a composer class. You typically use this option for complex attributes, such as the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access