Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > What's New in EOF 3.0

Table of Contents Previous Section

Changes to Enterprise Object Validation

Enterprise Objects Framework 3.0 makes slight changes to validation. First, it adds new validation API, summarized in the following tables.
EOEnterpriseObject Informal Protocol (Objective-C) or Interface (Java)
validateTakeValue:forKeyPath: (Objective-C) validateTakeValue (Java) Validates (and coerces) the provided value and assigns it to destination of the provided key path if the value is different from the current value.
New Exception
EOUnknownKeyException The default implementation of valueForKey: and takeValue:forKey: (takeValueForKey in Java) raise or throw this exception when they are invoked with a key that doesn't correlate with a method or instance variable in the receiver. The userInfo dictionary is augmented with the target object (EOTargetObjectUserInfoKey) and the unknown key (EOUnknownUserInfoKey).

Second, the Java validation methods have changed. Where their Objective-C counterparts (and their release 2.2 equivalents) return an exception, the 3.0 methods throw the (previously returned) exception. For more information, see the interface specification for EOValidation.

Table of Contents Next Section