Package javax.persistence

Examples of javax.persistence.OneToMany.fetch()


    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    ElementCollection elementCollection = property.getAnnotation( ElementCollection.class ); //jpa 2
    ManyToAny manyToAny = property.getAnnotation( ManyToAny.class );
    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elementCollection != null ) {
View Full Code Here


    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    CollectionOfElements elements = property.getAnnotation( CollectionOfElements.class );
    ManyToAny manyToAny = property.getAnnotation( ManyToAny.class );
    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elements != null ) {
View Full Code Here

    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    ElementCollection elementCollection = property.getAnnotation( ElementCollection.class ); //jpa 2
    ManyToAny manyToAny = property.getAnnotation( ManyToAny.class );
    FetchType fetchType;
    if ( oneToMany != null ) {
      fetchType = oneToMany.fetch();
    }
    else if ( manyToMany != null ) {
      fetchType = manyToMany.fetch();
    }
    else if ( elementCollection != null ) {
View Full Code Here

  private <DataType> void loadMap(GraphDatabaseDriver driver, ClassLoader classLoader, ServiceRepository repository, Property p, DataType returned, Vertex objectVertex, Map<String, Object> objectsBeingAccessed) {
    boolean eagerLoad = false;
    // property may be associated to a onetomany or manytomany mapping. in such a case, check if there is an eager loading info
    OneToMany oneToMany = p.getAnnotation(OneToMany.class);
    if(oneToMany!=null) {
      eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
    }
    if(!eagerLoad) {
      ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
      if(manyToMany!=null) {
        eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
View Full Code Here

  private <DataType> void loadCollection(GraphDatabaseDriver driver, ClassLoader classLoader, ServiceRepository repository, Property p, DataType returned, Vertex objectVertex, Map<String, Object> objectsBeingAccessed) {
    boolean eagerLoad = false;
    // property may be associated to a onetomany or manytomany mapping. in such a case, check if there is an eager loading info
    OneToMany oneToMany = p.getAnnotation(OneToMany.class);
    if(oneToMany!=null) {
      eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
    }
    if(!eagerLoad) {
      ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
      if(manyToMany!=null) {
        eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
View Full Code Here

    private <DataType> void loadMap(GraphDatabaseDriver driver, GraphMappingStrategy strategy, ClassLoader classLoader, ServiceRepository repository, Property p, DataType returned, Vertex objectVertex, ObjectCache objectsBeingAccessed) {
        boolean eagerLoad = false;
        // property may be associated to a onetomany or manytomany mapping. in such a case, check if there is an eager loading info
        OneToMany oneToMany = p.getAnnotation(OneToMany.class);
        if (oneToMany != null) {
            eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
        }
        if (!eagerLoad) {
            ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
            if (manyToMany != null) {
                eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
View Full Code Here

        boolean eagerLoad = false;
        // property may be associated with a one-to-many or many-to-many mapping. in such a case, check if
        // there is an eager loading info
        OneToMany oneToMany = p.getAnnotation(OneToMany.class);
        if (oneToMany != null) {
            eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
        }
        if (!eagerLoad) {
            ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
            if (manyToMany != null) {
                eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
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

    protected boolean usesLazyLoading(BeanProperty property)
    {
        if (property != null) {
            OneToMany ann1 = property.getAnnotation(OneToMany.class);
            if (ann1 != null) {
                return (ann1.fetch() == FetchType.LAZY);
            }
            OneToOne ann2 = property.getAnnotation(OneToOne.class);
            if (ann2 != null) {
                return (ann2.fetch() == FetchType.LAZY);
            }
View Full Code Here

  private <DataType> void loadMap(ClassLoader classLoader, ServiceRepository repository, Property p, DataType returned, Vertex objectVertex, Map<String, Object> objectsBeingAccessed) {
    boolean eagerLoad = false;
    // property may be associated to a onetomany or manytomany mapping. in such a case, check if there is an eager loading info
    OneToMany oneToMany = p.getAnnotation(OneToMany.class);
    if(oneToMany!=null) {
      eagerLoad = FetchType.EAGER.equals(oneToMany.fetch());
    }
    if(!eagerLoad) {
      ManyToMany manyToMany = p.getAnnotation(ManyToMany.class);
      if(manyToMany!=null) {
        eagerLoad = FetchType.EAGER.equals(manyToMany.fetch());
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.