Package javax.persistence

Examples of javax.persistence.FetchType


    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();
View Full Code Here


  protected static void defineFetchingStrategy(ToOne toOne, XProperty property) {
    LazyToOne lazy = property.getAnnotation( LazyToOne.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    ManyToOne manyToOne = property.getAnnotation( ManyToOne.class );
    OneToOne oneToOne = property.getAnnotation( OneToOne.class );
    FetchType fetchType;
    if ( manyToOne != null ) {
      fetchType = manyToOne.fetch();
    }
    else if ( oneToOne != null ) {
      fetchType = oneToOne.fetch();
View Full Code Here

    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();
View Full Code Here

    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();
View Full Code Here

  protected static void defineFetchingStrategy(ToOne toOne, XProperty property) {
    LazyToOne lazy = property.getAnnotation( LazyToOne.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    ManyToOne manyToOne = property.getAnnotation( ManyToOne.class );
    OneToOne oneToOne = property.getAnnotation( OneToOne.class );
    FetchType fetchType;
    if ( manyToOne != null ) {
      fetchType = manyToOne.fetch();
    }
    else if ( oneToOne != null ) {
      fetchType = oneToOne.fetch();
View Full Code Here

  protected static void defineFetchingStrategy(ToOne toOne, XProperty property) {
    LazyToOne lazy = property.getAnnotation( LazyToOne.class );
    Fetch fetch = property.getAnnotation( Fetch.class );
    ManyToOne manyToOne = property.getAnnotation( ManyToOne.class );
    OneToOne oneToOne = property.getAnnotation( OneToOne.class );
    FetchType fetchType;
    if ( manyToOne != null ) {
      fetchType = manyToOne.fetch();
    }
    else if ( oneToOne != null ) {
      fetchType = oneToOne.fetch();
View Full Code Here

  // Relations
  @Override
  public void checkOneToOne(final String name, final PropertyDescriptor property, final Collection<String> errors) {
    OneToOne oneToOne = property.getAnnotation(OneToOne.class);
    CascadeType[] cascades = oneToOne.cascade();
    FetchType fetchType = oneToOne.fetch();
    String mappedBy = oneToOne.mappedBy();

    this.checkCascade(errors, oneToOne, property, cascades);
    this.checkFetch(errors, oneToOne, property, fetchType);
View Full Code Here

  @Override
  public void checkOneToMany(final String name, final PropertyDescriptor property, final Collection<String> errors) {
    OneToMany oneToMany = property.getAnnotation(OneToMany.class);
    CascadeType[] cascades = oneToMany.cascade();
    FetchType fetchType = oneToMany.fetch();
    String mappedBy = oneToMany.mappedBy();

    this.checkCascade(errors, oneToMany, property, cascades);
    this.checkFetch(errors, oneToMany, property, fetchType);
    this.checkMappedBy(errors, oneToMany, property, mappedBy);
View Full Code Here

  @Override
  public void checkManyToOne(final String name, final PropertyDescriptor property, final Collection<String> errors) {
    ManyToOne manyToOne = property.getAnnotation(ManyToOne.class);
    CascadeType[] cascades = manyToOne.cascade();
    FetchType fetchType = manyToOne.fetch();

    this.checkCascade(errors, manyToOne, property, cascades);
    this.checkFetch(errors, manyToOne, property, fetchType);

    if (!property.isAnnotationPresent(JoinColumn.class)) {
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

TOP

Related Classes of javax.persistence.FetchType

Copyright © 2018 www.massapicom. 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.