.
This commit is contained in:
@@ -6,6 +6,7 @@ import net.tccn.dbq.Field;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 元数据
|
||||
@@ -24,6 +25,7 @@ public class MetaTable extends Doc<MetaTable> implements Serializable {
|
||||
private String dbPlatId; //所属数据平台
|
||||
private String catalog; //所在database
|
||||
|
||||
private Integer hv;//临时
|
||||
//=============== getter/setter ============
|
||||
|
||||
public String getName() {
|
||||
@@ -81,4 +83,25 @@ public class MetaTable extends Doc<MetaTable> implements Serializable {
|
||||
public void setCatalog(String catalog) {
|
||||
this.catalog = catalog;
|
||||
}
|
||||
|
||||
public Integer getHv() {
|
||||
return hv;
|
||||
}
|
||||
|
||||
public void setHv(Integer hv) {
|
||||
this.hv = hv;
|
||||
}
|
||||
|
||||
// ------------------------------------------------
|
||||
public static MetaTable toAs(net.tccn.dbq.table.Table table) {
|
||||
List<Field> fields = table.getColumns().stream().map(Field::toAs).collect(Collectors.toList());
|
||||
|
||||
MetaTable _bean = new MetaTable();
|
||||
_bean.setName(table.getName());
|
||||
_bean.setComment(table.getComment());
|
||||
_bean.setCatalog(table.getCatalog());
|
||||
_bean.setItems(fields);
|
||||
|
||||
return _bean;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user