本文整理了Java中com.healthmarketscience.jackcess.Table.iterator()
方法的一些代码示例,展示了Table.iterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.iterator()
方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:iterator
[英]Calls #reset on this table and returns a modifiable Iterator which will iterate through all the rows of this table. Use of the Iterator follows the same restrictions as a call to #getNextRow.
For more advanced iteration, use the #getDefaultCursor directly.
[中]对该表调用#reset并返回一个可修改的迭代器,该迭代器将遍历该表的所有行。迭代器的使用遵循与调用#getNextRow相同的限制。
对于更高级的迭代,直接使用#getDefaultCursor。
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
@Override
public Iterator<Row> iterator() {
return wrapped.iterator();
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
private boolean checkInside(Database db) throws IOException {
Table t = db.getSystemTable("MSysObjects");
Iterator<Row> it = t.iterator();
while (it.hasNext()) {
Row row = it.next();
Object dobj = row.get("DateUpdate");
Object tobj = row.get("Type");
if (dobj == null || tobj == null) {
continue;
}
Date dt = (Date) dobj;
short type = (Short) tobj;
if (lastModified < dt.getTime() && (type == 1 || type == 5 || type == 8)
) {
return true;
}
}
return false;
}
代码示例来源:origin: dk.eobjects.metamodel/MetaModel-access
@Override
public DataSet materializeMainSchemaTable(Table table, Column[] columns,
int maxRows) {
try {
com.healthmarketscience.jackcess.Table mdbTable = getDatabase()
.getTable(table.getName());
SelectItem[] selectItems = new SelectItem[columns.length];
for (int i = 0; i < columns.length; i++) {
selectItems[i] = new SelectItem(columns[i]);
}
int rowNum = 0;
List<Object[]> data = new LinkedList<Object[]>();
Iterator<Map<String, Object>> it = mdbTable.iterator();
while (it.hasNext() && (maxRows < 0 || rowNum < maxRows)) {
rowNum++;
Map<String, Object> valueMap = it.next();
Object[] values = new Object[columns.length];
for (int j = 0; j < columns.length; j++) {
values[j] = valueMap.get(columns[j].getName());
}
data.add(values);
}
return new DataSet(selectItems, data);
} catch (Exception e) {
throw new MetaModelException(e);
}
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
try {
int i = 0;
Iterator<Row> it = t.iterator();
代码示例来源:origin: org.eobjects.metamodel/MetaModel-access
@Override
public DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows) {
try {
final com.healthmarketscience.jackcess.Table mdbTable = getDatabase().getTable(table.getName());
final SelectItem[] selectItems = new SelectItem[columns.length];
for (int i = 0; i < columns.length; i++) {
selectItems[i] = new SelectItem(columns[i]);
}
final DataSetHeader header = new CachingDataSetHeader(selectItems);
int rowNum = 0;
final List<Row> data = new LinkedList<Row>();
final Iterator<Map<String, Object>> it = mdbTable.iterator();
while (it.hasNext() && (maxRows < 0 || rowNum < maxRows)) {
rowNum++;
final Map<String, Object> valueMap = it.next();
final Object[] values = new Object[columns.length];
for (int j = 0; j < columns.length; j++) {
values[j] = valueMap.get(columns[j].getName());
}
data.add(new DefaultRow(header, values));
}
return new InMemoryDataSet(header, data);
} catch (Exception e) {
throw new MetaModelException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!