public ScrollableResultsImpl( ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, Class holderClass) throws MappingException { this.rs=rs; this.ps=ps; this.sess = sess; this.loader = loader; this.queryParameters = queryParameters; this.types = types; if (holderClass != null) { holderConstructor = ReflectHelper.getConstructor(holderClass, types); } }
if ( holderClass != null ) holderConstructor = ReflectHelper.getConstructor( holderClass, returnTypes );
if ( holderClass != null ) holderConstructor = ReflectHelper.getConstructor( holderClass, returnTypes );
private Constructor resolveConstructor(String path) throws SemanticException { String importedClassName = getSessionFactoryHelper().getImportedClassName( path ); String className = StringHelper.isEmpty( importedClassName ) ? path : importedClassName; if ( className == null ) { throw new SemanticException( "Unable to locate class [" + path + "]" ); } try { Class holderClass = ReflectHelper.classForName( className ); return ReflectHelper.getConstructor( holderClass, constructorArgumentTypes ); } catch ( ClassNotFoundException e ) { throw new DetailedSemanticException( "Unable to locate class [" + className + "]", e ); } catch ( PropertyNotFoundException e ) { // this is the exception returned by ReflectHelper.getConstructor() if it cannot // locate an appropriate constructor throw new DetailedSemanticException( "Unable to locate appropriate constructor on class [" + className + "]", e ); } }
private Constructor resolveConstructor(String path) throws SemanticException { String importedClassName = getSessionFactoryHelper().getImportedClassName( path ); String className = StringHelper.isEmpty( importedClassName ) ? path : importedClassName; if ( className == null ) { throw new SemanticException( "Unable to locate class [" + path + "]" ); } try { Class holderClass = ReflectHelper.classForName( className ); return ReflectHelper.getConstructor( holderClass, constructorArgumentTypes ); } catch ( ClassNotFoundException e ) { throw new DetailedSemanticException( "Unable to locate class [" + className + "]", e ); } catch ( PropertyNotFoundException e ) { // this is the exception returned by ReflectHelper.getConstructor() if it cannot // locate an appropriate constructor throw new DetailedSemanticException( "Unable to locate appropriate constructor on class [" + className + "]", e ); } }