Package javax.persistence

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


    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

          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

    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

          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

    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

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

        if (annotations[k].annotationType().equals(javax.persistence.OneToOne.class))
        {
          OneToOne a = (OneToOne) annotations[k];

          if (a.targetEntity().equals(""))
            throw new MissingTargetEntityException(beanName, methods[j].getName());

          rel = new Relationship(beanName);
          rel.setName(methods[j].getName());
View Full Code Here

          rel = new Relationship(beanName);
          rel.setName(methods[j].getName());

          rel.setFromMany(false);
          rel.setToMany(false);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());
        }

        /**
         * Annotazioni relative alla generazione !!!!
View Full Code Here

        if (annotations[k].annotationType().equals(javax.persistence.OneToOne.class))
        {
          OneToOne a = (OneToOne) annotations[k];

          if (a.targetEntity().equals(""))
            throw new MissingTargetEntityException(beanName, methods[j].getName());

          rel = new Relationship(beanName);
          rel.setName(methods[j].getName());
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.