Examples of LazyCollection


Examples of org.hibernate.annotations.LazyCollection

    //we don't care about the join stuffs because the column is on the association table.
    propertyHolder.addProperty( prop );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

        )
    );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    CollectionOfElements collectionOfElements = property.getAnnotation( CollectionOfElements.class ); //legacy hibernate
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( collectionOfElements != null ) {
      fetchType = collectionOfElements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    CollectionOfElements collectionOfElements = property.getAnnotation( CollectionOfElements.class ); //legacy hibernate
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( collectionOfElements != null ) {
      fetchType = collectionOfElements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    CollectionOfElements collectionOfElements = property.getAnnotation( CollectionOfElements.class ); //legacy hibernate
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( collectionOfElements != null ) {
      fetchType = collectionOfElements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    if (! declaringClassSet) throw new AssertionFailure( "DeclaringClass is not set in CollectionBinder while binding" );
    propertyHolder.addProperty( prop, declaringClass );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    ManyToMany manyToMany = property.getAnnotation( ManyToMany.class );
    CollectionOfElements collectionOfElements = property.getAnnotation( CollectionOfElements.class ); //legacy hibernate
    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 ) {
      fetchType = elementCollection.fetch();
    }
    else if ( collectionOfElements != null ) {
      fetchType = collectionOfElements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( false );
    }
View Full Code Here

Examples of org.hibernate.annotations.LazyCollection

    //we don't care about the join stuffs because the column is on the association table.
    propertyHolder.addProperty( prop );
  }

  private void defineFetchingStrategy() {
    LazyCollection lazy = property.getAnnotation( LazyCollection.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    OneToMany oneToMany = property.getAnnotation( OneToMany.class );
    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 ) {
      fetchType = elements.fetch();
    }
    else if ( manyToAny != null ) {
      fetchType = FetchType.LAZY;
    }
    else {
      throw new AssertionFailure(
          "Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
      );
    }
    if ( lazy != null ) {
      collection.setLazy( !( lazy.value() == LazyCollectionOption.FALSE ) );
      collection.setExtraLazy( lazy.value() == LazyCollectionOption.EXTRA );
    }
    else {
      collection.setLazy( fetchType == FetchType.LAZY );
      collection.setExtraLazy( 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.