本文整理匯總了Java中com.taobao.tddl.executor.record.CloneableRecord.getColumnList方法的典型用法代碼示例。如果您正苦於以下問題:Java CloneableRecord.getColumnList方法的具體用法?Java CloneableRecord.getColumnList怎麽用?Java CloneableRecord.getColumnList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.taobao.tddl.executor.record.CloneableRecord
的用法示例。
在下文中一共展示了CloneableRecord.getColumnList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: FetchFromLeftOperation
import com.taobao.tddl.executor.record.CloneableRecord; //導入方法依賴的package包/類
public FetchFromLeftOperation(List<CloneableRecord> left){
super();
this.left = left;
if (!left.isEmpty()) {
CloneableRecord record = left.get(0);
columns = record.getColumnList();
}
}
示例2: isEquals
import com.taobao.tddl.executor.record.CloneableRecord; //導入方法依賴的package包/類
@SuppressWarnings("unused")
private boolean isEquals(CloneableRecord right, CloneableRecord left) {
boolean equals = true;
List<String> leftColumns = left.getColumnList();
List<String> rightColumns = right.getColumnList();
Iterator<String> leftIter = leftColumns.iterator();
Iterator<String> rightIter = rightColumns.iterator();
while (leftIter.hasNext()) {
if (!rightIter.hasNext()) {
equals = false;
break;
} else {
String leftCol = leftIter.next();
String rightCol = rightIter.next();
Object leftVal = left.get(leftCol);
Object rightVal = right.get(rightCol);
if (leftVal != null && !leftVal.equals(rightVal)) {
equals = false;
break;
}
if (leftVal == null && rightVal != null) {
equals = false;
break;
}
}
}
// 如果左麵耗盡,右麵沒有耗盡,那麽也認為不等於。
if (rightIter.hasNext()) {
equals = false;
}
return equals;
}