Package javax.persistence

Examples of javax.persistence.OneToMany.mappedBy()


          if ( column.isSecondary() ) {
            throw new NotYetImplementedException( "Collections having FK in secondary table" );
          }
        }
        collectionBinder.setFkJoinColumns( joinColumns );
        mappedBy = oneToManyAnn.mappedBy();
        collectionBinder.setTargetEntity(
            mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
        );
        collectionBinder.setCascadeStrategy( getCascadeStrategy( oneToManyAnn.cascade(), hibernateCascade ) );
        collectionBinder.setOneToMany( true );
View Full Code Here


        globalCfg.isGlobalWithModifiedFlag() : aud.withModifiedFlag();
  }

  private void setPropertyRelationMappedBy(XProperty property, PropertyAuditingData propertyData) {
    final OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    if ( oneToMany != null && !"".equals( oneToMany.mappedBy() ) ) {
      propertyData.setRelationMappedBy( oneToMany.mappedBy() );
    }
  }

  private void setPropertyAuditMappedBy(XProperty property, PropertyAuditingData propertyData) {
View Full Code Here

  }

  private void setPropertyRelationMappedBy(XProperty property, PropertyAuditingData propertyData) {
    final OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    if ( oneToMany != null && !"".equals( oneToMany.mappedBy() ) ) {
      propertyData.setRelationMappedBy( oneToMany.mappedBy() );
    }
  }

  private void setPropertyAuditMappedBy(XProperty property, PropertyAuditingData propertyData) {
    final AuditMappedBy auditMappedBy = property.getAnnotation( AuditMappedBy.class );
View Full Code Here

            if ( column.isSecondary() ) {
              throw new NotYetImplementedException( "Collections having FK in secondary table" );
            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

            if ( column.isSecondary() ) {
              throw new NotYetImplementedException( "Collections having FK in secondary table" );
            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

            if ( column.isSecondary() ) {
              throw new NotYetImplementedException( "Collections having FK in secondary table" );
            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

        }
        if (propertyDescriptor.isAnnotationPresent(OneToMany.class)) {
          OneToMany oneToMany = propertyDescriptor.getAnnotation(OneToMany.class);
          CascadeType[] cascades = oneToMany.cascade();
          FetchType fetchType = oneToMany.fetch();
          String mappedBy = oneToMany.mappedBy();

          this.checkCascade(collection, oneToMany, beanDescriptor, propertyDescriptor, cascades);
          this.checkFetch(collection, oneToMany, beanDescriptor, propertyDescriptor, fetchType);
          this.checkMappedBy(collection, oneToMany, beanDescriptor, propertyDescriptor, mappedBy);
        }
View Full Code Here

            if ( column.isSecondary() ) {
              throw new NotYetImplementedException( "Collections having FK in secondary table" );
            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

        currentAssociationEnd1.setMultiplicity(EdmMultiplicity.ONE);
        currentAssociationEnd2.setMultiplicity(EdmMultiplicity.MANY);
        if (annotatedElement != null) {
          OneToMany reln = annotatedElement.getAnnotation(OneToMany.class);
          if (reln != null) {
            mappedBy = reln.mappedBy();
          }
        }
        break;
      case MANY_TO_MANY:
        currentAssociationEnd1.setMultiplicity(EdmMultiplicity.MANY);
View Full Code Here

        currentAssociationEnd1.setMultiplicity(EdmMultiplicity.MANY);
        currentAssociationEnd2.setMultiplicity(EdmMultiplicity.MANY);
        if (annotatedElement != null) {
          ManyToMany reln = annotatedElement.getAnnotation(ManyToMany.class);
          if (reln != null) {
            mappedBy = reln.mappedBy();
          }
        }
        break;
      case MANY_TO_ONE:
        currentAssociationEnd1.setMultiplicity(EdmMultiplicity.MANY);
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.