1 19 package org.netbeans.modules.j2ee.persistence.entitygenerator; 20 21 27 public class RelationshipRole { 28 29 private String roleName; 30 private String entityName; 31 private String fieldName; 32 private boolean many; 33 private boolean toMany; 34 private boolean cascade; 35 36 private EntityRelation parent; 37 38 public RelationshipRole (String roleName, 39 String entityName, 40 String fieldName, 41 boolean many, 42 boolean toMany, 43 boolean cascade) { 44 this.setRoleName(roleName); 45 this.setEntityName(entityName); 46 this.setFieldName(fieldName); 47 this.setMany(many); 48 this.setToMany(toMany); 49 this.setCascade(cascade); 50 } 51 52 public RelationshipRole (EntityRelation parentRelation) { 53 setParent(parentRelation); 54 } 55 56 public String getRoleName() { 57 return roleName; 58 } 59 60 public void setRoleName(String roleName) { 61 this.roleName = roleName; 62 } 63 64 public String getEntityName() { 65 return entityName; 66 } 67 68 public void setEntityName(String entityName) { 69 this.entityName = entityName; 70 } 71 72 public String getFieldName() { 73 return fieldName; 74 } 75 76 public void setFieldName(String fieldName) { 77 this.fieldName = fieldName; 78 } 79 80 public boolean isMany() { 81 return many; 82 } 83 84 public void setMany(boolean many) { 85 this.many = many; 86 } 87 88 public boolean isToMany() { 89 return toMany; 90 } 91 92 public void setToMany(boolean toMany) { 93 this.toMany = toMany; 94 } 95 96 public boolean isCascade() { 97 return cascade; 98 } 99 100 public void setCascade(boolean cascade) { 101 this.cascade = cascade; 102 } 103 104 public EntityRelation getParent() { 105 return parent; 106 } 107 108 public void setParent(EntityRelation parent) { 109 this.parent = parent; 110 } 111 112 } 113 | Popular Tags |