01: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
02: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
03: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
04: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
05: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
06: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
07: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
08: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
09: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
10: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
11: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
12: // POSSIBILITY OF SUCH DAMAGE.
13: //
14: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
15: package com.metaboss.sdlctools.types.enterprisemodel;
16:
17: /** Datatype representing stereotype of the association role */
18: public final class AssociationRoleStereotype {
19: /** Describes association where set of entities is owned by the other entity.
20: * Adding and removing from this relationship is possible and coinsides with creations and destruction of owned entity instance */
21: public final static AssociationRoleStereotype COMPOSITION = new AssociationRoleStereotype(
22: "COMPOSITION");
23: /** Describes association where set of entities is related
24: * to the other entity. Adding and removing from this relationship is possible, but does not
25: * coinside with creations and destruction of related entity instance */
26: public final static AssociationRoleStereotype AGGREGATION = new AssociationRoleStereotype(
27: "AGGREGATION");
28: /** Describes association where set of entities is related
29: * to the other entity. The association is established outside this relationship (i.e. when entities are
30: * created elsewhere) and can only be observed (read operations only) via this role */
31: public final static AssociationRoleStereotype ASSOCIATION = new AssociationRoleStereotype(
32: "ASSOCIATION");
33:
34: /* AssociationRoleStereotype name storage */
35: protected String mValue;
36:
37: /* Private constructor. Restricts construction from outside */
38: private AssociationRoleStereotype(String pValue) {
39: mValue = pValue;
40: }
41:
42: /** Indicates whether some other object is "equal to" this one
43: * @return true if this object is the same as the obj argument; false otherwise. */
44: public boolean equals(Object pOtherObject) {
45: if (pOtherObject == null)
46: return false;
47: if ((pOtherObject instanceof AssociationRoleStereotype) == false)
48: return false;
49: return ((AssociationRoleStereotype) pOtherObject).mValue
50: .equals(mValue);
51: }
52:
53: /** Returns human readable representation of the value */
54: public String toString() {
55: return mValue;
56: }
57: }
|