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

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

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

Table.getColumn介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. private Object convert( Object obj, AccessInputField field, int index ) throws Exception {
  2. // Get column
  3. Column c = data.t.getColumn( field.getColumn() );
  4. // Find out field type
  5. ValueMetaAndData sourceValueMetaAndData = AccessInputMeta.getValueMetaAndData( c, field.getName(), obj );
  6. // DO CONVERSIONS...
  7. //
  8. ValueMetaInterface targetValueMeta = data.outputRowMeta.getValueMeta( data.totalpreviousfields + index );
  9. return targetValueMeta.convertData( sourceValueMetaAndData.getValueMeta(), sourceValueMetaAndData
  10. .getValueData() );
  11. }
  12. }

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

  1. @Override
  2. public Column getColumn(String name) {
  3. return wrapped.getColumn(name);
  4. }

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

  1. public IterableBuilder setMatchPattern(String columnNamePattern,
  2. Object valuePattern) {
  3. return setMatchPattern(_cursor.getTable().getColumn(columnNamePattern),
  4. valuePattern);
  5. }

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

  1. @Override
  2. public boolean matches(Table table, String columnName, Object value1,
  3. Object value2)
  4. {
  5. if(!table.getColumn(columnName).getType().isTextual()) {
  6. // use simple equality
  7. return SimpleColumnMatcher.INSTANCE.matches(table, columnName,
  8. value1, value2);
  9. }
  10. // convert both values to Strings and compare case-insensitively
  11. try {
  12. CharSequence cs1 = ColumnImpl.toCharSequence(value1);
  13. CharSequence cs2 = ColumnImpl.toCharSequence(value2);
  14. return((cs1 == cs2) ||
  15. ((cs1 != null) && (cs2 != null) &&
  16. cs1.toString().equalsIgnoreCase(cs2.toString())));
  17. } catch(IOException e) {
  18. throw new RuntimeIOException("Could not read column " + columnName
  19. + " value", e);
  20. }
  21. }

代码示例来源: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: com.healthmarketscience.jackcess/jackcess

  1. @Override
  2. public void postTableLoadInit() throws IOException {
  3. super.postTableLoadInit();
  4. // link up with the actual versioned column. it should have the same name
  5. // as the "value" column in the type table.
  6. Column versionedCol = getColumn().getTable().getColumn(
  7. getValueColumn().getName());
  8. ((ColumnImpl)versionedCol).setVersionHistoryColumn((ColumnImpl)getColumn());
  9. }

相关文章