public static Optional<? extends Dbms> referencedDbmsIfPresent(Project project, ColumnIdentifier<?> identifier) { return referencedDbmsIfPresent(project, identifier.getDbmsId()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ColumnIdentifier)) return false; final ColumnIdentifier<?> that = (ColumnIdentifier<?>) o; return dbms.equals(that.getDbmsId()) && schema.equals(that.getSchemaId()) && table.equals(that.getTableId()) && column.equals(that.getColumnId()); }
@Override public String toString() { final ColumnIdentifier<ENTITY> cId = field.identifier(); final StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()) .append(" {") .append("field: ") .append(cId.getDbmsId()).append('.') .append(cId.getSchemaId()).append('.') .append(cId.getTableId()).append('.') .append(cId.getColumnId()) .append(", type: '").append(predicateType).append("'"); Cast.cast(this, Tuple.class).ifPresent(tuple -> { for (int i = 0; i < tuple.degree(); i++) { sb.append(", operand ").append(i) .append(": ").append(tuple.get(i)); } }); return sb.append("}").toString(); } }
public static Optional<? extends Schema> referencedSchemaIfPresent(Project project, ColumnIdentifier<?> identifier) { return referencedSchemaIfPresent(project, identifier.getDbmsId(), identifier.getSchemaId()); }
public ColumnLabelImpl(ColumnIdentifier<?> identifier) { label = identifier.getDbmsId() + "." + identifier.getSchemaId() + "." + identifier.getTableId() + "." + identifier.getColumnId(); }
/** * Returns a {@link TableIdentifier} that has the same {@code dbmsId}, * {@code schemaId} and {@code tableId} as this * {@link ColumnIdentifier}. * * @return the table identifier */ default TableIdentifier<ENTITY> asTableIdentifier() { return TableIdentifier.of(getDbmsId(), getSchemaId(), getTableId()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ColumnIdentifier)) return false; final ColumnIdentifier<?> that = (ColumnIdentifier<?>) o; return getDbmsId().equals(that.getDbmsId()) && getSchemaId().equals(that.getSchemaId()) && getTableId().equals(that.getTableId()) && getColumnId().equals(that.getColumnId()); }
public static Optional<? extends Table> referencedTableIfPresent(Project project, ColumnIdentifier<?> identifier) { return referencedTableIfPresent(project, identifier.getDbmsId(), identifier.getSchemaId(), identifier.getTableId()); }
public static Optional<? extends Column> referencedColumnIfPresent(Project project, ColumnIdentifier<?> identifier) { return referencedColumnIfPresent(project, identifier.getDbmsId(), identifier.getSchemaId(), identifier.getTableId(), identifier.getColumnId()); }
@Override public String toString() { final ColumnIdentifier<ENTITY> cId = field.identifier(); final StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()) .append(" {") .append("field: ") .append(cId.getDbmsId()).append('.') .append(cId.getSchemaId()).append('.') .append(cId.getTableId()).append('.') .append(cId.getColumnId()) .append(", type: '").append(predicateType).append("'"); Cast.cast(this, Tuple.class).ifPresent(tuple -> { for (int i = 0; i < tuple.degree(); i++) { sb.append(", operand ").append(i) .append(": ").append(tuple.get(i)); } }); return sb.append("}").toString(); } }