use of jooq.steve.db.tables.records.ChargeBoxRecord in project steve by RWTH-i5-IDSG.
the class ChargePointRepositoryImpl method getDetails.
@Override
public ChargePoint.Details getDetails(int chargeBoxPk) {
ChargeBoxRecord cbr = ctx.selectFrom(CHARGE_BOX).where(CHARGE_BOX.CHARGE_BOX_PK.equal(chargeBoxPk)).fetchOne();
if (cbr == null) {
throw new SteveException("Charge point not found");
}
AddressRecord ar = addressRepository.get(ctx, cbr.getAddressPk());
return new ChargePoint.Details(cbr, ar);
}
Aggregations