Java 类org.jooq.TableLike 实例源码

项目:AdvancedDataProfilingSeminar    文件:JooqAdapter.java   
static Collection<? extends TableLike<?>> tables(final ColumnPermutation... columns) {
  return Arrays.stream(columns)
      .flatMap(columnPermutation -> columnPermutation.getColumnIdentifiers().stream())
      .map(ColumnIdentifier::getTableIdentifier)
      .distinct()
      .map(DSL::name).map(DSL::table)
      .collect(toList());
}
项目:steve-plugsurfing    文件:ChargePointRepositoryImpl.java   
@Override
public List<ConnectorStatus> getChargePointConnectorStatus() {
    // Prepare for the inner select of the second join
    Field<Integer> t1Pk = CONNECTOR_STATUS.CONNECTOR_PK.as("t1_pk");
    Field<DateTime> t1Max = DSL.max(CONNECTOR_STATUS.STATUS_TIMESTAMP).as("t1_max");
    TableLike<?> t1 = ctx.select(t1Pk, t1Max)
                         .from(CONNECTOR_STATUS)
                         .groupBy(CONNECTOR_STATUS.CONNECTOR_PK)
                         .asTable("t1");

    return ctx.select(CHARGE_BOX.CHARGE_BOX_PK,
                      CONNECTOR.CHARGE_BOX_ID,
                      CONNECTOR.CONNECTOR_ID,
                      CONNECTOR_STATUS.STATUS_TIMESTAMP,
                      CONNECTOR_STATUS.STATUS,
                      CONNECTOR_STATUS.ERROR_CODE)
              .from(CONNECTOR_STATUS)
              .join(CONNECTOR)
                    .onKey()
              .join(CHARGE_BOX)
                    .on(CHARGE_BOX.CHARGE_BOX_ID.eq(CONNECTOR.CHARGE_BOX_ID))
              .join(t1)
                    .on(CONNECTOR_STATUS.CONNECTOR_PK.equal(t1.field(t1Pk)))
                    .and(CONNECTOR_STATUS.STATUS_TIMESTAMP.equal(t1.field(t1Max)))
              .orderBy(CONNECTOR_STATUS.STATUS_TIMESTAMP.desc())
              .fetch()
              .map(r -> ConnectorStatus.builder()
                                       .chargeBoxPk(r.value1())
                                       .chargeBoxId(r.value2())
                                       .connectorId(r.value3())
                                       .timeStamp(DateTimeUtils.humanize(r.value4()))
                                       .statusTimestamp(r.value4())
                                       .status(r.value5())
                                       .errorCode(r.value6())
                                       .build()
              );
}
项目:steve-plugsurfing    文件:ConnectorRepositoryImpl.java   
/**
 * A customized version of {@link ChargePointRepositoryImpl#getChargePointConnectorStatus()}
 * for this specific use case.
 */
@Override
public List<ConnectorPostStatus> getChargePointConnectorStatus(String chargeBoxId) {
    // Prepare for the inner select of the second join
    Field<Integer> t1Pk = CONNECTOR_STATUS.CONNECTOR_PK.as("t1_pk");
    Field<DateTime> t1Max = DSL.max(CONNECTOR_STATUS.STATUS_TIMESTAMP).as("t1_max");
    TableLike<?> t1 = ctx.select(t1Pk, t1Max)
                         .from(CONNECTOR_STATUS)
                         .groupBy(CONNECTOR_STATUS.CONNECTOR_PK)
                         .asTable("t1");

    return ctx.select(CONNECTOR.CONNECTOR_PK,
                      CONNECTOR_STATUS.STATUS)
              .from(CONNECTOR_STATUS)
              .join(CONNECTOR)
                .onKey()
              .join(CHARGE_BOX)
                .on(CHARGE_BOX.CHARGE_BOX_ID.eq(CONNECTOR.CHARGE_BOX_ID))
              .join(PS_CHARGEBOX)
                .on(PS_CHARGEBOX.CHARGE_BOX_PK.eq(CHARGE_BOX.CHARGE_BOX_PK))
              .join(t1)
                .on(CONNECTOR_STATUS.CONNECTOR_PK.equal(t1.field(t1Pk)))
                .and(CONNECTOR_STATUS.STATUS_TIMESTAMP.equal(t1.field(t1Max)))
              .where(CONNECTOR.CONNECTOR_ID.notEqual(0))
              .and(CHARGE_BOX.CHARGE_BOX_ID.eq(chargeBoxId))
              .fetch()
              .map(r -> buildStatus(r.value1(), r.value2()));
}
项目:httpQL    文件:SelectBuilder.java   
public SelectBuilder<T> withJoinCondition(TableLike<?> table, Condition condition) {
  joinConditions.add(new JoinCondition(table, condition));
  if (factory instanceof DefaultFieldFactory) {
    factory = new TableQualifiedFieldFactory();
  }
  return this;
}
项目:httpQL    文件:SelectBuilder.java   
public SelectBuilder<T> withLeftJoinCondition(TableLike<?> table, Condition condition) {
  joinConditions.add(new JoinCondition(table, condition, true));
  if (factory instanceof DefaultFieldFactory) {
    factory = new TableQualifiedFieldFactory();
  }
  return this;
}
项目:steve    文件:ChargePointRepositoryImpl.java   
@Override
public List<ConnectorStatus> getChargePointConnectorStatus() {
    // Prepare for the inner select of the second join
    Field<Integer> t1Pk = CONNECTOR_STATUS.CONNECTOR_PK.as("t1_pk");
    Field<DateTime> t1Max = DSL.max(CONNECTOR_STATUS.STATUS_TIMESTAMP).as("t1_max");
    TableLike<?> t1 = ctx.select(t1Pk, t1Max)
                         .from(CONNECTOR_STATUS)
                         .groupBy(CONNECTOR_STATUS.CONNECTOR_PK)
                         .asTable("t1");

    return ctx.select(CHARGE_BOX.CHARGE_BOX_PK,
                      CONNECTOR.CHARGE_BOX_ID,
                      CONNECTOR.CONNECTOR_ID,
                      CONNECTOR_STATUS.STATUS_TIMESTAMP,
                      CONNECTOR_STATUS.STATUS,
                      CONNECTOR_STATUS.ERROR_CODE)
              .from(CONNECTOR_STATUS)
              .join(CONNECTOR)
                    .onKey()
              .join(CHARGE_BOX)
                    .on(CHARGE_BOX.CHARGE_BOX_ID.eq(CONNECTOR.CHARGE_BOX_ID))
              .join(t1)
                    .on(CONNECTOR_STATUS.CONNECTOR_PK.equal(t1.field(t1Pk)))
                    .and(CONNECTOR_STATUS.STATUS_TIMESTAMP.equal(t1.field(t1Max)))
              .orderBy(CONNECTOR_STATUS.STATUS_TIMESTAMP.desc())
              .fetch()
              .map(r -> ConnectorStatus.builder()
                                       .chargeBoxPk(r.value1())
                                       .chargeBoxId(r.value2())
                                       .connectorId(r.value3())
                                       .timeStamp(DateTimeUtils.humanize(r.value4()))
                                       .statusTimestamp(r.value4())
                                       .status(r.value5())
                                       .errorCode(r.value6())
                                       .build()
              );
}
项目:MBaaS    文件:MenuProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:AttributeProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:SectionProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:DocumentProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:LayoutProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:FileProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:CollectionProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:PageProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:RestProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:UserProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:MenuItemProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:MBaaS    文件:RoleProvider.java   
@Override
protected TableLike<?> from() {
    return this.from;
}
项目:httpQL    文件:JoinCondition.java   
public JoinCondition(TableLike<?> table, Condition condition, boolean leftJoin) {
  this.table = table;
  this.condition = condition;
  this.leftJoin = leftJoin;
}
项目:httpQL    文件:JoinCondition.java   
public JoinCondition(TableLike<?> table, Condition condition) {
  this(table, condition, false);
}
项目:httpQL    文件:JoinCondition.java   
public TableLike<?> getTable() {
  return table;
}