if (annotations[k].annotationType().equals(javax.persistence.OneToMany.class))
{
OneToMany a = (OneToMany) annotations[k];
if (a.targetEntity().equals(""))
throw new MissingTargetEntityException(beanName, methods[j].getName());
rel = new Relationship(beanName);
rel.setName(methods[j].getName());
rel.setFromMany(false);
rel.setToMany(true);
rel.setToBeanClassName(a.targetEntity().getCanonicalName());
rel.setMappedBy(a.mappedBy());
}
if (annotations[k].annotationType().equals(javax.persistence.ManyToOne.class))
{
ManyToOne a = (ManyToOne) annotations[k];
if (a.targetEntity().equals(""))
throw new MissingTargetEntityException(beanName, methods[j].getName());
rel = new Relationship(beanName);
rel.setName(methods[j].getName());
rel.setFromMany(true);
rel.setToMany(false);
rel.setToBeanClassName(a.targetEntity().getCanonicalName());
}
if (annotations[k].annotationType().equals(javax.persistence.ManyToMany.class))
{
ManyToMany a = (ManyToMany) annotations[k];
if (a.targetEntity().equals(""))
throw new MissingTargetEntityException(beanName, methods[j].getName());
rel = new Relationship(beanName);
rel.setName(methods[j].getName());
rel.setFromMany(true);
rel.setToMany(true);
rel.setToBeanClassName(a.targetEntity().getCanonicalName());
rel.setMappedBy(a.mappedBy());
}
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());
rel.setFromMany(false);