User Tools

Site Tools


Writing /home/academic/ogsavkovic/public_html/wiki/data/cache/7/7a21a8afcf283c7044485b0721c402d4.metadata failed
magik-demo:developer:class:core:relation

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Relation ====== **''public class Relation''**, \\ **''implements Serializable''** Relation describes an SQL relation, that is determined with name and the arity, and in addition it can contain primary key definition. ===== Class Attributes ===== <code java> private long id; private java.lang.String name; private int arity; private int primaryKey; private java.lang.String description; private java.util.ArrayList<java.lang.String> attributeNames; </code> ===== Class Constructor ===== ==== Relation ==== <code java> public Relation (java.lang.String name, int arity, int primaryKey, java.lang.String description) </code> Constructor for relation with well known arity. Attributes are load inside the function by calling readAttributesNamesInDescription\\ //Called by:// * it.unibz.inf.magik.additional.InvolvedVariablesDetector * it.unibz.inf.magik.db.DatabaseConnector * it.unibz.inf.magik.test.CycleDetectionTest * it.unibz.inf.magik.test.TestFK * it.unibz.inf.magik.test.TestFK2 * it.unibz.inf.magik.test.TestHardCaseFDCandFK * it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample * it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx * it.unibz.inf.magik.test.TestValQueryProblem * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC * it.unibz.inf.magik.test.TestQueryClass * it.unibz.inf.magik.test.TestQueryGeneralization * it.unibz.inf.magik.test.TestQueryToSQL * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx * it.unibz.inf.magik.test.TestTCQCReasonerTCSuggestions * it.unibz.inf.magik.test.TestPrimaryVioation **Parameters:** * name - name of the relation * arity - arity of the relation * primaryKey - determined with first place in the relation * description - description of the relation ---- ==== Relation ==== <code java> public Relation (java.lang.String name, int primaryKey, java.lang.String description) </code> Constructor for relation without knowning arity. Attributes are load inside the function by calling readAttributesNamesInDescription\\ //Called by:// * it.unibz.inf.magik.web.SessionControl * it.unibz.inf.magik.test.TestSimpleComparison **Parameters:** * name - name of the relation * primaryKey - determined with first place in the relation * description - description of the relation ===== Class Methods ===== ==== readAttributesNamesInDescription ==== <code java> private void applyCondition (java.lang.String termOld, java.lang.String termNew, java.util.HashMap<java.lang.String, java.lang.String> termEquality) throws ParseSQLQueryException </code> Parse the attribute name of a relation from the description field **Parameters:** * termOld - original term * termNew - new term * termEquality - map for knowing which term are equal **Throws:** * ParseSQLQueryException ----

magik-demo/developer/class/core/relation.1374243034.txt.gz · Last modified: 2017/07/06 15:24 (external edit)