This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
magik-demo:developer:class:core:finitedomainconstraints [2013/07/22 11:20] alex [Class Constructor] |
magik-demo:developer:class:core:finitedomainconstraints [2017/07/06 15:24] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
Relation relation; | Relation relation; | ||
</code> | </code> | ||
- | ===== Class Constructor ===== | + | ===== Class Constructors ===== |
==== FiniteDomainConstraint ==== | ==== FiniteDomainConstraint ==== | ||
+ | <code java> | ||
+ | public FiniteDomainConstraint () | ||
+ | </code> | ||
+ | Default constructor with default values for attributes. | ||
---- | ---- | ||
==== FiniteDomainConstraint ==== | ==== FiniteDomainConstraint ==== | ||
+ | |||
+ | <code java> | ||
+ | public FiniteDomainConstraint (int argPosition, | ||
+ | java.util.ArrayList<java.lang.String> values, | ||
+ | Relation relation) | ||
+ | </code> | ||
+ | |||
+ | Constructor that instantiates each attribute with the values passed. | ||
+ | |||
+ | //Called by:// | ||
+ | * it.unibz.inf.magik.web.SessionControl | ||
+ | * it.unibz.inf.magik.db.DatabaseConnector | ||
+ | * it.unibz.inf.magik.test.TestHardCaseFDCandFK | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample | ||
+ | * it.unibz.inf.magik.test.TestValQueryProblem | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC | ||
+ | * it.unibz.inf.magik.test.TestFK | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerTCSuggestions | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD | ||
+ | * it.unibz.inf.magik.test.TestQueryClass | ||
+ | |||
+ | **Parameters** | ||
+ | * argPostion - position of the constrained argument in the containing relation | ||
+ | * values - list of the values allowed for the argument on the argPostion | ||
+ | * relation - relation over which finite domain constraint is defined | ||
===== Class Methods ===== | ===== Class Methods ===== | ||
+ | ==== printHTML ==== | ||
+ | |||
+ | <code java> | ||
+ | public java.lang.String printHTML() | ||
+ | </code> | ||
+ | |||
+ | This method is used for create a compact view of a finite domain constraint key (''table[field] ∈ {'val1', 'val2'}'' ) | ||
+ | |||
+ | **Returns:** | ||
+ | * finite domain constraint adapted to the compact view | ||
+ | |||
+ | |||
+ | ---- | ||
+ | ==== getters and setters methods ==== | ||
+ | |||
+ | <code java> | ||
+ | public int getArgPosition() | ||
+ | public void setArgPosition(int argPosition) | ||
+ | |||
+ | public java.util.ArrayList<java.lang.String> getValues() | ||
+ | public void setValues(java.util.ArrayList<java.lang.String> values) | ||
+ | |||
+ | public long getId() | ||
+ | public void setId(long id) | ||
+ | |||
+ | public Relation getRelation() | ||
+ | public void setRelation(Relation relation) | ||
+ | |||
+ | </code> | ||
+ | |||
+ | [[magik-demo:developer:class:core:finitedomainconstraints|Back to Top]] | [[magik-demo:start|Back to Home Page]] |