-
Notifications
You must be signed in to change notification settings - Fork 28
hbase‐sdk ORM特性使用
weixiao edited this page Jul 20, 2023
·
1 revision
@HBaseTable(namespaceName = "default", tableName = "t2", defaultFamilyName = "info")
public class CityModel {
@HBaseRowKey
private String cityId;
private String cityName;
private String cityAddress;
@HBaseColumn(familyName = "detail")
private Integer cityArea;
@HBaseColumn(familyName = "detail", columnName = "TOTAL_POPULATION", toUpperCase = true)
private Integer totalPopulation;
@HBaseColumn(familyName = "detail", columnName = "cityTagList")
private List<CityTag> cityTagList;
public String getCityId() {
return cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getCityAddress() {
return cityAddress;
}
public void setCityAddress(String cityAddress) {
this.cityAddress = cityAddress;
}
public Integer getCityArea() {
return cityArea;
}
public void setCityArea(Integer cityArea) {
this.cityArea = cityArea;
}
public Integer getTotalPopulation() {
return totalPopulation;
}
public void setTotalPopulation(Integer totalPopulation) {
this.totalPopulation = totalPopulation;
}
public List<CityTag> getCityTagList() {
return cityTagList;
}
public void setCityTagList(List<CityTag> cityTagList) {
this.cityTagList = cityTagList;
}
@Override
public String toString() {
return "CityModel{" +
"cityId='" + cityId + '\'' +
", cityName='" + cityName + '\'' +
", cityAddress='" + cityAddress + '\'' +
", cityArea=" + cityArea +
", totalPopulation=" + totalPopulation +
", cityTagList=" + cityTagList +
'}';
}
}