Package javax.persistence

Examples of javax.persistence.SecondaryTable


    // - Primary table
    if (t != null) {
      parseTable(t, sc, sc.mainTable);
    }
    // - Secondary tables
    SecondaryTable st = (SecondaryTable) c.getAnnotation(SecondaryTable.class);
    SecondaryTables sts = (SecondaryTables) c.getAnnotation(SecondaryTables.class);
    if (sts != null) {
      if (st != null) {
        nbErrors++;
        logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
View Full Code Here


        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here

    /*
     * You can't have both secondary table in XML and Java,
     * since there would be no way to "remove" a secondary table
     */
    if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) {
      SecondaryTable secTableAnn = getJavaAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getJavaAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for ( SecondaryTable table : secTablesAnn.value() ) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

    /*
     * You can't have both secondary table in XML and Java,
     * since there would be no way to "remove" a secondary table
     */
    if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) {
      SecondaryTable secTableAnn = getJavaAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getJavaAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for ( SecondaryTable table : secTablesAnn.value() ) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

    /*
     * You can't have both secondary table in XML and Java,
     * since there would be no way to "remove" a secondary table
     */
    if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) {
      SecondaryTable secTableAnn = getJavaAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getJavaAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for (SecondaryTable table : secTablesAnn.value()) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

    /*
     * You can't have both secondary table in XML and Java,
     * since there would be no way to "remove" a secondary table
     */
    if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) {
      SecondaryTable secTableAnn = getJavaAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getJavaAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for ( SecondaryTable table : secTablesAnn.value() ) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

    /*
     * You can't have both secondary table in XML and Java,
     * since there would be no way to "remove" a secondary table
     */
    if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) {
      SecondaryTable secTableAnn = getJavaAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getJavaAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for ( SecondaryTable table : secTablesAnn.value() ) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

        return false;
    }

    public static final SecondaryTable[] getSecondaryTables(AnnotatedElement clazz) {
        SecondaryTable[] sts = null;
        SecondaryTable stAnnotation = clazz.getAnnotation(SecondaryTable.class);
        if (stAnnotation == null) {
            SecondaryTables stsAnnotation = clazz.getAnnotation(SecondaryTables.class);
            sts = stsAnnotation != null ? stsAnnotation.value() : new SecondaryTable[0];
        } else {
            sts = new SecondaryTable[] {stAnnotation};
View Full Code Here

        return false;
    }
   
    public static final SecondaryTable[] getSecondaryTables(AnnotatedElement clazz) {
        SecondaryTable[] sts = null;
        SecondaryTable stAnnotation = clazz.getAnnotation(SecondaryTable.class);
        if (stAnnotation == null) {
            SecondaryTables stsAnnotation = clazz.getAnnotation(SecondaryTables.class);
            sts = stsAnnotation != null ? stsAnnotation.value() : new SecondaryTable[0];
        } else {
            sts = new SecondaryTable[] {stAnnotation};
View Full Code Here

TOP

Related Classes of javax.persistence.SecondaryTable

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.