本文整理了Java中com.healthmarketscience.jackcess.Table.getDatabase()
方法的一些代码示例,展示了Table.getDatabase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getDatabase()
方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:getDatabase
暂无
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
@Override
public Database getDatabase() {
return wrapped.getDatabase();
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
private boolean matchesLinkedTable(Table table, String linkedTableName,
String linkedDbName) {
return (table.getName().equalsIgnoreCase(linkedTableName) &&
(_linkedDbs != null) &&
(_linkedDbs.get(linkedDbName) == table.getDatabase()));
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
.append(((DatabaseImpl)getFromTable().getDatabase()).getName())
.append(")");
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
@Override
public boolean matches(Table table, String columnName, Object value1,
Object value2)
{
if(equals(value1, value2)) {
return true;
}
if((value1 != null) && (value2 != null) &&
(value1.getClass() != value2.getClass())) {
// the values aren't the same type, try coercing them to "internal"
// values and try again
DataType dataType = table.getColumn(columnName).getType();
try {
DatabaseImpl db = (DatabaseImpl)table.getDatabase();
Object internalV1 = ColumnImpl.toInternalValue(dataType, value1, db);
Object internalV2 = ColumnImpl.toInternalValue(dataType, value2, db);
return equals(internalV1, internalV2);
} catch(IOException e) {
// ignored, just go with the original result
}
}
return false;
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
private void persist(Cursor cur) throws IOException, SQLException {
Object[] mr = this.modifiedRow;
if (table.getDatabase().getColumnOrder().equals(ColumnOrder.DISPLAY)) {
Object[] newRowReorded = new Object[this.modifiedRow.length];
int j = 0;
for (Column cli : table.getColumns()) {
newRowReorded[cli.getColumnIndex()] = this.modifiedRow[j];
j++;
}
mr = newRowReorded;
}
cur.updateCurrentRow(mr);
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
@Override
public boolean isLinkedTable(Table table) throws IOException {
if((table == null) || (this == table.getDatabase())) {
// if the table is null or this db owns the table, not linked
return false;
}
// common case, local table name == remote table name
TableInfo tableInfo = lookupTable(table.getName());
if((tableInfo != null) && tableInfo.isLinked() &&
matchesLinkedTable(table, ((LinkedTableInfo)tableInfo).linkedTableName,
((LinkedTableInfo)tableInfo).linkedDbName)) {
return true;
}
// but, the local table name may not match the remote table name, so we
// need to do a search if the common case fails
return _tableFinder.isLinkedTable(table);
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
public void insertRow(Table _table, Object[] _row) throws IOException {
try {
_table.addRow(newRow);
} catch (ConstraintViolationException e) {
List<? extends Column> lc = _table.getColumns();
boolean retry = false;
for (Column cl : lc) {
if (cl.isAutoNumber()) {
retry = true;
break;
}
}
if (!retry) {
throw e;
}
Database db = _table.getDatabase();
File fl = db.getFile();
DBReferenceSingleton dbsin = DBReferenceSingleton.getInstance();
DBReference ref = dbsin.getReference(fl);
ref.reloadDbIO();
this.dbIO = ref.getDbIO();
_table = this.dbIO.getTable(this.tableName);
_table.addRow(newRow);
}
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
int j = 0;
List<? extends Column> lc = table.getColumns();
if (table.getDatabase().getColumnOrder().equals(ColumnOrder.DISPLAY)) {
Object[] newRowReorded = new Object[newRow.length];
Column[] cllReorded = new Column[newRow.length];
内容来源于网络,如有侵权,请联系作者删除!