6 - Remove setParameter(... Type type) methods in favour of setParameter( AllowableParameterType type)

This commit is contained in:
Andrea Boriero 2019-07-17 17:33:57 +01:00
parent a5414d2324
commit a15774b7e0
9 changed files with 184 additions and 147 deletions

View File

@ -14,6 +14,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.loader.collection.CollectionInitializer; import org.hibernate.loader.collection.CollectionInitializer;
import org.hibernate.metamodel.model.domain.AllowableParameterType;
import org.hibernate.query.sql.spi.NativeQueryImplementor; import org.hibernate.query.sql.spi.NativeQueryImplementor;
/** /**
@ -42,11 +43,11 @@ public final class NamedQueryCollectionInitializer implements CollectionInitiali
nativeQuery.setParameter( nativeQuery.setParameter(
nativeQuery.getParameterMetadata().getNamedParameterNames().iterator().next(), nativeQuery.getParameterMetadata().getNamedParameterNames().iterator().next(),
key, key,
persister.getKeyType() (AllowableParameterType) persister.getKeyType()
); );
} }
else { else {
nativeQuery.setParameter( 1, key, persister.getKeyType() ); nativeQuery.setParameter( 1, key, (AllowableParameterType) persister.getKeyType() );
} }
nativeQuery.setCollectionKey( key ).setHibernateFlushMode( FlushMode.MANUAL ).list(); nativeQuery.setCollectionKey( key ).setHibernateFlushMode( FlushMode.MANUAL ).list();

View File

@ -14,6 +14,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.loader.entity.UniqueEntityLoader; import org.hibernate.loader.entity.UniqueEntityLoader;
import org.hibernate.metamodel.model.domain.AllowableParameterType;
import org.hibernate.query.internal.AbstractProducedQuery; import org.hibernate.query.internal.AbstractProducedQuery;
/** /**
@ -61,10 +62,12 @@ public final class NamedQueryLoader implements UniqueEntityLoader {
final AbstractProducedQuery query = (AbstractProducedQuery) session.getNamedQuery( queryName ); final AbstractProducedQuery query = (AbstractProducedQuery) session.getNamedQuery( queryName );
if ( query.getParameterMetadata().hasNamedParameters() ) { if ( query.getParameterMetadata().hasNamedParameters() ) {
query.setParameter( query.getParameterMetadata().getNamedParameterNames().iterator().next(), id, persister.getIdentifierType() ); query.setParameter( query.getParameterMetadata().getNamedParameterNames().iterator().next(), id,
(AllowableParameterType) persister.getIdentifierType()
);
} }
else { else {
query.setParameter( position, id, persister.getIdentifierType() ); query.setParameter( position, id, (AllowableParameterType) persister.getIdentifierType() );
} }
query.setOptionalId( id ); query.setOptionalId( id );

View File

@ -851,20 +851,20 @@ public class ProcedureCallImpl<R>
return (ProcedureCallImplementor<R>) super.setParameter( parameter, value, type ); return (ProcedureCallImplementor<R>) super.setParameter( parameter, value, type );
} }
@Override // @Override
public <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value, Type type) { // public <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value, Type type) {
return (ProcedureCallImplementor<R>) super.setParameter( parameter, value, type ); // return (ProcedureCallImplementor<R>) super.setParameter( parameter, value, type );
} // }
@Override @Override
public ProcedureCallImplementor<R> setParameter(String name, Object value, AllowableParameterType type) { public ProcedureCallImplementor<R> setParameter(String name, Object value, AllowableParameterType type) {
return (ProcedureCallImplementor<R>) super.setParameter( name, value, type ); return (ProcedureCallImplementor<R>) super.setParameter( name, value, type );
} }
@Override // @Override
public ProcedureCallImplementor<R> setParameter(String name, Object value, Type type) { // public ProcedureCallImplementor<R> setParameter(String name, Object value, Type type) {
return (ProcedureCallImplementor<R>) super.setParameter( name, value, type ); // return (ProcedureCallImplementor<R>) super.setParameter( name, value, type );
} // }
@Override @Override
public ProcedureCallImplementor<R> setParameter(int position, Object value, AllowableParameterType type) { public ProcedureCallImplementor<R> setParameter(int position, Object value, AllowableParameterType type) {
@ -872,10 +872,10 @@ public class ProcedureCallImpl<R>
return (ProcedureCallImplementor<R>) super.setParameter( position, value, type ); return (ProcedureCallImplementor<R>) super.setParameter( position, value, type );
} }
@Override // @Override
public ProcedureCallImplementor<R> setParameter(int position, Object value, Type type) { // public ProcedureCallImplementor<R> setParameter(int position, Object value, Type type) {
return (ProcedureCallImplementor<R>) super.setParameter( position, value, type ); // return (ProcedureCallImplementor<R>) super.setParameter( position, value, type );
} // }
@Override @Override
public <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value, TemporalType temporalPrecision) { public <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value, TemporalType temporalPrecision) {

View File

@ -480,14 +480,14 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
<P> NativeQuery<T> setParameter(Parameter<P> param, P value); <P> NativeQuery<T> setParameter(Parameter<P> param, P value);
@Override // @Override
NativeQuery<T> setParameter(String name, Object val, Type type); // NativeQuery<T> setParameter(String name, Object val, Type type);
//
@Override // @Override
NativeQuery<T> setParameter(int position, Object val, Type type); // NativeQuery<T> setParameter(int position, Object val, Type type);
//
@Override // @Override
<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, Type type); // <P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, Type type);
@Override @Override
@ -526,16 +526,16 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
@Override @Override
NativeQuery<T> setParameterList(String name, Collection values); NativeQuery<T> setParameterList(String name, Collection values);
@Override // @Override
default NativeQuery<T> setParameterList(String name, Collection values, Type type) { // default NativeQuery<T> setParameterList(String name, Collection values, Type type) {
return setParameterList( name, values, (AllowableParameterType) type ); // return setParameterList( name, values, (AllowableParameterType) type );
} // }
@Override @Override
NativeQuery<T> setParameterList(String name, Collection values, AllowableParameterType type); NativeQuery<T> setParameterList(String name, Collection values, AllowableParameterType type);
@Override // @Override
NativeQuery<T> setParameterList(String name, Object[] values, Type type); // NativeQuery<T> setParameterList(String name, Object[] values, Type type);
@Override @Override
NativeQuery<T> setParameterList(String name, Object[] values, AllowableParameterType type); NativeQuery<T> setParameterList(String name, Object[] values, AllowableParameterType type);
@ -561,14 +561,14 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
@Override @Override
NativeQuery<T> setParameterList(int position, Collection values, Class type); NativeQuery<T> setParameterList(int position, Collection values, Class type);
@Override // @Override
NativeQuery<T> setParameterList(int position, Collection values, Type type); // NativeQuery<T> setParameterList(int position, Collection values, Type type);
@Override @Override
NativeQuery<T> setParameterList(int position, Collection values, AllowableParameterType type); NativeQuery<T> setParameterList(int position, Collection values, AllowableParameterType type);
@Override // @Override
NativeQuery<T> setParameterList(int position, Object[] values, Type type); // NativeQuery<T> setParameterList(int position, Object[] values, Type type);
@Override @Override
NativeQuery<T> setParameterList(int position, Object[] values, AllowableParameterType type); NativeQuery<T> setParameterList(int position, Object[] values, AllowableParameterType type);

View File

@ -564,10 +564,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameterList(String, Collection, AllowableParameterType)} * @deprecated Use {@link #setParameterList(String, Collection, AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default Query<R> setParameterList(String name, Collection values, Type type){ // default Query<R> setParameterList(String name, Collection values, Type type){
return setParameter( name, values, (AllowableParameterType) type ); // return setParameter( name, values, (AllowableParameterType) type );
} // }
/** /**
* Bind multiple values to a named query parameter. This is useful for binding * Bind multiple values to a named query parameter. This is useful for binding
@ -581,10 +581,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameterList(String, Collection, AllowableParameterType)} * @deprecated Use {@link #setParameterList(String, Collection, AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default Query<R> setParameterList(int position, Collection values, Type type){ // default Query<R> setParameterList(int position, Collection values, Type type){
return setParameter( position, values, (AllowableParameterType) type ); // return setParameter( position, values, (AllowableParameterType) type );
} // }
/** /**
* Bind multiple values to a named query parameter. This is useful for binding * Bind multiple values to a named query parameter. This is useful for binding
@ -623,9 +623,9 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* @deprecated Use {@link #setParameterList(String, Object[], AllowableParameterType)} * @deprecated Use {@link #setParameterList(String, Object[], AllowableParameterType)}
*/ */
@Deprecated @Deprecated
default Query<R> setParameterList(String name, Object[] values, Type type){ // default Query<R> setParameterList(String name, Object[] values, Type type){
return setParameter( name, values, (AllowableParameterType)type ); // return setParameter( name, values, (AllowableParameterType)type );
} // }
/** /**
* Bind multiple values to a named query parameter. This is useful for binding * Bind multiple values to a named query parameter. This is useful for binding
@ -639,10 +639,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameterList(String, Object[], AllowableParameterType)} * @deprecated Use {@link #setParameterList(String, Object[], AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default Query<R> setParameterList(int position, Object[] values, Type type){ // default Query<R> setParameterList(int position, Object[] values, Type type){
return setParameter( position, values, (AllowableParameterType)type ); // return setParameter( position, values, (AllowableParameterType)type );
} // }
/** /**
* Bind multiple values to a named query parameter. This is useful for binding * Bind multiple values to a named query parameter. This is useful for binding
@ -733,10 +733,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameter(String, Object, AllowableParameterType)} * @deprecated Use {@link #setParameter(String, Object, AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default Query<R> setParameter(String name, Object val, Type type){ // default Query<R> setParameter(String name, Object val, Type type){
return setParameter( name, val, (AllowableParameterType) type ); // return setParameter( name, val, (AllowableParameterType) type );
} // }
/** /**
* Bind a value to a JDBC-style query parameter. * Bind a value to a JDBC-style query parameter.
@ -750,10 +750,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameter(int, Object, AllowableParameterType)} * @deprecated Use {@link #setParameter(int, Object, AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default Query<R> setParameter(int position, Object val, Type type) { // default Query<R> setParameter(int position, Object val, Type type) {
return setParameter( position, val, (AllowableParameterType) type ); // return setParameter( position, val, (AllowableParameterType) type );
} // }
/** /**
* Bind a query parameter using the supplied Type * Bind a query parameter using the supplied Type
@ -766,10 +766,10 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
* *
* @deprecated Use {@link #setParameter(QueryParameter, Object, AllowableParameterType)} * @deprecated Use {@link #setParameter(QueryParameter, Object, AllowableParameterType)}
*/ */
@Deprecated // @Deprecated
default <P> Query<R> setParameter(QueryParameter<P> parameter, P val, Type type){ // default <P> Query<R> setParameter(QueryParameter<P> parameter, P val, Type type){
return setParameter( parameter, val, (AllowableParameterType) type ); // return setParameter( parameter, val, (AllowableParameterType) type );
} // }
/** /**
* @deprecated (since 5.2) Use {@link #setTupleTransformer} or {@link #setResultListTransformer} * @deprecated (since 5.2) Use {@link #setTupleTransformer} or {@link #setResultListTransformer}

View File

@ -832,24 +832,24 @@ public class NativeQueryImpl<R>
return this; return this;
} }
@Override // @Override
@SuppressWarnings("unchecked") // @SuppressWarnings("unchecked")
public NativeQueryImplementor<R> setParameter(QueryParameter parameter, Object value, Type type) { // public NativeQueryImplementor<R> setParameter(QueryParameter parameter, Object value, Type type) {
super.setParameter( parameter, value, type ); // super.setParameter( parameter, value, type );
return this; // return this;
} // }
//
@Override // @Override
public NativeQueryImplementor<R> setParameter(String name, Object value, Type type) { // public NativeQueryImplementor<R> setParameter(String name, Object value, Type type) {
super.setParameter( name, value, type ); // super.setParameter( name, value, type );
return this; // return this;
} // }
//
@Override // @Override
public NativeQueryImplementor<R> setParameter(int position, Object value, Type type) { // public NativeQueryImplementor<R> setParameter(int position, Object value, Type type) {
super.setParameter( position, value, type ); // super.setParameter( position, value, type );
return this; // return this;
} // }
@Override @Override
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, TemporalType temporalType) { public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, TemporalType temporalType) {
@ -892,11 +892,11 @@ public class NativeQueryImpl<R>
super.setParameter( param, value, temporalType ); super.setParameter( param, value, temporalType );
return this; return this;
} }
//
@Override // @Override
public NativeQueryImplementor<R> setParameterList(int position, Collection values, Type type) { // public NativeQueryImplementor<R> setParameterList(int position, Collection values, Type type) {
return setParameterList( position, values, ( AllowableParameterType) type ); // return setParameterList( position, values, ( AllowableParameterType) type );
} // }
@Override @Override
public NativeQueryImplementor<R> setParameterList(String name, Collection values, AllowableParameterType type) { public NativeQueryImplementor<R> setParameterList(String name, Collection values, AllowableParameterType type) {
@ -922,10 +922,10 @@ public class NativeQueryImpl<R>
return (NativeQueryImplementor) super.setParameterList( position, values, type ); return (NativeQueryImplementor) super.setParameterList( position, values, type );
} }
@Override // @Override
public NativeQueryImplementor<R> setParameterList(int position, Object[] values, Type type) { // public NativeQueryImplementor<R> setParameterList(int position, Object[] values, Type type) {
return null; // return null;
} // }
@Override @Override
public NativeQueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType) { public NativeQueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType) {
@ -987,17 +987,17 @@ public class NativeQueryImpl<R>
return this; return this;
} }
@Override // @Override
public NativeQueryImplementor<R> setParameterList(String name, Collection values, Type type) { // public NativeQueryImplementor<R> setParameterList(String name, Collection values, Type type) {
super.setParameterList( name, values, type ); // super.setParameterList( name, values, type );
return this; // return this;
} // }
//
@Override // @Override
public NativeQueryImplementor<R> setParameterList(String name, Object[] values, Type type) { // public NativeQueryImplementor<R> setParameterList(String name, Object[] values, Type type) {
super.setParameterList( name, values, type ); // super.setParameterList( name, values, type );
return this; // return this;
} // }
@Override @Override
public NativeQueryImplementor<R> setParameterList(String name, Object[] values) { public NativeQueryImplementor<R> setParameterList(String name, Object[] values) {

View File

@ -34,7 +34,6 @@ import org.hibernate.query.ResultListTransformer;
import org.hibernate.query.TupleTransformer; import org.hibernate.query.TupleTransformer;
import org.hibernate.query.spi.NameableQuery; import org.hibernate.query.spi.NameableQuery;
import org.hibernate.query.spi.QueryImplementor; import org.hibernate.query.spi.QueryImplementor;
import org.hibernate.type.Type;
/** /**
* @author Steve Ebersole * @author Steve Ebersole
@ -159,10 +158,10 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
@Override @Override
NativeQueryImplementor<R> setParameter(String name, Object val); NativeQueryImplementor<R> setParameter(String name, Object val);
@Override // @Override
default <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, Type type) { // default <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, Type type) {
return setParameter( parameter, val, (AllowableParameterType) type ); // return setParameter( parameter, val, (AllowableParameterType) type );
} // }
@Override @Override
<P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType type); <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType type);
@ -170,18 +169,18 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
@Override @Override
NativeQueryImplementor<R> setParameter(int position, Object val); NativeQueryImplementor<R> setParameter(int position, Object val);
@Override // @Override
default NativeQueryImplementor<R> setParameter(String name, Object val, Type type) { // default NativeQueryImplementor<R> setParameter(String name, Object val, Type type) {
return setParameter( name, val, (AllowableParameterType) type ); // return setParameter( name, val, (AllowableParameterType) type );
} // }
@Override @Override
NativeQueryImplementor<R> setParameter(String name, Object val, AllowableParameterType type); NativeQueryImplementor<R> setParameter(String name, Object val, AllowableParameterType type);
@Override // @Override
default NativeQueryImplementor<R> setParameter(int position, Object val, Type type) { // default NativeQueryImplementor<R> setParameter(int position, Object val, Type type) {
return setParameter( position, val, (AllowableParameterType) type ); // return setParameter( position, val, (AllowableParameterType) type );
} // }
@Override @Override
NativeQueryImplementor<R> setParameter(int position, Object val, AllowableParameterType type); NativeQueryImplementor<R> setParameter(int position, Object val, AllowableParameterType type);
@ -206,18 +205,18 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
@Override @Override
NativeQueryImplementor<R> setParameterList(String name, Collection values); NativeQueryImplementor<R> setParameterList(String name, Collection values);
@Override // @Override
default NativeQueryImplementor<R> setParameterList(String name, Collection values, Type type) { // default NativeQueryImplementor<R> setParameterList(String name, Collection values, Type type) {
return setParameterList( name, values, (AllowableParameterType) type ); // return setParameterList( name, values, (AllowableParameterType) type );
} // }
@Override @Override
NativeQueryImplementor<R> setParameterList(String name, Collection values, AllowableParameterType type); NativeQueryImplementor<R> setParameterList(String name, Collection values, AllowableParameterType type);
//
@Override // @Override
default NativeQueryImplementor<R> setParameterList(String name, Object[] values, Type type) { // default NativeQueryImplementor<R> setParameterList(String name, Object[] values, Type type) {
return setParameterList( name, values, (AllowableParameterType) type ); // return setParameterList( name, values, (AllowableParameterType) type );
} // }
@Override @Override
NativeQueryImplementor<R> setParameterList(String name, Object[] values, AllowableParameterType type); NativeQueryImplementor<R> setParameterList(String name, Object[] values, AllowableParameterType type);
@ -312,14 +311,14 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
@Override @Override
NativeQueryImplementor<R> setParameterList(int position, Collection values, Class type); NativeQueryImplementor<R> setParameterList(int position, Collection values, Class type);
@Override // @Override
NativeQueryImplementor<R> setParameterList(int position, Collection values, Type type); // NativeQueryImplementor<R> setParameterList(int position, Collection values, Type type);
@Override @Override
NativeQueryImplementor<R> setParameterList(int position, Collection values, AllowableParameterType type); NativeQueryImplementor<R> setParameterList(int position, Collection values, AllowableParameterType type);
@Override // @Override
NativeQueryImplementor<R> setParameterList(int position, Object[] values, Type type); // NativeQueryImplementor<R> setParameterList(int position, Object[] values, Type type);
@Override @Override
NativeQueryImplementor<R> setParameterList(int position, Object[] values, AllowableParameterType type); NativeQueryImplementor<R> setParameterList(int position, Object[] values, AllowableParameterType type);

View File

@ -149,28 +149,6 @@ public class NativeSQLQueriesTest extends BaseCoreFunctionalTestCase {
s.close(); s.close();
} }
} }
@Test
public void testRegisteredNamedSQLQueryWithScalar()
{
final NamedNativeQueryMementoBuilder builder = new NamedNativeQueryMementoBuilder();
builder.setName("namedQuery");
builder.setQuery("select count(*) AS c from ORGANIZATION");
builder.setQueryReturns(new NativeSQLQueryReturn[1]);
sessionFactory().registerNamedSQLQueryDefinition("namedQuery", builder.createNamedQueryDefinition());
final Session s = openSession();
s.beginTransaction();
final NativeQuery query = (NativeQuery) s.getNamedQuery("namedQuery");
query.addScalar("c");
final Number result = (Number) query.uniqueResult();
s.getTransaction().commit();
s.close();
assertNotNull(result);
assertTrue(0 == result.intValue());
}
@Test @Test
public void testManualSynchronization() { public void testManualSynchronization() {

View File

@ -0,0 +1,56 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.test.sql.hand.query;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn;
import org.hibernate.query.NativeQuery;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* @author Andrea Boriero
*/
public class NamedNativeQueryMementoBuilderTest extends BaseCoreFunctionalTestCase {
public String[] getMappings() {
return new String[] { "sql/hand/query/NativeSQLQueries.hbm.xml" };
}
@Override
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
}
@Test
public void testRegisteredNamedSQLQueryWithScalar()
{
final NamedNativeQueryMementoBuilder builder = new NamedNativeQueryMementoBuilder();
builder.setName("namedQuery");
builder.setQuery("select count(*) AS c from ORGANIZATION");
builder.setQueryReturns(new NativeSQLQueryReturn[1]);
sessionFactory().registerNamedSQLQueryDefinition("namedQuery", builder.createNamedQueryDefinition());
final Session s = openSession();
s.beginTransaction();
final NativeQuery query = (NativeQuery) s.getNamedQuery( "namedQuery");
query.addScalar("c");
final Number result = (Number) query.uniqueResult();
s.getTransaction().commit();
s.close();
assertNotNull(result);
assertTrue(0 == result.intValue());
}
}