Package com.caucho.amber.cfg

Examples of com.caucho.amber.cfg.EntityResultConfig


  public Query createNativeQuery(String sql, Class type)
  {
    SqlResultSetMappingConfig resultSet
      = new SqlResultSetMappingConfig();

    EntityResultConfig entityResult
      = new EntityResultConfig();

    entityResult.setEntityClass(type.getName());

    resultSet.addEntityResult(entityResult);

    return createInternalNativeQuery(sql, resultSet);
  }
View Full Code Here


      _currEntityResult = 0;
    }

    _currEntityResult++;

    EntityResultConfig entityResult = entityResults.get(oldEntityResult);

    String className = entityResult.getEntityClass();

    EntityType entityType = _aConn.getPersistenceUnit().getEntityType(className);

    if (entityType == null)
      throw new IllegalStateException(L.l("Unable to locate entity '{0}' for native query.", className));

    int oldIndex = _currIndex;

    // jpa/0y15 _currIndex++;

    /* jpa/0y14
    EntityItem item = entityType.getHome().findItem(_aConn, rs, oldIndex);

    if (item == null)
      return null;

    Entity entity = item.getEntity();
    */

    int keyLength = entityType.getId().getKeyCount();

    ArrayList<FieldResultConfig> fieldResults
      = entityResult.getFieldResults();

    Entity entity = null;

    int consumed = 0;

View Full Code Here

      _currEntityResult = 0;
    }

    _currEntityResult++;

    EntityResultConfig entityResult = entityResults.get(oldEntityResult);

    String className = entityResult.getEntityClass();

    EntityType entityType = _aConn.getPersistenceUnit().getEntityType(className);

    if (entityType == null)
      throw new IllegalStateException(L.l("Unable to locate entity '{0}' for native query.", className));

    int oldIndex = _currIndex;

    // jpa/0y15 _currIndex++;

    /* jpa/0y14
    EntityItem item = entityType.getHome().findItem(_aConn, rs, oldIndex);

    if (item == null)
      return null;

    Entity entity = item.getEntity();
    */

    int keyLength = entityType.getId().getKeyCount();

    ArrayList<FieldResultConfig> fieldResults
      = entityResult.getFieldResults();

    Entity entity = null;

    int consumed = 0;

View Full Code Here

  public Query createNativeQuery(String sql, Class type)
  {
    SqlResultSetMappingConfig resultSet
      = new SqlResultSetMappingConfig();

    EntityResultConfig entityResult
      = new EntityResultConfig();

    entityResult.setEntityClass(type.getName());

    resultSet.addEntityResult(entityResult);

    return createInternalNativeQuery(sql, resultSet);
  }
View Full Code Here

TOP

Related Classes of com.caucho.amber.cfg.EntityResultConfig

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.