All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeaninternal.server.dto.DtoQueryPlanConPlus Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebeaninternal.server.dto;

import io.ebeaninternal.server.type.DataReader;

import java.sql.SQLException;

/**
 * Plan based on Constructor plus some setter methods.
 */
class DtoQueryPlanConPlus extends DtoQueryPlanBase {

  private final DtoMetaConstructor maxArgConstructor;

  private final DtoReadSet[] setterProps;

  DtoQueryPlanConPlus(DtoMappingRequest request, DtoMetaConstructor maxArgConstructor, DtoReadSet[] setterProps) {
    super(request);
    this.maxArgConstructor = maxArgConstructor;
    this.setterProps = setterProps;
  }

  @Override
  public Object readRow(DataReader dataReader) throws SQLException {

    Object bean = maxArgConstructor.process(dataReader);
    for (DtoReadSet setterProp : setterProps) {
      setterProp.readSet(bean, dataReader);
    }
    return bean;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy