001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.ejb3.metamodel;
023:
024: import java.util.ArrayList;
025: import java.util.List;
026:
027: /**
028: * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
029: * descriptor for the 1.4 schema
030: *
031: * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
032: * @version <tt>$Revision: 60233 $</tt>
033: */
034: public class EjbRelationshipRole {
035:
036: private String ejbRelationshipRoleName;
037:
038: private String multiplicity;
039:
040: private boolean cascadeDelete = false;
041:
042: private List ejbRelationshipRoles = new ArrayList();
043:
044: private RelationshipRoleSource relationshipRoleSource;;
045:
046: private CmrField cmrField;
047:
048: public String getEjbRelationshipRoleName() {
049: return ejbRelationshipRoleName;
050: }
051:
052: public void setEjbRelationshipRoleName(String ejbRelationName) {
053: this .ejbRelationshipRoleName = ejbRelationName;
054: }
055:
056: public String getMultiplicity() {
057: return multiplicity;
058: }
059:
060: public void setMultiplicity(String multiplicity) {
061: this .multiplicity = multiplicity;
062: }
063:
064: public boolean isCascadeDelete() {
065: return cascadeDelete;
066: }
067:
068: public void setCascadeDelete(boolean cascadeDelete) {
069: this .cascadeDelete = cascadeDelete;
070: }
071:
072: public List getEjbRelationshipRoles() {
073: return ejbRelationshipRoles;
074: }
075:
076: public void setEjbRelationshipRoles(List ejbRelationshipRoles) {
077: this .ejbRelationshipRoles = ejbRelationshipRoles;
078: }
079:
080: public void addEjbRelationshipRole(EjbRelationshipRole role) {
081: ejbRelationshipRoles.add(role);
082: }
083:
084: public RelationshipRoleSource getRelationshipRoleSource() {
085: return relationshipRoleSource;
086: }
087:
088: public void setRelationshipRoleSource(
089: RelationshipRoleSource relationshipRoleSource) {
090: this .relationshipRoleSource = relationshipRoleSource;
091: }
092:
093: public CmrField getCmrField() {
094: return cmrField;
095: }
096:
097: public void setCmrField(CmrField cmrField) {
098: this .cmrField = cmrField;
099: }
100:
101: public String toString() {
102: StringBuffer sb = new StringBuffer(100);
103: sb.append("ejbRelationshipRoleName=").append(
104: ejbRelationshipRoleName);
105: return sb.toString();
106: }
107: }
|