org.jooq.TableField.eq()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中org.jooq.TableField.eq()方法的一些代码示例,展示了TableField.eq()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableField.eq()方法的具体详情如下:
包路径:org.jooq.TableField
类名称:TableField
方法名:eq

TableField.eq介绍

暂无

代码示例

代码示例来源:origin: rancher/cattle

@Override
public List<? extends StoragePool> findExternalActivePools() {
  return create()
      .selectFrom(STORAGE_POOL)
      .where(
          STORAGE_POOL.EXTERNAL.eq(true)
          .and(STORAGE_POOL.STATE.eq(CommonStatesConstants.ACTIVE))
          ).fetch();
}

代码示例来源:origin: rancher/cattle

@Override
public Service getServiceByExternalId(Long accountId, String externalId) {
  return create().selectFrom(SERVICE)
      .where(SERVICE.ACCOUNT_ID.eq(accountId))
      .and(SERVICE.REMOVED.isNull())
      .and(SERVICE.EXTERNAL_ID.eq(externalId))
      .fetchAny();
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Service> findServicesFor(Instance instance) {
  return create().select(SERVICE.fields())
      .from(SERVICE)
      .join(SERVICE_EXPOSE_MAP)
      .on(SERVICE_EXPOSE_MAP.SERVICE_ID.eq(SERVICE.ID))
      .where(SERVICE_EXPOSE_MAP.INSTANCE_ID.eq(instance.getId()))
      .fetchInto(ServiceRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public Account getAccountByExternalId(String externalId, String externalType) {
  return create()
      .selectFrom(ACCOUNT)
      .where(
          ACCOUNT.EXTERNAL_ID.eq(externalId)
              .and(ACCOUNT.EXTERNAL_ID_TYPE.eq(externalType))
              .and(ACCOUNT.STATE.ne("purged"))
      ).orderBy(ACCOUNT.ID.asc()).fetchOne();
}

代码示例来源:origin: rancher/cattle

protected String get(String name) {
  return create()
      .select(DATA.VALUE)
      .from(DATA)
      .where(DATA.NAME.eq(name))
      .fetchOne(DATA.VALUE);
}

代码示例来源:origin: rancher/cattle

@Override
public String getPublicCA() {
  Record1<String> r = create().select(CERTIFICATE.CERT_CHAIN)
      .from(CERTIFICATE)
      .join(ACCOUNT)
        .on(ACCOUNT.ID.eq(CERTIFICATE.ACCOUNT_ID))
      .where(CERTIFICATE.STATE.eq(CommonStatesConstants.ACTIVE)
          .and(ACCOUNT.UUID.like("system-ha-%")))
      .fetchAny();
  return r == null ? null : r.value1();
}

代码示例来源:origin: rancher/cattle

@Override
public void setIfOlder(Client client, String itemName, Long version) {
  create()
    .update(CONFIG_ITEM_STATUS)
      .set(CONFIG_ITEM_STATUS.REQUESTED_VERSION, version)
      .set(CONFIG_ITEM_STATUS.REQUESTED_UPDATED, new Timestamp(System.currentTimeMillis()))
    .where(
        CONFIG_ITEM_STATUS.REQUESTED_VERSION.lt(version)
        .and(CONFIG_ITEM_STATUS.NAME.eq(itemName))
        .and(targetObjectCondition(client))).execute();
}

代码示例来源:origin: rancher/cattle

@Override
public boolean isAssigned(Client client, String itemName) {
  ConfigItemStatus status = create()
      .selectFrom(CONFIG_ITEM_STATUS)
      .where(
          CONFIG_ITEM_STATUS.NAME.eq(itemName)
          .and(targetObjectCondition(client)))
      .fetchAny();
  return status != null;
}

代码示例来源:origin: rancher/cattle

@Override
public Agent getAgentByUri(String uri) {
  return create()
      .selectFrom(AGENT)
      .where(AGENT.URI.eq(uri)
          .and(AGENT.REMOVED.isNull()))
      .fetchAny();
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends ProjectMember> findBadProjectMembers(int count) {
  return create().select(PROJECT_MEMBER.fields())
      .from(PROJECT_MEMBER)
      .join(ACCOUNT)
        .on(ACCOUNT.ID.eq(PROJECT_MEMBER.PROJECT_ID))
      .where(ACCOUNT.STATE.eq(CommonStatesConstants.PURGED)
          .and(PROJECT_MEMBER.REMOVED.isNull())
          .and(PROJECT_MEMBER.STATE.notIn(CommonStatesConstants.DEACTIVATING, CommonStatesConstants.REMOVING)))
      .limit(count)
      .fetchInto(ProjectMemberRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Volume> findBadVolumes(int count) {
  return create().select(VOLUME.fields())
      .from(VOLUME)
      .join(ACCOUNT)
        .on(ACCOUNT.ID.eq(VOLUME.ACCOUNT_ID))
      .where(VOLUME.REMOVED.isNull()
          .and(ACCOUNT.STATE.eq(CommonStatesConstants.PURGED))
          .and(VOLUME.STATE.notIn(CommonStatesConstants.DEACTIVATING, CommonStatesConstants.REMOVING)))
      .limit(count)
      .fetchInto(VolumeRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Network> findBadNetworks(int count) {
  return create().select(NETWORK.fields())
      .from(NETWORK)
      .join(ACCOUNT)
        .on(ACCOUNT.ID.eq(NETWORK.ACCOUNT_ID))
      .where(NETWORK.REMOVED.isNull()
          .and(ACCOUNT.STATE.eq(CommonStatesConstants.PURGED))
          .and(NETWORK.STATE.notIn(CommonStatesConstants.REMOVING)))
      .limit(count)
      .fetchInto(NetworkRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends UserPreference> findBadUserPreference(int count) {
  return create().select(USER_PREFERENCE.fields())
      .from(USER_PREFERENCE)
      .join(ACCOUNT)
        .on(ACCOUNT.ID.eq(USER_PREFERENCE.ACCOUNT_ID))
      .where(USER_PREFERENCE.REMOVED.isNull()
          .and(ACCOUNT.STATE.eq(CommonStatesConstants.PURGED))
          .and(USER_PREFERENCE.STATE.notIn(CommonStatesConstants.REMOVING, CommonStatesConstants.DEACTIVATING)))
      .limit(count)
      .fetchInto(UserPreferenceRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public Long getRequestedVersion(Client client, String itemName) {
  return create()
      .select(CONFIG_ITEM_STATUS.REQUESTED_VERSION)
      .from(CONFIG_ITEM_STATUS)
      .where(
          CONFIG_ITEM_STATUS.NAME.eq(itemName)
          .and(targetObjectCondition(client)))
      .fetchOneInto(Long.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Host> getNonPurgedHosts(long accountId) {
  return create()
      .select(HOST.fields())
      .from(HOST)
      .where(HOST.ACCOUNT_ID.eq(accountId)
      .and(HOST.STATE.notEqual(CommonStatesConstants.PURGED)))
      .fetchInto(Host.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Host> getHosts(Long accountId, List<String> uuids) {
  return create()
    .selectFrom(HOST)
    .where(HOST.ACCOUNT_ID.eq(accountId)
    .and(HOST.STATE.notIn(CommonStatesConstants.REMOVED, CommonStatesConstants.REMOVING))
    .and(HOST.UUID.in(uuids))).fetch();
}

代码示例来源:origin: rancher/cattle

@Override
public Account getAccountById(Long id) {
  return create()
      .selectFrom(ACCOUNT)
      .where(
          ACCOUNT.ID.eq(id)
              .and(ACCOUNT.STATE.ne(CommonStatesConstants.PURGED))
              .and(ACCOUNT.REMOVED.isNull())
      ).fetchOne();
}

代码示例来源:origin: rancher/cattle

@Override
public Map<String, Host> getHosts(long agentId) {
  List<? extends Host> hostList = create()
      .select(HOST.fields())
      .from(HOST)
      .where(
          HOST.AGENT_ID.eq(agentId)
          .and(HOST.REMOVED.isNull()))
          .fetchInto(HostRecord.class);
  return groupByReportedUUid(hostList);
}

代码示例来源:origin: rancher/cattle

@Override
public Account getAccountByUuid(String uuid) {
  return create()
      .selectFrom(ACCOUNT)
      .where(ACCOUNT.UUID.eq(uuid)
          .and(ACCOUNT.STATE.in(getActiveStates())))
      .orderBy(ACCOUNT.ID.asc()).limit(1).fetchOne();
}

代码示例来源:origin: rancher/cattle

@Override
public List<? extends Service> getSkipServices(long accountId) {
  return create()
      .select(SERVICE.fields())
      .from(SERVICE)
      .where(SERVICE.ACCOUNT_ID.eq(accountId)
          .and(SERVICE.REMOVED.isNull())
          .and(SERVICE.SKIP.isTrue()))
      .fetchInto(ServiceRecord.class);
}

相关文章