|
Re: <transformation> tag documentation? [message #527037 is a reply to message #525832] |
Tue, 13 April 2010 19:26 |
|
The link to all our schemas is here,
http://wiki.eclipse.org/EclipseLink/XSDs
The transformation is,
<xsd:complexType name="transformation">
<xsd:annotation>
<xsd:documentation>
/**
* Transformation is an optional annotation for
* org.eclipse.persistence.mappings.TransformationMapping.
* TransformationMapping allows to map an attribute to one or more
* database columns.
*
* Transformation annotation is an optional part of
* TransformationMapping definition. Unless the TransformationMapping is
* write-only, it should have a ReadTransformer, it defines
* transformation of database column(s) value(s)into attribute value.
* Also unless it's a read-only mapping, either WriteTransformer
* annotation or WriteTransformers annotation should be specified. Each
* WriteTransformer defines transformation of the attribute value to a
* single database column value (column is specified in the
* WriteTransformer).
*/
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Transformation {
/**
* (Optional) Defines whether the value of the field or property
* should be lazily loaded or must be eagerly fetched. The EAGER
* strategy is a requirement on the persistence provider runtime
* that the value must be eagerly fetched. The LAZY strategy is a
* hint to the persistence provider runtime. If not specified,
* defaults to EAGER.
*/
FetchType fetch() default EAGER;
/**
* (Optional) The optional element is a hint as to whether the value
* of the field or property may be null. It is disregarded
* for primitive types, which are considered non-optional.
*/
boolean optional() default true;
}
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="read-transformer" type="orm:read-transformer"/>
<xsd:element name="write-transformer" type="orm:write-transformer" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="access" type="orm:access-type" minOccurs="0"/>
<xsd:element name="property" type="orm:property" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="access-methods" type="orm:access-methods" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="fetch" type="orm:fetch-type"/>
<xsd:attribute name="optional" type="xsd:boolean"/>
<xsd:attribute name="access" type="orm:access-type"/>
<xsd:attribute name="mutable" type="xsd:boolean"/>
</xsd:complexType>
James : Wiki : Book : Blog : Twitter
|
|
|
|
Powered by
FUDForum. Page generated in 0.04616 seconds