[hibernate-commits] Hibernate SVN: r16351 - in core/branches/antlr3: src/main/java/org/hibernate/sql/ast/ordering and 1 other directory.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Apr 15 21:48:58 EDT 2009


Author: steve.ebersole at jboss.com
Date: 2009-04-15 21:48:58 -0400 (Wed, 15 Apr 2009)
New Revision: 16351

Removed:
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java
   core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java
Modified:
   core/branches/antlr3/
   core/branches/antlr3/pom.xml
Log:
clean compile


Property changes on: core/branches/antlr3
___________________________________________________________________
Name: svn:ignore
   - target
local
*.ipr
*.iws
*.iml
.classpath
.project
.nbattrs
*.log
*.properties
.clover

   + target
local
*.ipr
*.iws
*.iml
atlassian-ide-plugin.xml
.classpath
.project
.nbattrs
*.log
*.properties
.clover


Modified: core/branches/antlr3/pom.xml
===================================================================
--- core/branches/antlr3/pom.xml	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/pom.xml	2009-04-16 01:48:58 UTC (rev 16351)
@@ -174,8 +174,12 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
+                    <!--
                     <source>1.4</source>
                     <target>1.4</target>
+                    -->
+                    <source>1.5</source>
+                    <target>1.5</target>
                 </configuration>
             </plugin>
 

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,36 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models a collation specification (<tt>COLLATE</tt> using a specific character-set) within a
- * {@link SortSpecification}.
- *
- * @author Steve Ebersole
- */
-public class CollationSpecification extends Node {
-}

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,55 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-import org.hibernate.sql.ast.common.NodeFactory;
-
-/**
- * Acts as a {@link NodeFactory} for injecting our specific AST node classes into the Antlr generated trees.
- *
- * @author Steve Ebersole
- */
-public class Factory extends NodeFactory implements OrderByTemplateTokenTypes {
-	/**
-	 * {@inheritDoc}
-	 */
-	public Class getASTNodeType(int i) {
-		switch ( i ) {
-			case ORDER_BY:
-				return OrderByFragment.class;
-			case SORT_SPEC:
-				return SortSpecification.class;
-			case ORDER_SPEC:
-				return OrderingSpecification.class;
-			case COLLATE:
-				return CollationSpecification.class;
-			case SORT_KEY:
-				return SortKey.class;
-			default:
-				return Node.class;
-		}
-	}
-}

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,35 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Represents a parsed <tt>order-by</tt> mapping fragment.  This holds the tree of all {@link SortSpecification}s.
- *
- * @author Steve Ebersole
- */
-public class OrderByFragment extends Node {
-}

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,72 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models an ordering specification (<tt>ASCENDING</tt> or <tt>DESCENDING</tt>) within a {@link SortSpecification}.
- *
- * @author Steve Ebersole
- */
-public class OrderingSpecification extends Node {
-	public static class Ordering {
-		public static final Ordering ASCENDING = new Ordering( "asc" );
-		public static final Ordering DESCENDING = new Ordering( "desc" );
-
-		private final String name;
-
-		private Ordering(String name) {
-			this.name = name;
-		}
-	}
-
-	private boolean resolved;
-	private Ordering ordering;
-
-	public Ordering getOrdering() {
-		if ( !resolved ) {
-			ordering = resolve( getText() );
-			resolved = true;
-		}
-		return ordering;
-	}
-
-	private static Ordering resolve(String text) {
-		if ( Ordering.ASCENDING.name.equals( text ) ) {
-			return Ordering.ASCENDING;
-		}
-		else if ( Ordering.DESCENDING.name.equals( text ) ) {
-			return Ordering.DESCENDING;
-		}
-		else {
-			throw new IllegalStateException( "Unknown ordering [" + text + "]" );
-		}
-	}
-
-	public String getRenderableText() {
-		return getOrdering().name;
-	}
-}

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,36 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models the container node for the <tt>sort key</tt>, which is the term given by the ANSI SQL specification to the
- * expression upon which to sort for each {@link SortSpecification}
- *
- * @author Steve Ebersole
- */
-public class SortKey extends Node {
-}

Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java	2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java	2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,82 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import antlr.collections.AST;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models each sorting exprersion.
- *
- * @author Steve Ebersole
- */
-public class SortSpecification extends Node {
-	/**
-	 * Locate the specified {@link SortKey}.
-	 *
-	 * @return The sort key.
-	 */
-	public SortKey getSortKey() {
-		return ( SortKey ) getFirstChild();
-	}
-
-	/**
-	 * Locate the specified <tt>collation specification</tt>, if one.
-	 *
-	 * @return The <tt>collation specification</tt>, or null if none was specified.
-	 */
-	public CollationSpecification getCollation() {
-		AST possible = getSortKey().getNextSibling();
-		return  possible != null && OrderByTemplateTokenTypes.COLLATE == possible.getType()
-				? ( CollationSpecification ) possible
-				: null;
-	}
-
-	/**
-	 * Locate the specified <tt>ordering specification</tt>, if one.
-	 *
-	 * @return The <tt>ordering specification</tt>, or null if none was specified.
-	 */
-	public OrderingSpecification getOrdering() {
-		// IMPL NOTE : the ordering-spec would be either the 2nd or 3rd child (of the overall sort-spec), if it existed,
-		// 		depending on whether a collation-spec was specified.
-
-		AST possible = getSortKey().getNextSibling();
-		if ( possible == null ) {
-			// There was no sort-spec parts specified other then the sort-key so there can be no ordering-spec...
-			return null;
-		}
-
-		if ( OrderByTemplateTokenTypes.COLLATE == possible.getType() ) {
-			// the 2nd child was a collation-spec, so we need to check the 3rd child instead.
-			possible = possible.getNextSibling();
-		}
-
-		return possible != null && OrderByTemplateTokenTypes.ORDER_SPEC == possible.getType()
-				?  ( OrderingSpecification ) possible
-				:  null;
-	}
-}




More information about the hibernate-commits mailing list