Package javax.persistence

Examples of javax.persistence.PrimaryKeyJoinColumn


      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
        );
View Full Code Here


      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              null, null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            null, null, mappings
        );
View Full Code Here

    public static String getReferenceColumn(PrimaryKeyJoinColumn pkjc) {
        return pkjc.referencedColumnName().length() != 0 ? pkjc.referencedColumnName() : pkjc.name();
    }

    public static PrimaryKeyJoinColumn[] getPrimaryKeyJoinColumns(Class<?> clazz) {
        PrimaryKeyJoinColumn pkjc = clazz.getAnnotation(PrimaryKeyJoinColumn.class);
        if (pkjc != null) {
            return new PrimaryKeyJoinColumn[] {pkjc};
        }

        PrimaryKeyJoinColumns pkjcs = clazz.getAnnotation(PrimaryKeyJoinColumns.class);
View Full Code Here

      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
        );
View Full Code Here

      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
        );
View Full Code Here

            ? pkjc.referencedColumnName()
            : pkjc.name();
    }
   
    public static PrimaryKeyJoinColumn[] getPrimaryKeyJoinColumns(Class<?> clazz) {
        PrimaryKeyJoinColumn pkjc = clazz.getAnnotation(PrimaryKeyJoinColumn.class);
        if (pkjc != null) {
            return new PrimaryKeyJoinColumn[] { pkjc };
        }
       
        PrimaryKeyJoinColumns pkjcs = clazz.getAnnotation(PrimaryKeyJoinColumns.class);
View Full Code Here

      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              null, null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            null, null, mappings
        );
View Full Code Here

      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            ( Map<String, Join> ) null, ( PropertyHolder ) null, mappings
        );
View Full Code Here

   */
  private PrimaryKeyJoinColumns getPrimaryKeyJoinColumns(Element element, XMLContext.Default defaults, boolean mergeWithAnnotations) {
    PrimaryKeyJoinColumn[] columns = buildPrimaryKeyJoinColumns( element );
    if ( mergeWithAnnotations ) {
      if ( columns.length == 0 && defaults.canUseJavaAnnotations() ) {
        PrimaryKeyJoinColumn annotation = getJavaAnnotation( PrimaryKeyJoinColumn.class );
        if ( annotation != null ) {
          columns = new PrimaryKeyJoinColumn[] { annotation };
        }
        else {
          PrimaryKeyJoinColumns annotations = getJavaAnnotation( PrimaryKeyJoinColumns.class );
View Full Code Here

      //@Inheritance(JOINED) subclass need to link back to the super entity
      PrimaryKeyJoinColumns jcsAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumns.class );
      boolean explicitInheritanceJoinedColumns = jcsAnn != null && jcsAnn.value().length != 0;
      if ( explicitInheritanceJoinedColumns ) {
        int nbrOfInhJoinedColumns = jcsAnn.value().length;
        PrimaryKeyJoinColumn jcAnn;
        inheritanceJoinedColumns = new Ejb3JoinColumn[nbrOfInhJoinedColumns];
        for ( int colIndex = 0; colIndex < nbrOfInhJoinedColumns; colIndex++ ) {
          jcAnn = jcsAnn.value()[colIndex];
          inheritanceJoinedColumns[colIndex] = Ejb3JoinColumn.buildJoinColumn(
              jcAnn, null, superEntity.getIdentifier(),
              null, null, mappings
          );
        }
      }
      else {
        PrimaryKeyJoinColumn jcAnn = clazzToProcess.getAnnotation( PrimaryKeyJoinColumn.class );
        inheritanceJoinedColumns = new Ejb3JoinColumn[1];
        inheritanceJoinedColumns[0] = Ejb3JoinColumn.buildJoinColumn(
            jcAnn, null, superEntity.getIdentifier(),
            null, null, mappings
        );
View Full Code Here

TOP

Related Classes of javax.persistence.PrimaryKeyJoinColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.