openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: svn commit: r798684 - Trunk upgraded to geronimo-jpa_2.0_spec-1.0-EA6
Date Tue, 28 Jul 2009 20:00:39 GMT
Building this rev may fail unless you grab the latest 
geronimo-jpa_2.0_spec-1.0-EA6-20090728.195731-2 artifacts, as I ust 
finished merging in some recent EA5 changes for OPENJPA-1076 into the 
EA6 spec code.....


-Donald


mikedd@apache.org wrote:
> Author: mikedd
> Date: Tue Jul 28 19:49:03 2009
> New Revision: 798684
> 
> URL: http://svn.apache.org/viewvc?rev=798684&view=rev
> Log:
> OPENJPA-1202: Upgrade to Geronimo JPA 2.0 EA6
> 
> Modified:
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ParameterImpl.java
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryParameter.java
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/OrderImpl.java
>     openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/ParameterExpressionImpl.java
>     openjpa/trunk/pom.xml
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ParameterImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ParameterImpl.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ParameterImpl.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ParameterImpl.java
Tue Jul 28 19:49:03 2009
> @@ -48,7 +48,7 @@
>      private final String _name;
>      private final Integer _position;
>      private final Class<?> _expectedValueType;
> -    private Object _value;
> +    private T _value;
>      private boolean _bound; 
>      
>      /**
> @@ -128,7 +128,7 @@
>       * 
>       * @exception if the given value is not permissible for this parameter.
>       */
> -    public QueryParameter<T> bindValue(Object v) {
> +    public QueryParameter<T> bindValue(T v) {
>          if (!isValueAssignable(v)) {
>              if (v == null)
>                  throw new IllegalArgumentException(_loc.get("param-null-not-assignable",
this).getMessage());
> @@ -201,4 +201,9 @@
>  
>          return buf.toString();
>      }
> +
> +    public Class<T> getJavaType() {
> +        Class<?> cls = _value.getClass();
> +        return (Class<T>) cls;
> +    }
>  }
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
Tue Jul 28 19:49:03 2009
> @@ -518,7 +518,7 @@
>          }
>  	}
>  
> -    public String PersistenceXMLSchemaVersion() {
> +    public String getPersistenceXMLSchemaVersion() {
>          return _schemaVersion;
>      }
>  
> @@ -549,7 +549,6 @@
>      }
>  
>      public SharedCacheMode getSharedCacheMode() {
> -        // TODO Auto-generated method stub
> -        return null;
> +        throw new UnsupportedOperationException("JPA 2.0 - Method not yet implemented");
>      }
>  }
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java
Tue Jul 28 19:49:03 2009
> @@ -90,6 +90,8 @@
>      private transient ReentrantLock _lock = null;
>  	private final HintHandler _hintHandler;
>  
> +	private Map<Parameter<?>, Object> parmatersToValues = new HashMap<Parameter<?>,
Object>();
> +
>  	/**
>  	 * Constructor; supply factory exception translator and delegate.
>  	 * 
> @@ -421,7 +423,7 @@
>                          position), null, null, false);
>  
>  			Class<?> valueType = (Class<?>)_query.getParameterTypes().get((Object)position);
> -			ParameterImpl<?> param = new ParameterImpl<Object>(position, valueType);
> +			ParameterImpl<Object> param = new ParameterImpl<Object>(position, valueType);
>  			registerParameter(param);
>  			param.bindValue(value);
>  
> @@ -459,7 +461,7 @@
>  			}
>  			
>  			Class<?> valueType = (Class<?>)_query.getParameterTypes().get(name);
> -			ParameterImpl<?> param = new ParameterImpl<Object>(name, valueType);
> +			ParameterImpl<Object> param = new ParameterImpl<Object>(name, valueType);
>  			registerParameter(param);
>  			param.bindValue(value);
>  			
> @@ -925,4 +927,8 @@
>          return _query.getParameterTypes().keySet();
>      }
>  
> +    public boolean isBound(Parameter<?> param) {
> +        return parmatersToValues.keySet().contains(param);
> +    }
> +
>  }
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryParameter.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryParameter.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryParameter.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryParameter.java
Tue Jul 28 19:49:03 2009
> @@ -52,7 +52,7 @@
>      /**
>       * Binds the given value to this parameter.
>       */
> -    public abstract QueryParameter<T> bindValue(Object v);
> +    public abstract QueryParameter<T> bindValue(T v);
>  
>      /**
>       * Gets the value of this parameter without checking whether the any value has been
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/OrderImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/OrderImpl.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/OrderImpl.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/OrderImpl.java
Tue Jul 28 19:49:03 2009
> @@ -40,8 +40,8 @@
>  		this(e, true);
>  	}
>  	
> -	public <T extends Comparable<T>> Expression<T> getExpression() {
> -		return (Expression<T>)e;
> +	public Expression<?> getExpression() {
> +		return e;
>  	}
>  	
>  	public Expression getExpression5() {
> 
> Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/ParameterExpressionImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/ParameterExpressionImpl.java?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/ParameterExpressionImpl.java
(original)
> +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/ParameterExpressionImpl.java
Tue Jul 28 19:49:03 2009
> @@ -101,7 +101,7 @@
>          _delegate.clearBinding();
>      }
>      
> -    public final QueryParameter<T> bindValue(Object v) {
> +    public final QueryParameter<T> bindValue(T v) {
>          return _delegate.bindValue(v);
>      }
>  
> 
> Modified: openjpa/trunk/pom.xml
> URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=798684&r1=798683&r2=798684&view=diff
> ==============================================================================
> --- openjpa/trunk/pom.xml (original)
> +++ openjpa/trunk/pom.xml Tue Jul 28 19:49:03 2009
> @@ -492,7 +492,7 @@
>              <dependency>
>                  <groupId>org.apache.geronimo.specs</groupId>
>                  <artifactId>geronimo-jpa_2.0_spec</artifactId>
> -                <version>1.0-EA5-SNAPSHOT</version>
> +                <version>1.0-EA6-SNAPSHOT</version>
>              </dependency>
>              <dependency>
>                  <groupId>org.apache.geronimo.specs</groupId>
> 
> 
> 

Mime
View raw message