本文整理了Java中com.healthmarketscience.jackcess.Table.getColumn()
方法的一些代码示例,展示了Table.getColumn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getColumn()
方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:getColumn
暂无
代码示例来源:origin: pentaho/pentaho-kettle
private Object convert( Object obj, AccessInputField field, int index ) throws Exception {
// Get column
Column c = data.t.getColumn( field.getColumn() );
// Find out field type
ValueMetaAndData sourceValueMetaAndData = AccessInputMeta.getValueMetaAndData( c, field.getName(), obj );
// DO CONVERSIONS...
//
ValueMetaInterface targetValueMeta = data.outputRowMeta.getValueMeta( data.totalpreviousfields + index );
return targetValueMeta.convertData( sourceValueMetaAndData.getValueMeta(), sourceValueMetaAndData
.getValueData() );
}
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
@Override
public Column getColumn(String name) {
return wrapped.getColumn(name);
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
public IterableBuilder setMatchPattern(String columnNamePattern,
Object valuePattern) {
return setMatchPattern(_cursor.getTable().getColumn(columnNamePattern),
valuePattern);
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
@Override
public boolean matches(Table table, String columnName, Object value1,
Object value2)
{
if(!table.getColumn(columnName).getType().isTextual()) {
// use simple equality
return SimpleColumnMatcher.INSTANCE.matches(table, columnName,
value1, value2);
}
// convert both values to Strings and compare case-insensitively
try {
CharSequence cs1 = ColumnImpl.toCharSequence(value1);
CharSequence cs2 = ColumnImpl.toCharSequence(value2);
return((cs1 == cs2) ||
((cs1 != null) && (cs2 != null) &&
cs1.toString().equalsIgnoreCase(cs2.toString())));
} catch(IOException e) {
throw new RuntimeIOException("Could not read column " + columnName
+ " value", e);
}
}
代码示例来源: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: com.healthmarketscience.jackcess/jackcess
@Override
public void postTableLoadInit() throws IOException {
super.postTableLoadInit();
// link up with the actual versioned column. it should have the same name
// as the "value" column in the type table.
Column versionedCol = getColumn().getTable().getColumn(
getValueColumn().getName());
((ColumnImpl)versionedCol).setVersionHistoryColumn((ColumnImpl)getColumn());
}
内容来源于网络,如有侵权,请联系作者删除!