KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > hql > ast > tree > ImpliedFromElement


1 // $Id: ImpliedFromElement.java,v 1.1 2005/07/12 20:27:16 steveebersole Exp $
2
package org.hibernate.hql.ast.tree;
3
4 /**
5  * Represents a FROM element implied by a path expression or a collection reference.
6  *
7  * @author josh Feb 10, 2005 12:31:03 AM
8  */

9 public class ImpliedFromElement extends FromElement {
10     /**
11      * True if this from element was implied from a path in the FROM clause, but not
12      * explicitly declard in the from clause.
13      */

14     private boolean impliedInFromClause = false;
15
16     /**
17      * True if this implied from element should be included in the projection list.
18      */

19     private boolean inProjectionList = false;
20
21     public boolean isImplied() {
22         return true;
23     }
24
25     public void setImpliedInFromClause(boolean flag) {
26         impliedInFromClause = flag;
27     }
28
29     public boolean isImpliedInFromClause() {
30         return impliedInFromClause;
31     }
32
33     public void setInProjectionList(boolean inProjectionList) {
34         this.inProjectionList = inProjectionList;
35     }
36
37     public boolean inProjectionList() {
38         return inProjectionList && isFromOrJoinFragment();
39     }
40
41     public boolean isIncludeSubclasses() {
42         return false; // Never include subclasses for implied from elements.
43
}
44
45     /**
46      * Returns additional display text for the AST node.
47      *
48      * @return String - The additional display text.
49      */

50     public String JavaDoc getDisplayText() {
51         StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
52         buf.append( "ImpliedFromElement{" );
53         appendDisplayText( buf );
54         buf.append( "}" );
55         return buf.toString();
56     }
57 }
58
Popular Tags