Package javax.persistence

Examples of javax.persistence.ManyToMany.cascade()


  }

  @Override
  public void checkManyToMany(final String name, final PropertyDescriptor property, final Collection<String> errors) {
    ManyToMany manyToMany = property.getAnnotation(ManyToMany.class);
    CascadeType[] cascades = manyToMany.cascade();
    FetchType fetchType = manyToMany.fetch();

    this.checkCascade(errors, manyToMany, property, cascades);
    this.checkFetch(errors, manyToMany, property, fetchType);
View Full Code Here


    for (Class<?> clazz : classFinder.getClasses()) {
      BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();
      for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
        if (propertyDescriptor.isAnnotationPresent(ManyToMany.class)) {
          ManyToMany manyToMany = propertyDescriptor.getAnnotation(ManyToMany.class);
          CascadeType[] cascades = manyToMany.cascade();
          FetchType fetchType = manyToMany.fetch();

          this.checkCascade(collection, manyToMany, beanDescriptor, propertyDescriptor, cascades);
          this.checkFetch(collection, manyToMany, beanDescriptor, propertyDescriptor, fetchType);
View Full Code Here

          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  manyToManyAnn.cascade(), hibernateCascade, false, false
              )
          );
          collectionBinder.setOneToMany( false );
        }
        else if ( property.isAnnotationPresent( ManyToAny.class ) ) {
View Full Code Here

          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  manyToManyAnn.cascade(), hibernateCascade, false, false
              )
          );
          collectionBinder.setOneToMany( false );
        }
        else if ( property.isAnnotationPresent( ManyToAny.class ) ) {
View Full Code Here

                && !m2mAnnotation.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = m2mAnnotation.targetEntity();
        }
        Relation relation = new Relation(relationField, targetEntity, relationField.getType(), m2mAnnotation.fetch(),
                Arrays.asList(m2mAnnotation.cascade()), Boolean.TRUE, m2mAnnotation.mappedBy(),
                Relation.ForeignKey.MANY_TO_MANY);



        if (isJoinedByTable)
View Full Code Here

        else if ( manyToManyAnn != null ) {
          mappedBy = manyToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy( getCascadeStrategy( manyToManyAnn.cascade(), hibernateCascade, false, false) );
          collectionBinder.setOneToMany( false );
        }
        else if ( property.isAnnotationPresent( ManyToAny.class ) ) {
          mappedBy = "";
          collectionBinder.setTargetEntity(
View Full Code Here

          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  manyToManyAnn.cascade(), hibernateCascade, false, false
              )
          );
          collectionBinder.setOneToMany( false );
        }
        else if ( property.isAnnotationPresent( ManyToAny.class ) ) {
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.