Package javax.persistence

Examples of javax.persistence.ManyToMany.targetEntity()


          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


          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

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

    }

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

          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

          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

            }

        }

        // Check for target class specified at annotation
        if (targetEntity == null && null != m2mAnnotation.targetEntity()
                && !m2mAnnotation.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = m2mAnnotation.targetEntity();
        }
        //check if target entity is null
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();
        }
        //check if target entity is null
        if (targetEntity == null)
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();
        }
        //check if target entity is null
        if (targetEntity == null)
        {
            throw new InvalidEntityDefinitionException("Could not determine target entity class for relationship."
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.