Package org.hibernate.transform

Examples of org.hibernate.transform.AliasToBeanConstructorResultTransformer


            Projections.projectionList()
                .add( Property.forName( "s.studentNumber" ).as( "studentNumber" ))
                .add( Property.forName( "s.name" ).as( "name" ))
        )
        .addOrder( Order.asc( "s.studentNumber" ) )
        .setResultTransformer( new AliasToBeanConstructorResultTransformer( getConstructor() ) );
      }
      private Constructor getConstructor() throws NoSuchMethodException {
        return  Student.class.getConstructor( long.class, String.class );
      }
    };
View Full Code Here


            Projections.projectionList()
                .add( Projections.sqlProjection( "555 as studentNumber", new String[]{ "studentNumber" }, new Type[] { Hibernate.LONG } ) )
                .add( Property.forName( "s.name" ).as( "name" ) )
        )
        .addOrder( Order.asc( "s.studentNumber" ) )
        .setResultTransformer( new AliasToBeanConstructorResultTransformer( getConstructor() ) );
      }
      private Constructor getConstructor() throws NoSuchMethodException {
        return Student.class.getConstructor( long.class, String.class );
      }
    };
View Full Code Here

            Projections.projectionList()
                .add( Property.forName( "s.studentNumber" ).as( "studentNumber" ) )
                .add( Property.forName( "s.name" ).as( "name" ) )
        )
        .addOrder( Order.asc( "s.studentNumber" ) )
        .setResultTransformer( new AliasToBeanConstructorResultTransformer( getConstructor() ) );
      }
      private Constructor getConstructor() {
        Type studentNametype =
            ( ( SessionFactoryImpl ) getSessions() )
                .getEntityPersister( Student.class.getName() )
View Full Code Here

TOP

Related Classes of org.hibernate.transform.AliasToBeanConstructorResultTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.