|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConstraintFacade
Metafacade interface to be used by AndroMDA cartridges.
| Method Summary | |
|---|---|
java.lang.String |
getBody()
Gets the 'body' or text of this constraint. |
ModelElementFacade |
getContextElement()
Gets the model element to which the constraint applies (i.e. |
java.lang.String |
getTranslation(java.lang.String language)
This constraint's translation for the argument languange. |
boolean |
isBodyExpression()
True if this constraint denotes a body expression. |
boolean |
isConstraintFacadeMetaType()
Indicates the metafacade type (used for metafacade mappings). |
boolean |
isDefinition()
True if this constraint denotes a definition. |
boolean |
isInvariant()
True if this constraint denotes an invariant. |
boolean |
isPostCondition()
True if this constraint denotes a postcondition. |
boolean |
isPreCondition()
True if this constraint denotes a precondition. |
| Method Detail |
|---|
boolean isConstraintFacadeMetaType()
truejava.lang.String getBody()
Gets the 'body' or text of this constraint.
ModelElementFacade getContextElement()
Gets the model element to which the constraint applies (i.e. is the context of).
java.lang.String getTranslation(java.lang.String language)
This constraint's translation for the argument languange.
boolean isBodyExpression()
True if this constraint denotes a body expression.
For example:
context CustomerCard:getTransaction(from:Date, until:Date)
body: transactions->select(date.isAfter(from) and date.isBefore(until))
False otherwise.
boolean isDefinition()
True if this constraint denotes a definition.
For example:
context CustomerCard
def: getTotalPoints(d: date) : Integer = transaction->select(date.isAfter(d)).points->sum()
False otherwise.
boolean isInvariant()
True if this constraint denotes an invariant.
For example:
context LivingAnimal
inv: alive = true
False otherwise.
boolean isPostCondition()
True if this constraint denotes a postcondition.
For example:
context LivingAnimal::getNumberOfLegs()
post: numberOfLegs >= 0
False otherwise.
boolean isPreCondition()
True if this constraint denotes a precondition.
For example:
context LivingAnimal::canFly()
pre: hasWings = true
False otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||