List of usage examples for org.hibernate.internal.util ReflectHelper classForName
public static Class classForName(String name, Class caller) throws ClassNotFoundException
From source file:com.namphibian.pgdilato.PostgresqlUserDefinedArrayType.java
@Override public void setParameterValues(Properties params) { String classTypeName = params.getProperty(CLASS_TYPE); try {/* www . j av a 2 s .c o m*/ this.classType = ReflectHelper.classForName(classTypeName, this.getClass()); } catch (ClassNotFoundException cnfe) { throw new HibernateException("classType not found", cnfe); } String converterTypeName = params.getProperty(CONVERTER_TYPE); try { try { converter = (PgStructToClassInterface) ReflectHelper .classForName(converterTypeName, this.getClass()).newInstance(); //this.classType = ReflectHelper.classForName(classTypeName, this.getClass()); } catch (InstantiationException ex) { Logger.getLogger(PostgresqlUserDefinedArrayType.class.getName()).log(Level.SEVERE, null, ex); throw new HibernateException(ex.getMessage()); } catch (IllegalAccessException ex) { Logger.getLogger(PostgresqlUserDefinedArrayType.class.getName()).log(Level.SEVERE, null, ex); throw new HibernateException(ex.getMessage()); } } catch (ClassNotFoundException cnfe) { throw new HibernateException("classType not found", cnfe); } this.sqlType = Types.OTHER; this.pgsqlType = params.getProperty(PGSQL_TYPE); }
From source file:com.namphibian.pgdilato.PostgresqlUserDefinedType.java
@Override public void setParameterValues(Properties params) { String classTypeName = params.getProperty(CLASS_TYPE); try {//from www. j a v a 2 s.co m this.classType = ReflectHelper.classForName(classTypeName, this.getClass()); } catch (ClassNotFoundException cnfe) { throw new HibernateException("classType not found", cnfe); } this.sqlType = Types.JAVA_OBJECT; this.pgsqlType = params.getProperty(PGSQL_TYPE); }