[hibernate-commits] Hibernate SVN: r11138 - branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Feb 2 12:45:08 EST 2007


Author: steve.ebersole at jboss.com
Date: 2007-02-02 12:45:08 -0500 (Fri, 02 Feb 2007)
New Revision: 11138

Modified:
   branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/EntityPersisterReference.java
   branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/PersisterReference.java
Log:
minor

Modified: branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/EntityPersisterReference.java
===================================================================
--- branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/EntityPersisterReference.java	2007-02-01 23:11:49 UTC (rev 11137)
+++ branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/EntityPersisterReference.java	2007-02-02 17:45:08 UTC (rev 11138)
@@ -12,8 +12,6 @@
 public class EntityPersisterReference extends PersisterReference  {
 
 	private String entityName;
-	private String alias;
-	private boolean propertyFetch;
 	private transient Queryable persister;
 
 	/**
@@ -30,11 +28,6 @@
 		initialize( alias, propertyFetch );
 	}
 
-	protected void initialize(String alias, boolean propertyFetch) {
-		this.alias = alias;
-		this.propertyFetch = propertyFetch;
-	}
-
 	/**
 	 * Retrieves a reference to the underlying entity persister.
 	 *
@@ -58,26 +51,6 @@
 	}
 
 	/**
-	 * Retrieve the alias by which the persister reference can be located from the
-	 * {@link PersisterReferenceContext}.
-	 *
-	 * @return The HQL alias.
-	 */
-	public String getAlias() {
-		return alias;
-	}
-
-	/**
-	 * Is lazy property fetching enabled for this persister reference.
-	 *
-	 * @return True if this persister reference indicates that lazy properties
-	 * be immediately fetched; false otherwise.
-	 */
-	public boolean isPropertyFetch() {
-		return propertyFetch;
-	}
-
-	/**
 	 * {@inheritDoc}
 	 */
 	public AssociationType getPersisterType() {
@@ -107,7 +80,7 @@
 	 * {@inheritDoc}
 	 */
 	public String toString() {
-		return "EntityPersisterReference {entity-name=" + entityName + ", alias=" + alias + "}";
+		return "EntityPersisterReference {entity-name=" + entityName + ", alias=" + getAlias() + "}";
 	}
 
 }

Modified: branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/PersisterReference.java
===================================================================
--- branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/PersisterReference.java	2007-02-01 23:11:49 UTC (rev 11137)
+++ branches/HQL_ANTLR_2/Hibernate3/src/org/hibernate/hql/ast/resolve/PersisterReference.java	2007-02-02 17:45:08 UTC (rev 11138)
@@ -17,6 +17,8 @@
  */
 public abstract class PersisterReference extends Node implements Aliasable, ResolutionContextAwareNode {
 
+	private String alias;
+	private boolean propertyFetch;
 	private ResolutionContext resolutionContext;
 	private final Map reusableJoinsByProperty = new HashMap();
 
@@ -29,6 +31,16 @@
 	public abstract String getName();
 
 	/**
+	 * Retrieve the alias by which the persister reference can be located from the
+	 * {@link PersisterReferenceContext}.
+	 *
+	 * @return The HQL alias.
+	 */
+	public String getAlias() {
+		return alias;
+	}
+
+	/**
 	 * The type represented by this persister reference.
 	 *
 	 * @return The type.
@@ -54,6 +66,16 @@
 	public abstract Type getPropertyType(String propertyName);
 
 	/**
+	 * Is lazy property fetching enabled for this persister reference.
+	 *
+	 * @return True if this persister reference indicates that lazy properties
+	 * be immediately fetched; false otherwise.
+	 */
+	public boolean isPropertyFetch() {
+		return propertyFetch;
+	}
+
+	/**
 	 * Get the loggable text of this persister reference.
 	 *
 	 * @return The loggable text.
@@ -93,4 +115,9 @@
 	public void injectResolutionContext(ResolutionContext resolutionContext) {
 		this.resolutionContext = resolutionContext;
 	}
+
+	protected void initialize(String alias, boolean propertyFetch) {
+		this.alias = alias;
+		this.propertyFetch = propertyFetch;
+	}
 }




More information about the hibernate-commits mailing list