1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import org.andromda.core.metafacade.ModelValidationMessage;
9 import org.andromda.metafacades.uml.ManageableEntityAttribute;
10
11 /**
12 * TODO: Model Documentation for ManageableEntityAttribute
13 * MetafacadeLogic for ManageableEntityAttribute
14 *
15 * @see ManageableEntityAttribute
16 */
17 public abstract class ManageableEntityAttributeLogic
18 extends EntityAttributeLogicImpl
19 implements ManageableEntityAttribute
20 {
21 /**
22 * The underlying UML object
23 * @see Object
24 */
25 protected Object metaObject;
26
27 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
28 * @param metaObjectIn
29 * @param context
30 */
31 protected ManageableEntityAttributeLogic(Object metaObjectIn, String context)
32 {
33 super(metaObjectIn, getContext(context));
34 this.metaObject = metaObjectIn;
35 }
36
37 /**
38 * Gets the context for this metafacade logic instance.
39 * @param context String. Set to ManageableEntityAttribute if null
40 * @return context String
41 */
42 private static String getContext(String context)
43 {
44 if (context == null)
45 {
46 context = "org.andromda.metafacades.uml.ManageableEntityAttribute";
47 }
48 return context;
49 }
50
51 /** Reset context only for non-root metafacades
52 * @param context
53 */
54 @Override
55 public void resetMetafacadeContext(String context)
56 {
57 if (!this.contextRoot) // reset context only for non-root metafacades
58 {
59 context = getContext(context); // to have same value as in original constructor call
60 setMetafacadeContext (context);
61 }
62 }
63
64 /**
65 * @return boolean true always
66 * @see ManageableEntityAttribute
67 */
68 public boolean isManageableEntityAttributeMetaType()
69 {
70 return true;
71 }
72
73 // --------------- attributes ---------------------
74
75 /**
76 * @see ManageableEntityAttribute#isDisplay()
77 * @return boolean
78 */
79 protected abstract boolean handleIsDisplay();
80
81 private boolean __display1a;
82 private boolean __display1aSet = false;
83
84 /**
85 * Whether or not this attribute should be displayed.
86 * @return (boolean)handleIsDisplay()
87 */
88 public final boolean isDisplay()
89 {
90 boolean display1a = this.__display1a;
91 if (!this.__display1aSet)
92 {
93 // display has no pre constraints
94 display1a = handleIsDisplay();
95 // display has no post constraints
96 this.__display1a = display1a;
97 if (isMetafacadePropertyCachingEnabled())
98 {
99 this.__display1aSet = true;
100 }
101 }
102 return display1a;
103 }
104
105 /**
106 * @see ManageableEntityAttribute#isManageableGetterAvailable()
107 * @return boolean
108 */
109 protected abstract boolean handleIsManageableGetterAvailable();
110
111 private boolean __manageableGetterAvailable2a;
112 private boolean __manageableGetterAvailable2aSet = false;
113
114 /**
115 * Whether or not this attribute can be read in a call isolated from the rest (for example when
116 * downloading binary fields).
117 * @return (boolean)handleIsManageableGetterAvailable()
118 */
119 public final boolean isManageableGetterAvailable()
120 {
121 boolean manageableGetterAvailable2a = this.__manageableGetterAvailable2a;
122 if (!this.__manageableGetterAvailable2aSet)
123 {
124 // manageableGetterAvailable has no pre constraints
125 manageableGetterAvailable2a = handleIsManageableGetterAvailable();
126 // manageableGetterAvailable has no post constraints
127 this.__manageableGetterAvailable2a = manageableGetterAvailable2a;
128 if (isMetafacadePropertyCachingEnabled())
129 {
130 this.__manageableGetterAvailable2aSet = true;
131 }
132 }
133 return manageableGetterAvailable2a;
134 }
135
136 // ------------- associations ------------------
137
138 /**
139 * @param validationMessages Collection<ModelValidationMessage>
140 * @see EntityAttributeLogicImpl#validateInvariants(Collection validationMessages)
141 */
142 @Override
143 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
144 {
145 super.validateInvariants(validationMessages);
146 }
147 }