nl.gx.webmanager.jcr.annotation
Annotation Type Child


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Child

Mark a JSR-170 child node. This indicates that this item should be stored as a child node. This annotation can only be used for non-primitive data types, and automatically creates a constraint limiting the type of child nodes to that specified by the annotated method's return type. This annotation can not be used in combination with @property.


Optional Element Summary
 boolean allowsSameNameSiblings
          Specifies whether this child node can have same-name siblings.
 java.lang.String defaultPrimaryType
          Specifies the default primary node type that will be assigned to the child node if it is created without an explicitly specified primary node type.
 boolean mandatory
          Specifies whether the child node is mandatory.
 java.lang.String name
          Specifies the name of this child node for in the repository.
 java.lang.String[] requiredPrimaryTypes
          Specifies the minimum set of primary node types that the child node must have.
 

name

public abstract java.lang.String name
Specifies the name of this child node for in the repository. Defaults to the name of the method without the prefix "set" or "get" if present, and using the same namespace as the @nodetype annotation.

Default:
""

mandatory

public abstract boolean mandatory
Specifies whether the child node is mandatory. Defaults to false. If using in conjunction with multiple beware a mandatory child node can have zero values.

Default:
false

allowsSameNameSiblings

public abstract boolean allowsSameNameSiblings
Specifies whether this child node can have same-name siblings. In other words, whether the parent node can have more than one child node of this name. Note that this property is only meaningfull if the return type of the getter method of this annotation is a non-array (i.e., of type Node). If this is not the case (the return type is Node[]), then allowSameNameSiblings of the under water nodetype definition is automatically set to true.

Default:
false

requiredPrimaryTypes

public abstract java.lang.String[] requiredPrimaryTypes
Specifies the minimum set of primary node types that the child node must have.

Default:
"{http://www.jcp.org/jcr/nt/1.0}base"

defaultPrimaryType

public abstract java.lang.String defaultPrimaryType
Specifies the default primary node type that will be assigned to the child node if it is created without an explicitly specified primary node type.

Default:
"{http://www.jcp.org/jcr/nt/1.0}unstructured"


Copyright © 2007-2010 GX creative online development BV. All Rights Reserved.