/** * Gets the related role's metadata * * @return the related role */ public RelationshipRoleMetaData getRelatedRoleMetaData() { return new RelationshipRoleMetaData(getDelegate().getRelatedRole()); }
private static String generateNonNavigableCMRName(RelationshipRoleMetaData role) { RelationshipRoleMetaData relatedRole = role.getRelatedRoleMetaData(); return relatedRole.getEntityName() + "_" + relatedRole.getCMRFieldName(); }
/** * Gets the relationship role name * * @return the role name */ public String getRelationshipRoleName() { return getDelegate().getEjbRelationshipRoleName(); }
relationshipRoleName = role.getRelationshipRoleName(); multiplicityOne = role.isMultiplicityOne(); cascadeDelete = role.isCascadeDelete(); batchCascadeDelete = false; foreignKeyConstraint = false; navigable = true; cmrFieldType = role.getCMRFieldType(); entity = application.getBeanByEjbName(role.getEntityName()); if(entity == null) throw new DeploymentException("Entity: " + role.getEntityName() + " not found for relation: " + role.getRelationMetaData().getRelationName());
/** * Gets the right relationship role. * The relationship role is loaded from an ejb-relationship-role. * Left/right assignment is completely arbitrary. * * @return the right role */ public RelationshipRoleMetaData getRightRelationshipRole() { return new RelationshipRoleMetaData(getDelegate().getRightRole()); }
private static String loadCMRFieldName(RelationshipRoleMetaData role) { return role.getCMRFieldName(); }
if (leftRole.isMultiplicityMany() && rightRole.isMultiplicityMany())
/** * Checks if the multiplicity is many. * * @return true when multiplicity many */ public boolean isMultiplicityMany() { return getDelegate().isMultiplicityMany(); }
/** * Gets the left relationship role. * The relationship role is loaded from an ejb-relationship-role. * Left/right assignment is completely arbitrary. * * @return the left role */ public RelationshipRoleMetaData getLeftRelationshipRole() { return new RelationshipRoleMetaData(getDelegate().getLeftRole()); }
/** * Should this entity be deleted when related entity is deleted. * * @return true when cascaded delete */ public boolean isCascadeDelete() { return getDelegate().isCascadedDelete(); }
/** * Gets the related role's metadata * * @return the related role */ public RelationshipRoleMetaData getRelatedRoleMetaData() { return new RelationshipRoleMetaData(getDelegate().getRelatedRole()); }
/** * Gets the right relationship role. * The relationship role is loaded from an ejb-relationship-role. * Left/right assignment is completely arbitrary. * * @return the right role */ public RelationshipRoleMetaData getRightRelationshipRole() { return new RelationshipRoleMetaData(getDelegate().getRightRole()); }
/** * Checks if the multiplicity is one. * * @return true when it is one */ public boolean isMultiplicityOne() { return getDelegate().isMultiplicityOne(); }
/** * Get the related role * * @param role the reference role * @return the related role * @throws IllegalArgumentException if the reference role is not a role in this relationship */ public RelationshipRoleMetaData getOtherRelationshipRole(RelationshipRoleMetaData role) { RelationRoleMetaData delegateRole = role.getDelegate(); return new RelationshipRoleMetaData(getDelegate().getRelatedRole(delegateRole)); } }
/** * Gets the left relationship role. * The relationship role is loaded from an ejb-relationship-role. * Left/right assignment is completely arbitrary. * * @return the left role */ public RelationshipRoleMetaData getLeftRelationshipRole() { return new RelationshipRoleMetaData(getDelegate().getLeftRole()); }
/** * Checks if the multiplicity is many. * * @return true when multiplicity many */ public boolean isMultiplicityMany() { return getDelegate().isMultiplicityMany(); }
/** * Get the related role * * @param role the reference role * @return the related role * @throws IllegalArgumentException if the reference role is not a role in this relationship */ public RelationshipRoleMetaData getOtherRelationshipRole(RelationshipRoleMetaData role) { RelationRoleMetaData delegateRole = role.getDelegate(); return new RelationshipRoleMetaData(getDelegate().getRelatedRole(delegateRole)); } }
/** * Checks if the multiplicity is one. * * @return true when it is one */ public boolean isMultiplicityOne() { return getDelegate().isMultiplicityOne(); }
/** * Gets the relationship role name * * @return the role name */ public String getRelationshipRoleName() { return getDelegate().getEjbRelationshipRoleName(); }
/** * Should this entity be deleted when related entity is deleted. * * @return true when cascaded delete */ public boolean isCascadeDelete() { return getDelegate().isCascadedDelete(); }