com.healthmarketscience.jackcess.Table.getDatabase()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(569)

本文整理了Java中com.healthmarketscience.jackcess.Table.getDatabase()方法的一些代码示例,展示了Table.getDatabase()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getDatabase()方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:getDatabase

Table.getDatabase介绍

暂无

代码示例

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. @Override
  2. public Database getDatabase() {
  3. return wrapped.getDatabase();
  4. }

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

  1. private boolean matchesLinkedTable(Table table, String linkedTableName,
  2. String linkedDbName) {
  3. return (table.getName().equalsIgnoreCase(linkedTableName) &&
  4. (_linkedDbs != null) &&
  5. (_linkedDbs.get(linkedDbName) == table.getDatabase()));
  6. }

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

  1. .append(((DatabaseImpl)getFromTable().getDatabase()).getName())
  2. .append(")");

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

  1. @Override
  2. public boolean matches(Table table, String columnName, Object value1,
  3. Object value2)
  4. {
  5. if(equals(value1, value2)) {
  6. return true;
  7. }
  8. if((value1 != null) && (value2 != null) &&
  9. (value1.getClass() != value2.getClass())) {
  10. // the values aren't the same type, try coercing them to "internal"
  11. // values and try again
  12. DataType dataType = table.getColumn(columnName).getType();
  13. try {
  14. DatabaseImpl db = (DatabaseImpl)table.getDatabase();
  15. Object internalV1 = ColumnImpl.toInternalValue(dataType, value1, db);
  16. Object internalV2 = ColumnImpl.toInternalValue(dataType, value2, db);
  17. return equals(internalV1, internalV2);
  18. } catch(IOException e) {
  19. // ignored, just go with the original result
  20. }
  21. }
  22. return false;
  23. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. private void persist(Cursor cur) throws IOException, SQLException {
  2. Object[] mr = this.modifiedRow;
  3. if (table.getDatabase().getColumnOrder().equals(ColumnOrder.DISPLAY)) {
  4. Object[] newRowReorded = new Object[this.modifiedRow.length];
  5. int j = 0;
  6. for (Column cli : table.getColumns()) {
  7. newRowReorded[cli.getColumnIndex()] = this.modifiedRow[j];
  8. j++;
  9. }
  10. mr = newRowReorded;
  11. }
  12. cur.updateCurrentRow(mr);
  13. }

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

  1. @Override
  2. public boolean isLinkedTable(Table table) throws IOException {
  3. if((table == null) || (this == table.getDatabase())) {
  4. // if the table is null or this db owns the table, not linked
  5. return false;
  6. }
  7. // common case, local table name == remote table name
  8. TableInfo tableInfo = lookupTable(table.getName());
  9. if((tableInfo != null) && tableInfo.isLinked() &&
  10. matchesLinkedTable(table, ((LinkedTableInfo)tableInfo).linkedTableName,
  11. ((LinkedTableInfo)tableInfo).linkedDbName)) {
  12. return true;
  13. }
  14. // but, the local table name may not match the remote table name, so we
  15. // need to do a search if the common case fails
  16. return _tableFinder.isLinkedTable(table);
  17. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. public void insertRow(Table _table, Object[] _row) throws IOException {
  2. try {
  3. _table.addRow(newRow);
  4. } catch (ConstraintViolationException e) {
  5. List<? extends Column> lc = _table.getColumns();
  6. boolean retry = false;
  7. for (Column cl : lc) {
  8. if (cl.isAutoNumber()) {
  9. retry = true;
  10. break;
  11. }
  12. }
  13. if (!retry) {
  14. throw e;
  15. }
  16. Database db = _table.getDatabase();
  17. File fl = db.getFile();
  18. DBReferenceSingleton dbsin = DBReferenceSingleton.getInstance();
  19. DBReference ref = dbsin.getReference(fl);
  20. ref.reloadDbIO();
  21. this.dbIO = ref.getDbIO();
  22. _table = this.dbIO.getTable(this.tableName);
  23. _table.addRow(newRow);
  24. }
  25. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. int j = 0;
  2. List<? extends Column> lc = table.getColumns();
  3. if (table.getDatabase().getColumnOrder().equals(ColumnOrder.DISPLAY)) {
  4. Object[] newRowReorded = new Object[newRow.length];
  5. Column[] cllReorded = new Column[newRow.length];

相关文章