Search in sources :

Example 6 with NativeSQLQueryScalarReturn

use of org.hibernate.engine.query.spi.sql.NativeSQLQueryScalarReturn in project hibernate-orm by hibernate.

the class NativeSQLQueryReturnEqualsAndHashCodeTest method testNativeSQLQueryReturnTypes.

@Test
public void testNativeSQLQueryReturnTypes() {
    NativeSQLQueryScalarReturn r1 = new NativeSQLQueryScalarReturn("a", sessionFactory().getTypeResolver().basic("int"));
    NativeSQLQueryRootReturn r2 = new NativeSQLQueryRootReturn("a", "b", LockMode.NONE);
    NativeSQLQueryJoinReturn r3 = new NativeSQLQueryJoinReturn("a", "b", "c", Collections.singletonMap("key", "value"), LockMode.NONE);
    NativeSQLQueryCollectionReturn r4 = new NativeSQLQueryCollectionReturn("a", "b", "c", Collections.singletonMap("key", "value"), LockMode.NONE);
    check(false, r1, r2);
    check(false, r1, r3);
    check(false, r1, r4);
    check(false, r2, r3);
    check(false, r2, r4);
    check(false, r3, r4);
}
Also used : NativeSQLQueryCollectionReturn(org.hibernate.engine.query.spi.sql.NativeSQLQueryCollectionReturn) NativeSQLQueryRootReturn(org.hibernate.engine.query.spi.sql.NativeSQLQueryRootReturn) NativeSQLQueryJoinReturn(org.hibernate.engine.query.spi.sql.NativeSQLQueryJoinReturn) NativeSQLQueryScalarReturn(org.hibernate.engine.query.spi.sql.NativeSQLQueryScalarReturn) Test(org.junit.Test)

Aggregations

NativeSQLQueryScalarReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryScalarReturn)6 NativeSQLQueryConstructorReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryConstructorReturn)3 NativeSQLQueryRootReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryRootReturn)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 NativeSQLQueryCollectionReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryCollectionReturn)2 NativeSQLQueryJoinReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryJoinReturn)2 NativeSQLQueryReturn (org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 ColumnResult (javax.persistence.ColumnResult)1 ConstructorResult (javax.persistence.ConstructorResult)1 EntityResult (javax.persistence.EntityResult)1 FieldResult (javax.persistence.FieldResult)1 MappingException (org.hibernate.MappingException)1 MappingException (org.hibernate.boot.MappingException)1 JaxbHbmNativeQueryCollectionLoadReturnType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmNativeQueryCollectionLoadReturnType)1 JaxbHbmNativeQueryJoinReturnType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmNativeQueryJoinReturnType)1