addPage(new EjbRelationWizardPage("Page0"));
}
@Override
public boolean performFinish() {
EjbRelation relation;
if (element.getText().equals(elementTypes[EJB_RELATION])) {
relation = (EjbRelation)eObject;
if (relation == null) {
relation = (EjbRelation)getEFactory().create(EjbRelation.class);
JAXBElement plan = section.getPlan();
if (JAXBModelUtils.getEjbRelationships(plan) == null) {
Relationships relationships = (Relationships)getEFactory().create(Relationships.class);
JAXBModelUtils.setEjbRelationships(plan, relationships);
((EjbRelationSection)section).resetInput(relationships);
}
JAXBModelUtils.getEjbRelationships(plan).add(relation);
}
relation.setEjbRelationName(textList.get(0).getText());
relation.setManyToManyTableName(textList.get(1).getText());
}
else if (element.getText().equals(elementTypes[RELATIONSHIP_ROLE])) {
if (isEmpty(textList.get(1).getText())) {
return false;
}
EjbRelationshipRole role = (EjbRelationshipRole)eObject;
if (role == null) {
role = (EjbRelationshipRole)getEFactory().create(EjbRelationshipRole.class);
relation = (EjbRelation)((EjbRelationSection)section).getSelectedObject();
relation.getEjbRelationshipRole().add(role);
}
role.setEjbRelationshipRoleName(textList.get(0).getText());
EjbRelationshipRole.RelationshipRoleSource source = role.getRelationshipRoleSource();
if (source == null) {
source = (EjbRelationshipRole.RelationshipRoleSource)getEFactory().create(EjbRelationshipRole.RelationshipRoleSource.class);