1 /* 2 * Copyright 2003, 2004 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 16 */ 17 package org.apache.ws.jaxme.sqls; 18 19 /** <p>A TableReference being used in a SELECT statement. You 20 * may cast the result of 21 * {@link org.apache.ws.jaxme.sqls.SelectStatement#getTableReference} 22 * to an instance of SelectTableReference.</p> 23 * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a> 24 */ 25 public interface SelectTableReference extends TableReference { 26 /** <p>Returns the {@link SelectStatement} that created the reference. 27 * Shortcut for <code>(SelectStatement) getStatement()</code>.</p> 28 */ 29 public SelectStatement getSelectStatement(); 30 31 /** <p>Indicates that the referenced table shall be joined 32 * with the given table <code>pTable</code> and returns a 33 * reference to that table.</p> 34 */ 35 public JoinReference join(Table pTable); 36 37 /** <p>Indicates that the referenced table shall be joined 38 * in a left outer join with the given table <code>pTable</code> 39 * and returns a reference to that table.</p> 40 */ 41 public JoinReference leftOuterJoin(Table pTable); 42 43 /** <p>Returns the right table of a possible join or null, 44 * if there is no such table.</p> 45 */ 46 public JoinReference getRightJoinedTableReference(); 47 } 48