mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor
This commit is contained in:
@@ -8,6 +8,8 @@ public interface HMapping {
|
||||
|
||||
byte[] getQualifier(String columnName);
|
||||
|
||||
byte[] getRow(Result result, String columnName);
|
||||
|
||||
boolean isRow(String columnName);
|
||||
|
||||
Object getObject(Result result, String name);
|
||||
|
||||
@@ -13,7 +13,7 @@ public class HMappingDefaultImpl implements HMapping {
|
||||
|
||||
byte[] bytes;
|
||||
if (isRow(columnName)) {
|
||||
bytes = result.getRow();
|
||||
bytes = getRow(result, columnName);
|
||||
} else {
|
||||
byte[] qualifier = Bytes.toBytes(columnName);
|
||||
bytes = result.getValue(family, qualifier);
|
||||
@@ -25,6 +25,10 @@ public class HMappingDefaultImpl implements HMapping {
|
||||
public byte[] getFamily(String columnName) {
|
||||
return family;
|
||||
}
|
||||
|
||||
public byte[] getRow(Result result, String columnName) {
|
||||
return result.getRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getQualifier(String columnName) {
|
||||
|
||||
Reference in New Issue
Block a user