Package org.hibernate.transform

Examples of org.hibernate.transform.ResultTransformer


  protected String[] getResultRowAliases() {
    return queryReturnAliases;
  }
 
  protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer) {
    final ResultTransformer implicitResultTransformer = aggregatedSelectExpression == null
        ? null
        : aggregatedSelectExpression.getResultTransformer();
    return HolderInstantiator.resolveResultTransformer( implicitResultTransformer, resultTransformer );
  }
View Full Code Here


      return results;
    }
  }

  private HolderInstantiator buildHolderInstantiator(ResultTransformer queryLocalResultTransformer) {
    final ResultTransformer implicitResultTransformer = aggregatedSelectExpression == null
        ? null
        : aggregatedSelectExpression.getResultTransformer();
    return HolderInstantiator.getHolderInstantiator(
        implicitResultTransformer,
        queryLocalResultTransformer,
View Full Code Here

  @SuppressWarnings("unchecked")
  protected Pagination findByCriteria(Criteria crit, int pageNo, int pageSize) {
    CriteriaImpl impl = (CriteriaImpl) crit;
    // 先把Projection、ResultTransformer、OrderBy取出来,清空三者后再执行Count操作
    Projection projection = impl.getProjection();
    ResultTransformer transformer = impl.getResultTransformer();
    List<CriteriaImpl.OrderEntry> orderEntries;
    try {
      orderEntries = (List) MyBeanUtils
          .getFieldValue(impl, ORDER_ENTRIES);
      MyBeanUtils.setFieldValue(impl, ORDER_ENTRIES, new ArrayList());
View Full Code Here

          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
View Full Code Here

  private boolean hasSelectNew() {
    return aggregatedSelectExpression != null &&  aggregatedSelectExpression.getResultTransformer() != null;
  }

  protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer) {
    final ResultTransformer implicitResultTransformer = aggregatedSelectExpression == null
        ? null
        : aggregatedSelectExpression.getResultTransformer();
    return HolderInstantiator.resolveResultTransformer( implicitResultTransformer, resultTransformer );
  }
View Full Code Here

      return results;
    }
  }

  private HolderInstantiator buildHolderInstantiator(ResultTransformer queryLocalResultTransformer) {
    final ResultTransformer implicitResultTransformer = aggregatedSelectExpression == null
        ? null
        : aggregatedSelectExpression.getResultTransformer();
    return HolderInstantiator.getHolderInstantiator(
        implicitResultTransformer,
        queryLocalResultTransformer,
View Full Code Here

          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
View Full Code Here

    }

    @Override
    public boolean transform(Query query, FactoryExpression<?> projection) {
        if (query instanceof HibernateQuery) {
            ResultTransformer transformer = new FactoryExpressionTransformer(projection);
            ((HibernateQuery)query).getHibernateQuery().setResultTransformer(transformer);
            return true;
        } else {
            return false;
        }
View Full Code Here

  protected long countCriteriaResult(final Criteria c) {
    CriteriaImpl impl = (CriteriaImpl) c;

    // 先把Projection、ResultTransformer、OrderBy取出来,清空三者后再执行Count操作
    Projection projection = impl.getProjection();
    ResultTransformer transformer = impl.getResultTransformer();

    List<CriteriaImpl.OrderEntry> orderEntries = null;
    try {
      orderEntries = (List) ReflectionUtils.getFieldValue(impl, "orderEntries");
      ReflectionUtils.setFieldValue(impl, "orderEntries", new ArrayList());
View Full Code Here

  protected int countCriteriaResult(final Criteria c) {
    CriteriaImpl impl = (CriteriaImpl) c;

    // 先把Projection、ResultTransformer、OrderBy取出来,清空三者后再执行Count操作
    Projection projection = impl.getProjection();
    ResultTransformer transformer = impl.getResultTransformer();

    List<CriteriaImpl.OrderEntry> orderEntries = null;
    try {
      orderEntries = (List) ReflectionUtils.getFieldValue(impl,
          "orderEntries");
View Full Code Here

TOP

Related Classes of org.hibernate.transform.ResultTransformer

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.