94 * <LI><code>RIGHT_OUTER_JOIN</code>
95 * </UL>
96 * Note that if no type is set, the <code>JOIN</code> will automatically be an
97 * inner join. The comments for the fields in the
98 * <code>JoinRowSet</code> interface explain these <code>JOIN</code> types, which are
99 * standard SQL <code>JOIN</code> types.
100 *
101 * <h3>2.0 Using a <code>JoinRowSet</code> Object for Creating a <code>JOIN</code></h3>
102 * When a <code>JoinRowSet</code> object is created, it is empty.
103 * The first <code>RowSet</code> object to be added becomes the basis for the
104 * <code>JOIN</code> relationship.
105 * Applications must determine which column in each of the
106 * <code>RowSet</code> objects to be added to the <code>JoinRowSet</code> object
107 * should be the match column. All of the
108 * <code>RowSet</code> objects must contain a match column, and the values in
109 * each match column must be ones that can be compared to values in the other match
110 * columns. The columns do not have to have the same name, though they often do,
111 * and they do not have to store the exact same data type as long as the data types
112 * can be compared.
113 * <P>
114 * A match column can be be set in two ways:
115 * <ul>
116 * <li>By calling the <code>Joinable</code> method <code>setMatchColumn</code><br>
117 * This is the only method that can set the match column before a <code>RowSet</code>
118 * object is added to a <code>JoinRowSet</code> object. The <code>RowSet</code> object
119 * must have implemented the <code>Joinable</code> interface in order to use the method
120 * <code>setMatchColumn</code>. Once the match column value
121 * has been set, this method can be used to reset the match column at any time.
122 * <li>By calling one of the versions of the <code>JoinRowSet</code> method
123 * <code>addRowSet</code> that takes a column name or number (or an array of
124 * column names or numbers)<BR>
125 * Four of the five <code>addRowSet</code> methods take a match column as a parameter.
126 * These four methods set or reset the match column at the time a <code>RowSet</code>
127 * object is being added to a <code>JoinRowSet</code> object.
128 * </ul>
129 * <h3>3.0 Sample Usage</h3>
130 * <p>
131 * The following code fragment adds two <code>CachedRowSet</code>
132 * objects to a <code>JoinRowSet</code> object. Note that in this example,
133 * no SQL <code>JOIN</code> type is set, so the default <code>JOIN</code> type,
134 * which is <i>INNER_JOIN</i>, is established.
510 * unmatched rows in either table of the join should be discarded.
511 */
512 public static int INNER_JOIN = 1;
513
514 /**
515 * An ANSI-style <code>JOIN</code> providing a left outer join between two
516 * tables. In SQL, this is described where all records should be
517 * returned from the left side of the JOIN statement.
518 */
519 public static int LEFT_OUTER_JOIN = 2;
520
521 /**
522 * An ANSI-style <code>JOIN</code> providing a right outer join between
523 * two tables. In SQL, this is described where all records from the
524 * table on the right side of the JOIN statement even if the table
525 * on the left has no matching record.
526 */
527 public static int RIGHT_OUTER_JOIN = 3;
528
529 /**
530 * An ANSI-style <code>JOIN</code> providing a a full JOIN. Specifies that all
531 * rows from either table be returned regardless of matching
532 * records on the other table.
533 */
534 public static int FULL_JOIN = 4;
535
536
537 }
|
94 * <LI><code>RIGHT_OUTER_JOIN</code>
95 * </UL>
96 * Note that if no type is set, the <code>JOIN</code> will automatically be an
97 * inner join. The comments for the fields in the
98 * <code>JoinRowSet</code> interface explain these <code>JOIN</code> types, which are
99 * standard SQL <code>JOIN</code> types.
100 *
101 * <h3>2.0 Using a <code>JoinRowSet</code> Object for Creating a <code>JOIN</code></h3>
102 * When a <code>JoinRowSet</code> object is created, it is empty.
103 * The first <code>RowSet</code> object to be added becomes the basis for the
104 * <code>JOIN</code> relationship.
105 * Applications must determine which column in each of the
106 * <code>RowSet</code> objects to be added to the <code>JoinRowSet</code> object
107 * should be the match column. All of the
108 * <code>RowSet</code> objects must contain a match column, and the values in
109 * each match column must be ones that can be compared to values in the other match
110 * columns. The columns do not have to have the same name, though they often do,
111 * and they do not have to store the exact same data type as long as the data types
112 * can be compared.
113 * <P>
114 * A match column can be set in two ways:
115 * <ul>
116 * <li>By calling the <code>Joinable</code> method <code>setMatchColumn</code><br>
117 * This is the only method that can set the match column before a <code>RowSet</code>
118 * object is added to a <code>JoinRowSet</code> object. The <code>RowSet</code> object
119 * must have implemented the <code>Joinable</code> interface in order to use the method
120 * <code>setMatchColumn</code>. Once the match column value
121 * has been set, this method can be used to reset the match column at any time.
122 * <li>By calling one of the versions of the <code>JoinRowSet</code> method
123 * <code>addRowSet</code> that takes a column name or number (or an array of
124 * column names or numbers)<BR>
125 * Four of the five <code>addRowSet</code> methods take a match column as a parameter.
126 * These four methods set or reset the match column at the time a <code>RowSet</code>
127 * object is being added to a <code>JoinRowSet</code> object.
128 * </ul>
129 * <h3>3.0 Sample Usage</h3>
130 * <p>
131 * The following code fragment adds two <code>CachedRowSet</code>
132 * objects to a <code>JoinRowSet</code> object. Note that in this example,
133 * no SQL <code>JOIN</code> type is set, so the default <code>JOIN</code> type,
134 * which is <i>INNER_JOIN</i>, is established.
510 * unmatched rows in either table of the join should be discarded.
511 */
512 public static int INNER_JOIN = 1;
513
514 /**
515 * An ANSI-style <code>JOIN</code> providing a left outer join between two
516 * tables. In SQL, this is described where all records should be
517 * returned from the left side of the JOIN statement.
518 */
519 public static int LEFT_OUTER_JOIN = 2;
520
521 /**
522 * An ANSI-style <code>JOIN</code> providing a right outer join between
523 * two tables. In SQL, this is described where all records from the
524 * table on the right side of the JOIN statement even if the table
525 * on the left has no matching record.
526 */
527 public static int RIGHT_OUTER_JOIN = 3;
528
529 /**
530 * An ANSI-style <code>JOIN</code> providing a full JOIN. Specifies that all
531 * rows from either table be returned regardless of matching
532 * records on the other table.
533 */
534 public static int FULL_JOIN = 4;
535
536
537 }
|