Package javax.persistence

Examples of javax.persistence.ManyToMany.targetEntity()



        }

        // Check for target class specified at annotation
        if (targetEntity == null && null != m2mAnnotation.targetEntity()
                && !m2mAnnotation.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = m2mAnnotation.targetEntity();
        }
        Relation relation = new Relation(relationField, targetEntity, relationField.getType(), m2mAnnotation.fetch(),
View Full Code Here


        }

        // Check for target class specified at annotation
        if (targetEntity == null && null != m2mAnnotation.targetEntity()
                && !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(),
View Full Code Here

        // Check for target class specified at annotation
        if (targetEntity == null && null != m2mAnnotation.targetEntity()
                && !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);
View Full Code Here

    }

    // Many to Many
    ManyToMany manyToMany = field.getAnnotation(ManyToMany.class);
    if (manyToMany != null) {
      Class<?> targetEntity = manyToMany.targetEntity();
      if (targetEntity != void.class) {
        return targetEntity;
      }
    }
View Full Code Here

      }

      // Many to Many
      ManyToMany manyToMany = method.getAnnotation(ManyToMany.class);
      if (manyToMany != null) {
        Class<?> targetEntity = manyToMany.targetEntity();
        if (targetEntity != void.class) {
          return targetEntity;
        }
      }
View Full Code Here

          collectionBinder.setOneToMany( true );
        }
        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 ) ) {
View Full Code Here

          collectionBinder.setOneToMany( true );
        }
        else if ( manyToManyAnn != null ) {
          mappedBy = manyToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  manyToManyAnn.cascade(), hibernateCascade, false, false
              )
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.