1    package com.instantbank.component.job.util;
2    
3    
4    /**
5     *  Description of a join element in a job SQL sentence
6     *
7     * @author InstantBank (Consuelo Franky)
8     * @created October 2002
9     */
10   public class JoinElement {
11     /**
12      * name of parent table alias
13      */
14     private String parentAlias;
15     /**
16      * column name in parent table for join
17      */
18     private String parentColumn;
19     /**
20      * name of table alias
21      */
22     private String sonAlias;
23     /**
24      * column name in sonAlias for join
25      */
26     private String sonColumn;
27     /**
28      * type of join: "" or "(+)"
29      */
30     private String joinType;
31   
32   
33     /**
34      *  Constructor for the JoinElement object
35      *
36      * @param parentAlias name of parent table alias
37      * @param parentColumn column name in parent table for join
38      * @param sonAlias name of table alias
39      * @param sonColumn column name in sonAlias for join
40      * @param joinType type of join
41      */
42     public JoinElement(String parentAlias, String parentColumn, String sonAlias,
43                        String sonColumn, String joinType) {
44       this.parentAlias = parentAlias;
45       this.parentColumn = parentColumn;
46       this.sonAlias = sonAlias;
47       this.sonColumn = sonColumn;
48       this.joinType = joinType;
49     }
50   
51   
52     /**
53      *  Gets the parentAlias attribute of the JoinElement object
54      *
55      * @return The parentAlias value
56      */
57     public String getParentAlias() {
58       return (this.parentAlias);
59     }
60   
61   
62     /**
63      *  Gets the parentColumn attribute of the JoinElement object
64      *
65      * @return The parentColumn value
66      */
67     public String getParentColumn() {
68       return (this.parentColumn);
69     }
70   
71   
72     /**
73      *  Gets the sonAlias attribute of the JoinElement object
74      *
75      * @return The sonAlias value
76      */
77     public String getSonAlias() {
78       return (this.sonAlias);
79     }
80   
81   
82     /**
83      *  Gets the sonColumn attribute of the JoinElement object
84      *
85      * @return The sonColumn value
86      */
87     public String getSonColumn() {
88       return (this.sonColumn);
89     }
90   
91   
92     /**
93      *  Gets the joinType attribute of the JoinElement object
94      *
95      * @return The joinType value
96      */
97     public String getJoinType() {
98       return (this.joinType);
99     }
100  
101  
102    /**
103     *  Textual representation of JoinElement
104     *
105     * @return text corresponding to JoinElement instance
106     */
107    public String toString() {
108  
109      StringBuffer toString = new StringBuffer();
110      toString.append("\nparentAlias = ");
111      toString.append(parentAlias);
112      toString.append("\nparentColumn = ");
113      toString.append(parentColumn);
114      toString.append("\nsonAlias = ");
115      toString.append(sonAlias);
116      toString.append("\nsonColumn = ");
117      toString.append(sonColumn);
118      toString.append("\njoinType = ");
119      toString.append(joinType);
120      toString.append("\n");
121  
122      return new String(toString);
123    }
124  
125  }
126