View Javadoc

1   //
2   // Attention: generated code (by Metafacade.vsl) - do not modify!
3   //
4   package org.andromda.metafacades.uml;
5   
6   /***
7    * 
8    *
9    * Metafacade interface to be used by AndroMDA cartridges.
10   */
11  public interface ConstraintFacade
12      extends org.andromda.metafacades.uml.ModelElementFacade
13  {
14  
15      /***
16       * Indicates the metafacade type (used for metafacade mappings).
17       *
18       * @return always <code>true</code>
19       */
20      public boolean isConstraintFacadeMetaType();
21  
22     /***
23      * <p>
24      * Gets the 'body' or text of this constraint.
25      * </p>
26      */
27      public java.lang.String getBody();
28  
29     /***
30      * <p>
31      * Gets the model element to which the constraint applies (i.e. is
32      * the context of).
33      * </p>
34      */
35      public org.andromda.metafacades.uml.ModelElementFacade getContextElement();
36  
37     /***
38      * <p>
39      * This constraint's translation for the argument languange.
40      * </p>
41      */
42      public java.lang.String getTranslation(java.lang.String language);
43  
44     /***
45      * <p>
46      * True if this constraint denotes a body expression.
47      * </p>
48      * <p>
49      * For example:
50      * </p>
51      * <p>
52      * <pre>
53      * </p>
54      * <p>
55      * context CustomerCard:getTransaction(from:Date, until:Date)
56      * </p>
57      * <p>
58      * body: transactions->select(date.isAfter(from) and
59      * date.isBefore(until))
60      * </p>
61      * <p>
62      * </pre>
63      * </p>
64      * <p>
65      * False otherwise.
66      * </p>
67      */
68      public boolean isBodyExpression();
69  
70     /***
71      * <p>
72      * True if this constraint denotes a definition.
73      * </p>
74      * <p>
75      * For example:
76      * </p>
77      * <p>
78      * <pre>
79      * </p>
80      * <p>
81      * context CustomerCard
82      * </p>
83      * <p>
84      * def: getTotalPoints(d: date) : Integer =
85      * transaction->select(date.isAfter(d)).points->sum()
86      * </p>
87      * <p>
88      * </pre>
89      * </p>
90      * <p>
91      * False otherwise.
92      * </p>
93      */
94      public boolean isDefinition();
95  
96     /***
97      * <p>
98      * True if this constraint denotes an invariant.
99      * </p>
100     * <p>
101     * For example:
102     * </p>
103     * <p>
104     * <pre>
105     * </p>
106     * <p>
107     * context LivingAnimal
108     * </p>
109     * <p>
110     * inv: alive = true
111     * </p>
112     * <p>
113     * </pre>
114     * </p>
115     * <p>
116     * False otherwise.
117     * </p>
118     */
119     public boolean isInvariant();
120 
121    /***
122     * <p>
123     * True if this constraint denotes a postcondition.
124     * </p>
125     * <p>
126     * For example:
127     * </p>
128     * <p>
129     * <pre>
130     * </p>
131     * <p>
132     * context LivingAnimal::getNumberOfLegs()
133     * </p>
134     * <p>
135     * post: numberOfLegs >= 0
136     * </p>
137     * <p>
138     * </pre>
139     * </p>
140     * <p>
141     * False otherwise.
142     * </p>
143     */
144     public boolean isPostCondition();
145 
146    /***
147     * <p>
148     * True if this constraint denotes a precondition.
149     * </p>
150     * <p>
151     * For example:
152     * </p>
153     * <p>
154     * <pre>
155     * </p>
156     * <p>
157     * context LivingAnimal::canFly()
158     * </p>
159     * <p>
160     * pre: hasWings = true
161     * </p>
162     * <p>
163     * </pre>
164     * </p>
165     * <p>
166     * False otherwise.
167     * </p>
168     */
169     public boolean isPreCondition();
170 
171 }