com.ibm.pdq.annotation
Annotation Type JoinPoint
@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface JoinPointFor queries against databases, specifies an array of zero or more
@JoinColumn
annotations. This annotation is the only way to activate Nested Query Bean support. If this
annotation is coded with no @JoinColumn
annotations the @Id
annotation(s) of the
nested bean is used to define the key of the nested bean. If this annotation is coded with one or more
@JoinColumn
annotations the @Id
annotation(s) of the nested bean are ignored and
the key of the nested bean is defined by the @JoinColumn
annotations.
The following example illustrates how property-to-column mappings can be specified for nested beans by using
@JoinPoint
:
Example 1:
@JoinPoint( {
@JoinColumn(name = "WORKDEPT", table = "EMPLOYEE", propertyName = "deptNo"),
@JoinColumn(name = "EMPNO", table = "EMPLOYEE", propertyName = "employeeNumber") })
public List<Employee> getDepartmentEmployees ()
@{. . .}
Example 2:
@JoinPoint
@JoinColumn(name = "WORKDEPT", table = "EMPLOYEE", propertyName = "deptNo"),
@JoinColumn(name = "EMPNO", table = "EMPLOYEE", propertyName = "employeeNumber") })
public List<Employee> getDepartmentEmployees ()
@{. . .}
Optional Element Summary
Modifier and Type | Optional Element and Description |
---|---|
columnPrefix
An String to be prefixed to all the nested bean's properties (and column labels).
|
|
joinCol
An array of zero or more
@JoinColumn annotations to apply to the
nested bean's Property.
|
|
value
An array of zero or more
@JoinColumn annotations to apply to the
nested bean's Property.
|
Optional Element Detail
columnPrefix
public abstract String columnPrefix
An String to be prefixed to all the nested bean's properties (and column labels). Used to allow recursive nested
bean of the same class
Default:
""
joinCol
public abstract JoinColumn[] joinCol
An array of zero or more
@JoinColumn
annotations to apply to the
nested bean's Property. Does not need to be coded unless propertyPrefix element is also coded.
Default:
@com.ibm.pdq.annotation.JoinColumn(name="*")
value
public abstract JoinColumn[] value
An array of zero or more
@JoinColumn
annotations to apply to the
nested bean's Property. Does not need to be coded unless propertyPrefix element is also coded.
Default:
@com.ibm.pdq.annotation.JoinColumn(name="*")