Package javax.persistence

Examples of javax.persistence.ManyToMany.fetch()


    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elements != null ) {
      fetchType = elements.fetch();
    }
    else if ( manyToAny != null ) {
View Full Code Here


    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elementCollection != null ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
View Full Code Here

    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elementCollection != null ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
View Full Code Here

  @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);

    if (!property.isAnnotationPresent(JoinTable.class)) {
View Full Code Here

      eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
    }
    if(!eagerLoad) {
      ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
      if(manyToMany!=null) {
        eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
      }
    }
    Map<Object, Object> generatedCollection = (Map<Object, Object>) Utils.generateMap((Class<?>) p.getType(), null);
    MapLazyLoader handler = new MapLazyLoader(driver, strategy, classLoader, repository, p, objectVertex, generatedCollection, objectsBeingAccessed);
    if(eagerLoad) {
View Full Code Here

      eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
    }
    if(!eagerLoad) {
      ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
      if(manyToMany!=null) {
        eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
      }
    }
    Collection<Object> generatedCollection = Utils.generateCollection((Class<?>) p.getType(), null);
    CollectionLazyLoader handler = new CollectionLazyLoader(driver, strategy, classLoader, repository, p, objectVertex, generatedCollection, objectsBeingAccessed);
    if(eagerLoad) {
View Full Code Here

            eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
        }
        if (!eagerLoad) {
            ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
            if (manyToMany != null) {
                eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
            }
        }
        Map<Object, Object> generatedCollection = (Map<Object, Object>) Utils.generateMap((Class<?>) p.getType(), null);
        MapLazyLoader handler = new MapLazyLoader(driver, strategy, classLoader, repository, p, objectVertex, generatedCollection, objectsBeingAccessed);
        if (eagerLoad) {
View Full Code Here

            eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
        }
        if (!eagerLoad) {
            ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
            if (manyToMany != null) {
                eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
            }
        }

        // Get down to brass tacks
View Full Code Here

      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);

          if (!propertyDescriptor.isAnnotationPresent(JoinTable.class)) {
View Full Code Here

    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elementCollection != null ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
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.