Package javax.persistence

Examples of javax.persistence.OneToMany.targetEntity()


        OneToMany ann = (OneToMany) annotate;
        Class<?> targetEntity = PropertyAccessorHelper.getGenericClass(relationField);

        // now, check annotations
        if (null != ann.targetEntity() && !ann.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = ann.targetEntity();
        }

        boolean isJoinedByTable = relationField.isAnnotationPresent(JoinTable.class);
View Full Code Here


        Class<?> targetEntity = PropertyAccessorHelper.getGenericClass(relationField);

        // now, check annotations
        if (null != ann.targetEntity() && !ann.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = ann.targetEntity();
        }

        boolean isJoinedByTable = relationField.isAnnotationPresent(JoinTable.class);

        if (isJoinedByTable)
View Full Code Here

       
        OneToMany ann = relationField.getAnnotation(OneToMany.class);
        Class<?> targetEntity = PropertyAccessorHelper.getGenericClass(relationField);

        // now, check annotations
        if (null != ann.targetEntity() && !ann.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = ann.targetEntity();
        }

View Full Code Here

        Class<?> targetEntity = PropertyAccessorHelper.getGenericClass(relationField);

        // now, check annotations
        if (null != ann.targetEntity() && !ann.targetEntity().getSimpleName().equals("void"))
        {
            targetEntity = ann.targetEntity();
        }


        Relation relation = new Relation(relationField, targetEntity, relationField.getType(), ann.fetch(),
View Full Code Here

    }

    // One to Many
    OneToMany oneToMany = field.getAnnotation(OneToMany.class);
    if (oneToMany != null) {
      Class<?> targetEntity = oneToMany.targetEntity();
      if (targetEntity != void.class) {
        return targetEntity;
      }
    }
View Full Code Here

      }

      // One to Many
      OneToMany oneToMany = method.getAnnotation(OneToMany.class);
      if (oneToMany != null) {
        Class<?> targetEntity = oneToMany.targetEntity();
        if (targetEntity != void.class) {
          return targetEntity;
        }
      }
View Full Code Here

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

            }
          }
          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

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.