Package railo.runtime.orm.hibernate

Examples of railo.runtime.orm.hibernate.HibernateORMEngine


  @Override
  public final Object instantiate() {
    try {
      PageContext pc = CommonUtil.pc();
      HibernateORMSession session=HibernateUtil.getORMSession(pc,true);
      HibernateORMEngine engine=(HibernateORMEngine) session.getEngine();
      Component c = engine.create(pc, session, entityName, true);
      CommonUtil.setEntity(c,true);
      return c;//new CFCProxy(c);
    }
    catch (PageException pe) {
      throw new HibernatePageException(pe);
View Full Code Here


 
  @Override
  public Object get(Object trg) throws HibernateException {
    try {
      // MUST cache this, perhaps when building xml
      HibernateORMEngine engine = getHibernateORMEngine();
      PageContext pc = CommonUtil.pc();
      Component cfc = CommonUtil.toComponent(trg);
      String name = HibernateCaster.getEntityName(cfc);
      ClassMetadata metaData = engine.getSessionFactory(pc).getClassMetadata(name);
      Type type = HibernateUtil.getPropertyType(metaData, key.getString());

      Object rtn = cfc.getComponentScope().get(key,null);
      return HibernateCaster.toSQL(type, rtn,null);
    }
View Full Code Here

TOP

Related Classes of railo.runtime.orm.hibernate.HibernateORMEngine

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.