本文整理匯總了Java中org.jooq.Record1.value1方法的典型用法代碼示例。如果您正苦於以下問題:Java Record1.value1方法的具體用法?Java Record1.value1怎麽用?Java Record1.value1使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jooq.Record1
的用法示例。
在下文中一共展示了Record1.value1方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isRegistered
import org.jooq.Record1; //導入方法依賴的package包/類
@Override
public boolean isRegistered(String chargeBoxId) {
Record1<Integer> r = ctx.selectOne()
.from(CHARGE_BOX)
.where(CHARGE_BOX.CHARGE_BOX_ID.eq(chargeBoxId))
.fetchOne();
return (r != null) && (r.value1() == 1);
}
示例2: getOcppTagOfActiveTransaction
import org.jooq.Record1; //導入方法依賴的package包/類
@Override
public String getOcppTagOfActiveTransaction(int transactionPK) {
Record1<String> record = ctx.select(TRANSACTION.ID_TAG)
.from(TRANSACTION)
.where(TRANSACTION.TRANSACTION_PK.eq(transactionPK))
.and(TRANSACTION.STOP_TIMESTAMP.isNull())
.and(TRANSACTION.STOP_VALUE.isNull())
.fetchOne();
if (record == null) {
return null;
}
return record.value1();
}
示例3: isPosted
import org.jooq.Record1; //導入方法依賴的package包/類
@Override
public boolean isPosted(String chargeBoxIdentity) {
Record1<DateTime> dt = ctx.select(PS_CHARGEBOX.POST_TIMESTAMP)
.from(PS_CHARGEBOX)
.join(CHARGE_BOX).on(CHARGE_BOX.CHARGE_BOX_PK.eq(PS_CHARGEBOX.CHARGE_BOX_PK))
.where(CHARGE_BOX.CHARGE_BOX_ID.eq(chargeBoxIdentity))
.fetchOne();
return dt != null && dt.value1() != null;
}
示例4: getConnectorPkFromTransactionPk
import org.jooq.Record1; //導入方法依賴的package包/類
@Override
public int getConnectorPkFromTransactionPk(int transactionPK) {
Record1<Integer> recordId = ctx.select(CONNECTOR.CONNECTOR_PK)
.from(CONNECTOR)
.join(TRANSACTION)
.on(CONNECTOR.CONNECTOR_PK.eq(TRANSACTION.CONNECTOR_PK))
.where(TRANSACTION.TRANSACTION_PK.eq(transactionPK))
.fetchOne();
if (recordId == null) {
throw new SteveException("No such PK for given transactionPK : %s", transactionPK);
}
return recordId.value1();
}
示例5: getDetails
import org.jooq.Record1; //導入方法依賴的package包/類
@Override
public User.Details getDetails(int userPk) {
// -------------------------------------------------------------------------
// 1. user table
// -------------------------------------------------------------------------
UserRecord ur = ctx.selectFrom(USER)
.where(USER.USER_PK.equal(userPk))
.fetchOne();
if (ur == null) {
throw new SteveException("There is no user with id '%s'", userPk);
}
// -------------------------------------------------------------------------
// 2. address table
// -------------------------------------------------------------------------
AddressRecord ar = addressRepository.get(ctx, ur.getAddressPk());
// -------------------------------------------------------------------------
// 3. ocpp_tag table
// -------------------------------------------------------------------------
String ocppIdTag = null;
if (ur.getOcppTagPk() != null) {
Record1<String> record = ctx.select(OCPP_TAG.ID_TAG)
.from(OCPP_TAG)
.where(OCPP_TAG.OCPP_TAG_PK.eq(ur.getOcppTagPk()))
.fetchOne();
if (record != null) {
ocppIdTag = record.value1();
}
}
return User.Details.builder()
.userRecord(ur)
.address(ar)
.ocppIdTag(Optional.ofNullable(ocppIdTag))
.build();
}