本文整理匯總了Java中com.taobao.tddl.executor.cursor.impl.ColMetaAndIndex類的典型用法代碼示例。如果您正苦於以下問題:Java ColMetaAndIndex類的具體用法?Java ColMetaAndIndex怎麽用?Java ColMetaAndIndex使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ColMetaAndIndex類屬於com.taobao.tddl.executor.cursor.impl包,在下文中一共展示了ColMetaAndIndex類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fillRowSet
import com.taobao.tddl.executor.cursor.impl.ColMetaAndIndex; //導入依賴的package包/類
protected void fillRowSet(IRowSet iRowSet, boolean max) {
ICursorMeta icm = iRowSet.getParentCursorMeta();
Iterator<ColMetaAndIndex> iterator = icm.indexIterator();
while (iterator.hasNext()) {
ColMetaAndIndex cai = iterator.next();
String cname = cai.getName();
List<ColumnMeta> columns = iRowSet.getParentCursorMeta().getColumns();
// TODO shenxun : 如果條件是null。。。沒處理。。應該在Comparator裏麵處理
if (iRowSet.getObject(cai.getIndex()) == null) {
boolean find = false;
for (ColumnMeta cm : columns) {
if (cname.equalsIgnoreCase(cm.getName())) {
find = true;
iRowSet.setObject(cai.getIndex(), getExtremum(max, cm.getDataType()));
break;
}
}
if (!find) {
throw new IllegalStateException(" can't find column name : " + cname + " on . " + columns);
}
}
}
}
示例2: fillRowSet
import com.taobao.tddl.executor.cursor.impl.ColMetaAndIndex; //導入依賴的package包/類
private void fillRowSet(IRowSet iRowSet, boolean max) {
ICursorMeta icm = iRowSet.getParentCursorMeta();
Iterator<ColMetaAndIndex> iterator = icm.indexIterator();
while (iterator.hasNext()) {
ColMetaAndIndex cai = iterator.next();
String cname = cai.getName();
List<ColumnMeta> columns = iRowSet.getParentCursorMeta().getColumns();
// TODO shenxun : 如果條件是null。。。沒處理。。應該在Comparator裏麵處理
if (iRowSet.getObject(cai.getIndex()) == null) {
boolean find = false;
for (ColumnMeta cm : columns) {
if (cname.equalsIgnoreCase(cm.getName())) {
find = true;
iRowSet.setObject(cai.getIndex(), getExtremum(max, cm.getDataType()));
break;
}
}
if (!find) {
throw new IllegalStateException(" can't find column name : " + cname + " on . " + columns);
}
}
}
}
示例3: convertToClonableRecord
import com.taobao.tddl.executor.cursor.impl.ColMetaAndIndex; //導入依賴的package包/類
public static CloneableRecord convertToClonableRecord(IRowSet iRowSet) {
Iterator<ColMetaAndIndex> columnIterator = iRowSet.getParentCursorMeta().indexIterator();
CloneableRecord cr = new FixedLengthRecord(iRowSet.getParentCursorMeta().getColumns());
while (columnIterator.hasNext()) {
ColMetaAndIndex cmAndIndex = columnIterator.next();
cr.put(cmAndIndex.getName(), iRowSet.getObject(cmAndIndex.getIndex()));
}
return cr;
}
示例4: indexIterator
import com.taobao.tddl.executor.cursor.impl.ColMetaAndIndex; //導入依賴的package包/類
Iterator<ColMetaAndIndex> indexIterator();