~ubuntu-branches/ubuntu/trusty/libjgraph-java/trusty

« back to all changes in this revision

Viewing changes to examples/com/jgraph/example/adapter/JGraphSQLRelation.java

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2007-02-26 17:25:47 UTC
  • Revision ID: james.westby@ubuntu.com-20070226172547-k03sz4dbg197zr0p
Tags: upstream-5.10.0.1.dfsg
ImportĀ upstreamĀ versionĀ 5.10.0.1.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: JGraphSQLRelation.java,v 1.1.1.1 2005/08/06 05:26:45 gaudenz Exp $
 
3
 * 
 
4
 * Copyright (c) 2001-2005, Gaudenz Alder
 
5
 * 
 
6
 * See LICENSE file in distribution for licensing details of this source file
 
7
 */
 
8
package com.jgraph.example.adapter;
 
9
 
 
10
/**
 
11
 * A business object that represents a relation between two entities.
 
12
 */
 
13
public class JGraphSQLRelation extends JGraphSQLEntity {
 
14
 
 
15
        protected JGraphSQLEntity source, target;
 
16
 
 
17
        public JGraphSQLRelation() {
 
18
                this(null);
 
19
        }
 
20
 
 
21
        public JGraphSQLRelation(Object userObject) {
 
22
                this(userObject, null, null, null, null);
 
23
        }
 
24
 
 
25
        public JGraphSQLRelation(Object id, JGraphSQLEntity parent,
 
26
                        JGraphSQLEntity source, JGraphSQLEntity target) {
 
27
                this(null, id, parent, source, target);
 
28
        }
 
29
 
 
30
        public JGraphSQLRelation(Object userObject, Object id,
 
31
                        JGraphSQLEntity parent, JGraphSQLEntity source,
 
32
                        JGraphSQLEntity target) {
 
33
                super(userObject, id, parent);
 
34
                setSource(source);
 
35
                setTarget(target);
 
36
        }
 
37
 
 
38
        /**
 
39
         * @return Returns the source.
 
40
         */
 
41
        public JGraphSQLEntity getSource() {
 
42
                return source;
 
43
        }
 
44
 
 
45
        /**
 
46
         * @param source
 
47
         *            The source to set.
 
48
         */
 
49
        public void setSource(JGraphSQLEntity source) {
 
50
                this.source = source;
 
51
        }
 
52
 
 
53
        /**
 
54
         * @return Returns the target.
 
55
         */
 
56
        public JGraphSQLEntity getTarget() {
 
57
                return target;
 
58
        }
 
59
 
 
60
        /**
 
61
         * @param target
 
62
         *            The target to set.
 
63
         */
 
64
        public void setTarget(JGraphSQLEntity target) {
 
65
                this.target = target;
 
66
        }
 
67
 
 
68
}
 
 
b'\\ No newline at end of file'