Skip navigation links
Project Wonder 7.5-SNAPSHOT

Package er.attributeextension

ERAttributeExtension

See: Description

Package er.attributeextension Description

ERAttributeExtension

Overview

The EOAttribute class allows you to model an attribute for a java object. In order to do this, the java class must implement a custom conversion method to write the value into the database and a value factory method to read the object back out. In some cases, you may want to use a java class as an attribute which does not implement a method appropriate for these operations. In some cases, the java class may even be final making it impossible to model the class as a custom attribute.

The ERAttributeExtension framework is designed to solve this problem. It does so by reimplementing EOAttribute. The reimplemented EOAttribute fixes the broken implementation of WO 5.4.3's adaptorValueConversionClassName characteristic and adds a new valueFactoryClassName characteristic to EOAttribute. Therefore, any prototype attribute which uses one of these two attribute characteristics in ERPrototypes requires the inclusion of this framework to work properly.

Installation and Setup

To use ERAttributeExtension framework, simply include it in your classpath and make sure it is listed before/above the JavaEOAccess framework. Once that is done, you should be able to use any of the extended prototypes found in ERPrototype or create your own. Currently, the extended prototypes available are:

jodaDateTime
Joda DateTime class
jodaLocalDateTime
Joda LocalDateTime class
jodaLocalDate
Joda LocalDate class
jodaLocalTime
Joda LocalTime class
duration
javax.xml.datatype.Duration class (Frequently used with JAX-WS web services)
serializable
Any serializable java object. Usage is similar to the JavaEnum prototype. Set the prototype and override the value class in entity modeler. You should only use this with immutable classes. If you serialize a java collection, the value factory method will call Collections.unmodifiableCollection() on the object before returning it.
blobArray
An NSArray stored externally as data.
blobDictionary
An NSDictionary stored externally as data.
stringArray
An NSArray stored externally as a string.
stringDictionary
An NSDictionary stored externally as a string.
Skip navigation links
Last updated: Sun, Dec 22, 2024 • 04:08 PM CET

Copyright © 2002 – 2024 Project Wonder.