com.ibm.pdq.annotation

Annotation Type JoinPoint


@Target(value={METHOD,FIELD})

  • @Retention(value=RUNTIME)
  • public @interface JoinPoint
    For 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
    1. String
    columnPrefix
    An String to be prefixed to all the nested bean's properties (and column labels).
    1. JoinColumn[]
    joinCol
    An array of zero or more @JoinColumn annotations to apply to the nested bean's Property.
    1. JoinColumn[]
    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="*")