com.clougence.clouddm.sdk.api.ColMetaDataInSdk Maven / Gradle / Ivy
package com.clougence.clouddm.sdk.api;
import java.sql.JDBCType;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public final class ColMetaDataInSdk {
private String catalog;
private String schema;
private String table;
private String column;
private int index;
private String columnType;
private JDBCType jdbcType;
public String toPath() {
StringBuilder strBuilder = new StringBuilder();
if (!isBlank(catalog)) {
strBuilder.append("/").append(catalog);
}
if (!isBlank(schema)) {
strBuilder.append("/").append(schema);
}
if (!isBlank(table)) {
strBuilder.append("/").append(table);
}
if (!isBlank(column)) {
strBuilder.append("/").append(column);
}
if (strBuilder.length() == 0) {
return "/";
} else {
return strBuilder.toString();
}
}
private static boolean isBlank(final CharSequence cs) {
int strLen;
if (cs == null || (strLen = cs.length()) == 0) {
return true;
}
for (int i = 0; i < strLen; i++) {
if (!Character.isWhitespace(cs.charAt(i))) {
return false;
}
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy