Examples of SecondaryTable


Examples of javax.persistence.SecondaryTable

  }

  private void introspectSecondaryTable(EntityType entityType, Class type)
  {
    getInternalSecondaryTableConfig(type, _annotationCfg);
    SecondaryTable secondaryTableAnn = (SecondaryTable) _annotationCfg.getAnnotation();
    SecondaryTableConfig secondaryTableConfig = _annotationCfg.getSecondaryTableConfig();

    AmberTable secondaryTable = null;

    if ((secondaryTableAnn != null) || (secondaryTableConfig != null)) {
      String secondaryName;

      if (secondaryTableAnn != null)
        secondaryName = secondaryTableAnn.name();
      else
        secondaryName = secondaryTableConfig.getName();

      secondaryTable = _persistenceUnit.createTable(secondaryName);

      entityType.addSecondaryTable(secondaryTable);

      // XXX: pk
    }

    if (secondaryTableAnn != null) {
      PrimaryKeyJoinColumn[] joinAnn = secondaryTableAnn.pkJoinColumns();

      linkSecondaryTable(entityType.getTable(),
                         secondaryTable,
                         joinAnn);
    }
View Full Code Here

Examples of javax.persistence.SecondaryTable

    /*
     * 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

Examples of javax.persistence.SecondaryTable

    /*
     * 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 = getPhysicalAnnotation( SecondaryTable.class );
      overridesDefaultInSecondaryTable( secTableAnn, defaults, secondaryTables );
      SecondaryTables secTablesAnn = getPhysicalAnnotation( SecondaryTables.class );
      if ( secTablesAnn != null ) {
        for ( SecondaryTable table : secTablesAnn.value() ) {
          overridesDefaultInSecondaryTable( table, defaults, secondaryTables );
View Full Code Here

Examples of javax.persistence.SecondaryTable

    /*
     * 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

Examples of javax.persistence.SecondaryTable

    /*
     * 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

Examples of javax.persistence.SecondaryTable

    /*
     * 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

Examples of javax.persistence.SecondaryTable

    /*
     * 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

Examples of javax.persistence.SecondaryTable

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

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

Examples of javax.persistence.SecondaryTable

        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

Examples of javax.persistence.SecondaryTable

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

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.