org.jcrom.annotations
Annotation Type JcrReference


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface JcrReference

This annotation is used to mark fields that are to be mapped as JCR reference properties.

Author:
Olafur Gauti Gudmundsson

Optional Element Summary
 boolean byPath
          Setting this to true will store the reference as the path to the referenced entity in a normal String property, rather than a reference property.
 boolean lazy
          Setting this to true will turn on lazy loading for this field.
 java.lang.String name
          The name of the JCR reference property.
 

name

public abstract java.lang.String name
The name of the JCR reference property. Defaults to the name of the field being annotated.

Returns:
the name of the JCR reference property
Default:
"fieldName"

lazy

public abstract boolean lazy
Setting this to true will turn on lazy loading for this field. The default is false.

Returns:
whether to apply lazy loading to this field
Default:
false

byPath

public abstract boolean byPath
Setting this to true will store the reference as the path to the referenced entity in a normal String property, rather than a reference property.

Returns:
whether to use path-based references
Default:
false


Copyright © 2009. All Rights Reserved.