Defines a column to include in the tabular view of query results.
If {@link #getPropertyName property} is not specified, a column is includedfor each single-valued non-residual property of the node type specified by the
nodeType
attribute of {@link #getSelectorName selector}.
If {@link #getPropertyName property} is specified,{@link #getColumnName columnName} is required and used to name the columnin the tabular results. If {@link #getPropertyName property} is notspecified, {@link #getColumnName columnName} must not be specified, andthe included columns will be named " {@link #getSelectorName selector}.
propertyName".
The query is invalid if:
- {@link #getSelectorName selector} is not the name of a selector in thequery, or
- {@link #getPropertyName property} is specified but it not a asyntactically valid JCR name, or
- {@link #getPropertyName property} is specified but does not evaluate toa scalar value, or
- {@link #getPropertyName property} is specified but{@link #getColumnName columnName} is omitted, or
- {@link #getPropertyName property} is omitted but{@link #getColumnName columnName} is specified, or
- the columns in the tabular view are not uniquely named, whether those column names are specified by {@link #getColumnName columnName} (if{@link #getPropertyName property} is specified) or generated asdescribed above (if {@link #getPropertyName property} is omitted).
If {@link #getPropertyName property} is specified but, for a node-tuple, theselector node does not have a property named {@link #getPropertyName property}, the query is valid and the column has null value.
@since JCR 2.0