mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
hbase mapping
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.alibaba.druid.hbase.mapping;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class HMapping {
|
||||
|
||||
private Map<String, HMappingColumn> columns = new LinkedHashMap<String, HMappingColumn>();
|
||||
|
||||
public Collection<HMappingColumn> getColumns() {
|
||||
return Collections.unmodifiableCollection(columns.values());
|
||||
}
|
||||
|
||||
public void addColumn(HMappingColumn column) {
|
||||
this.columns.put(column.getName(), column);
|
||||
}
|
||||
|
||||
public HMappingColumn getColumn(String columnName) {
|
||||
return columns.get(columnName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.alibaba.druid.hbase.mapping;
|
||||
|
||||
public class HMappingColumn {
|
||||
|
||||
private String name;
|
||||
private Class<?> type;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Class<?> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Class<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user