Examples of targetEntity()


Examples of javax.persistence.OneToMany.targetEntity()

            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  oneToManyAnn.cascade(), hibernateCascade, oneToManyAnn.orphanRemoval(), false
              )
View Full Code Here

Examples of javax.persistence.OneToMany.targetEntity()

            }
          }
          collectionBinder.setFkJoinColumns( joinColumns );
          mappedBy = oneToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
                  oneToManyAnn.cascade(), hibernateCascade, oneToManyAnn.orphanRemoval(), false
              )
View Full Code Here

Examples of javax.persistence.OneToMany.targetEntity()

    OneToMany relAnno = reader.getAnnotation( OneToMany.class );
    assertEquals( 0, relAnno.cascade().length );
    assertEquals( FetchType.LAZY, relAnno.fetch() );
    assertEquals( "", relAnno.mappedBy() );
    assertFalse( relAnno.orphanRemoval() );
    assertEquals( void.class, relAnno.targetEntity() );
  }

  public void testOrderBy() throws Exception {
    reader = getReader( Entity2.class, "field1", "one-to-many.orm2.xml" );
    assertAnnotationPresent( OneToMany.class );
View Full Code Here

Examples of javax.persistence.OneToMany.targetEntity()

    OneToMany relAnno = reader.getAnnotation( OneToMany.class );
    assertEquals( 0, relAnno.cascade().length );
    assertEquals( FetchType.EAGER, relAnno.fetch() );
    assertEquals( "field2", relAnno.mappedBy() );
    assertTrue( relAnno.orphanRemoval() );
    assertEquals( Entity3.class, relAnno.targetEntity() );
    assertEquals(
        AccessType.PROPERTY, reader.getAnnotation( Access.class )
        .value()
    );
  }
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

    if (mTo != null) {
      return mTo.targetEntity();
    }
    final OneToOne oTo = property.getAnnotation( OneToOne.class );
    if (oTo != null) {
      return oTo.targetEntity();
    }
    throw new AssertionFailure("Unexpected discovery of a targetEntity: " + property.getName() );
  }
}
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

    if (mTo != null) {
      return mTo.targetEntity();
    }
    final OneToOne oTo = property.getAnnotation( OneToOne.class );
    if (oTo != null) {
      return oTo.targetEntity();
    }
    throw new AssertionFailure("Unexpected discovery of a targetEntity: " + property.getName() );
  }
}
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

          getCascadeStrategy( ann.cascade(), hibernateCascade ),
          joinColumns,
          ann.optional(),
          getFetchMode( ann.fetch() ),
          ignoreNotFound, onDeleteCascade,
          mappings.getReflectionManager().toXClass( ann.targetEntity() ),
          propertyHolder,
          inferredData, ann.mappedBy(), trueOneToOne, isIdentifierMapper, inSecondPass, mappings
      );
    }
    else if ( property.isAnnotationPresent( org.hibernate.annotations.Any.class ) ) {
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

    if (mTo != null) {
      return mTo.targetEntity();
    }
    final OneToOne oTo = property.getAnnotation( OneToOne.class );
    if (oTo != null) {
      return oTo.targetEntity();
    }
    throw new AssertionFailure("Unexpected discovery of a targetEntity: " + property.getName() );
  }
}
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

          getCascadeStrategy( ann.cascade(), hibernateCascade ),
          joinColumns,
          ann.optional(),
          getFetchMode( ann.fetch() ),
          ignoreNotFound, onDeleteCascade,
          mappings.getReflectionManager().toXClass( ann.targetEntity() ),
          propertyHolder,
          inferredData, ann.mappedBy(), trueOneToOne, isIdentifierMapper, inSecondPass, mappings
      );
    }
    else if ( property.isAnnotationPresent( OneToMany.class )
View Full Code Here

Examples of javax.persistence.OneToOne.targetEntity()

    assertEquals( 0, relAnno.cascade().length );
    assertEquals( FetchType.EAGER, relAnno.fetch() );
    assertEquals( "", relAnno.mappedBy() );
    assertTrue( relAnno.optional() );
    assertFalse( relAnno.orphanRemoval() );
    assertEquals( void.class, relAnno.targetEntity() );
  }

  /**
   * When there's a single primary key join column, we still wrap it with
   * a PrimaryKeyJoinColumns annotation.
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.