Package com.opengamma.util.db

Examples of com.opengamma.util.db.HibernateMappingFiles


    try {
      hibernateMappingFilesClass = getClass().getClassLoader().loadClass(hibernateMappingFilesClassName);
    } catch (ClassNotFoundException e) {
      throw new OpenGammaRuntimeException("Could not find Hibernate mapping files implementation " + hibernateMappingFilesClassName, e);
    }
    HibernateMappingFiles hibernateMappingFiles;
    try {
      hibernateMappingFiles = (HibernateMappingFiles) hibernateMappingFilesClass.newInstance();
    } catch (InstantiationException e) {
      throw new OpenGammaRuntimeException("Could not instantiate Hibernate mapping files implementation " + hibernateMappingFilesClassName, e);
    } catch (IllegalAccessException e) {
      throw new OpenGammaRuntimeException("Could not access Hibernate mapping files implementation " + hibernateMappingFilesClassName, e);
    }
    Set<String> config = new HashSet<String>();
    for (Class<?> cls : hibernateMappingFiles.getHibernateMappingFiles()) {
      String hbm = cls.getName().replace('.', '/') + ".hbm.xml";
      config.add(hbm);
    }
    return (String[]) config.toArray(new String[config.size()]);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.util.db.HibernateMappingFiles

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.