View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.metafacades.uml14;
5   
6   /***
7    * MetafacadeLogic for org.andromda.metafacades.uml.EntityAssociation
8    *
9    * @see org.andromda.metafacades.uml.EntityAssociation
10   */
11  public abstract class EntityAssociationLogic
12      extends org.andromda.metafacades.uml14.AssociationFacadeLogicImpl
13      implements org.andromda.metafacades.uml.EntityAssociation
14  {
15  
16      protected Object metaObject;
17  
18      public EntityAssociationLogic(Object metaObject, String context)
19      {
20          super((org.omg.uml.foundation.core.UmlAssociation)metaObject, getContext(context));
21          this.metaObject = metaObject;
22      }
23  
24      /***
25       * Gets the context for this metafacade logic instance.
26       */
27      private static String getContext(String context)
28      {
29          if (context == null)
30          {
31              context = "org.andromda.metafacades.uml.EntityAssociation";
32          }
33          return context;
34      }
35  
36      /***
37       * @see org.andromda.core.metafacade.MetafacadeBase
38       */
39      public void resetMetafacadeContext(String context)
40      {
41          if (!this.contextRoot) // reset context only for non-root metafacades
42          {
43              context = getContext(context);  // to have same value as in original constructor call
44              setMetafacadeContext (context);
45          }
46      }
47  
48      /***
49       * @see org.andromda.metafacades.uml.EntityAssociation
50       */
51      public boolean isEntityAssociationMetaType()
52      {
53          return true;
54      }
55      
56      // --------------- attributes ---------------------
57  
58     /***
59      * @see org.andromda.metafacades.uml.EntityAssociation#getTableName()
60      */
61      protected abstract java.lang.String handleGetTableName();
62  
63      private void handleGetTableName1aPreCondition()
64      {
65      }
66  
67      private void handleGetTableName1aPostCondition()
68      {
69      }
70  
71      private java.lang.String __tableName1a;
72      private boolean __tableName1aSet = false;
73  
74      public final java.lang.String getTableName()
75      {
76          java.lang.String tableName1a = this.__tableName1a;
77          if (!this.__tableName1aSet)
78          {
79              handleGetTableName1aPreCondition();
80              tableName1a = handleGetTableName();
81              handleGetTableName1aPostCondition();
82              this.__tableName1a = tableName1a;
83              if (isMetafacadePropertyCachingEnabled())
84              {
85                  this.__tableName1aSet = true;
86              }
87          }
88          return tableName1a;
89      }
90  
91     /***
92      * @see org.andromda.metafacades.uml.EntityAssociation#getSchema()
93      */
94      protected abstract java.lang.String handleGetSchema();
95  
96      private void handleGetSchema2aPreCondition()
97      {
98      }
99  
100     private void handleGetSchema2aPostCondition()
101     {
102     }
103 
104     private java.lang.String __schema2a;
105     private boolean __schema2aSet = false;
106 
107     public final java.lang.String getSchema()
108     {
109         java.lang.String schema2a = this.__schema2a;
110         if (!this.__schema2aSet)
111         {
112             handleGetSchema2aPreCondition();
113             schema2a = handleGetSchema();
114             handleGetSchema2aPostCondition();
115             this.__schema2a = schema2a;
116             if (isMetafacadePropertyCachingEnabled())
117             {
118                 this.__schema2aSet = true;
119             }
120         }
121         return schema2a;
122     }
123 
124    /***
125     * @see org.andromda.metafacades.uml.EntityAssociation#isEntityAssociation()
126     */
127     protected abstract boolean handleIsEntityAssociation();
128 
129     private void handleIsEntityAssociation3aPreCondition()
130     {
131     }
132 
133     private void handleIsEntityAssociation3aPostCondition()
134     {
135     }
136 
137     private boolean __entityAssociation3a;
138     private boolean __entityAssociation3aSet = false;
139 
140     public final boolean isEntityAssociation()
141     {
142         boolean entityAssociation3a = this.__entityAssociation3a;
143         if (!this.__entityAssociation3aSet)
144         {
145             handleIsEntityAssociation3aPreCondition();
146             entityAssociation3a = handleIsEntityAssociation();
147             handleIsEntityAssociation3aPostCondition();
148             this.__entityAssociation3a = entityAssociation3a;
149             if (isMetafacadePropertyCachingEnabled())
150             {
151                 this.__entityAssociation3aSet = true;
152             }
153         }
154         return entityAssociation3a;
155     }
156 
157     /***
158      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
159      */
160     public void validateInvariants(java.util.Collection validationMessages)
161     {
162         super.validateInvariants(validationMessages);
163     }
164     
165     /***
166      * The property that stores the name of the metafacade.
167      */
168     private static final String NAME_PROPERTY = "name";
169     
170     /***
171      * @see java.lang.Object#toString()
172      */
173     public String toString()
174     {
175         final StringBuffer toString = new StringBuffer(this.getClass().getName());
176         toString.append("[");
177         try
178         {
179             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
180         }
181         catch (final Throwable throwable)
182         {
183             // - just ignore when the metafacade doesn't have a name property
184         }
185         toString.append("]");
186         return toString.toString();
187     }
188 }