本文整理汇总了Java中org.pentaho.di.core.RowMetaAndData.isNumeric方法的典型用法代码示例。如果您正苦于以下问题:Java RowMetaAndData.isNumeric方法的具体用法?Java RowMetaAndData.isNumeric怎么用?Java RowMetaAndData.isNumeric使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.RowMetaAndData
的用法示例。
在下文中一共展示了RowMetaAndData.isNumeric方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIDWithValue
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
private synchronized long getIDWithValue(String tablename, String idfield, String lookupkey[], long key[]) throws KettleException
{
RowMetaAndData par = new RowMetaAndData();
String sql = "SELECT " + idfield + " FROM " + tablename + " ";
for (int i = 0; i < lookupkey.length; i++)
{
if (i == 0)
sql += "WHERE ";
else
sql += "AND ";
par.addValue(new ValueMeta(lookupkey[i], ValueMetaInterface.TYPE_INTEGER), new Long(key[i]));
sql += lookupkey[i] + " = ? ";
}
RowMetaAndData result = database.getOneRow(sql, par.getRowMeta(), par.getData());
if (result != null && result.getRowMeta() != null && result.getData() != null && result.isNumeric(0))
return result.getInteger(0, 0);
return -1;
}
示例2: lookupValue
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized long lookupValue(String name, String type, String value_str, boolean isnull) throws KettleException
{
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(FIELD_VALUE_NAME, ValueMetaInterface.TYPE_STRING), name);
table.addValue(new ValueMeta(FIELD_VALUE_VALUE_TYPE, ValueMetaInterface.TYPE_STRING), type);
table.addValue(new ValueMeta(FIELD_VALUE_VALUE_STR, ValueMetaInterface.TYPE_STRING), value_str);
table.addValue(new ValueMeta(FIELD_VALUE_IS_NULL, ValueMetaInterface.TYPE_BOOLEAN), Boolean.valueOf(isnull));
String sql = "SELECT " + quote(FIELD_VALUE_ID_VALUE) + " FROM " + databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_VALUE) + " ";
sql += "WHERE " + quote(FIELD_VALUE_NAME) + " = ? ";
sql += "AND " + quote(FIELD_VALUE_VALUE_TYPE) + " = ? ";
sql += "AND " + quote(FIELD_VALUE_VALUE_STR) + " = ? ";
sql += "AND " + quote(FIELD_VALUE_IS_NULL) + " = ? ";
RowMetaAndData result = database.getOneRow(sql, table.getRowMeta(), table.getData());
if (result != null && result.getData()!=null && result.isNumeric(0))
return result.getInteger(0, 0L);
else
return -1;
}
示例3: getIDWithValue
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized ObjectId getIDWithValue(String tablename, String idfield, String lookupkey[], ObjectId key[]) throws KettleException
{
RowMetaAndData par = new RowMetaAndData();
String sql = "SELECT " + idfield + " FROM " + tablename + " ";
for (int i = 0; i < lookupkey.length; i++)
{
if (i == 0)
sql += "WHERE ";
else
sql += "AND ";
par.addValue(new ValueMeta(lookupkey[i], ValueMetaInterface.TYPE_INTEGER), new LongObjectId(key[i]));
sql += lookupkey[i] + " = ? ";
}
RowMetaAndData result = getOneRow(sql, par.getRowMeta(), par.getData());
if (result != null && result.getRowMeta() != null && result.getData() != null && result.isNumeric(0)) {
return new LongObjectId(result.getInteger(0, 0));
}
return null;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例4: lookupValue
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized ObjectId lookupValue(String name, String type, String value_str, boolean isnull) throws KettleException
{
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_VALUE_NAME, ValueMetaInterface.TYPE_STRING), name);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_VALUE_VALUE_TYPE, ValueMetaInterface.TYPE_STRING), type);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_VALUE_VALUE_STR, ValueMetaInterface.TYPE_STRING), value_str);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_VALUE_IS_NULL, ValueMetaInterface.TYPE_BOOLEAN), Boolean.valueOf(isnull));
String sql = "SELECT " + quote(KettleDatabaseRepository.FIELD_VALUE_ID_VALUE) + " FROM " + quoteTable(KettleDatabaseRepository.TABLE_R_VALUE) + " ";
sql += "WHERE " + quote(KettleDatabaseRepository.FIELD_VALUE_NAME) + " = ? ";
sql += "AND " + quote(KettleDatabaseRepository.FIELD_VALUE_VALUE_TYPE) + " = ? ";
sql += "AND " + quote(KettleDatabaseRepository.FIELD_VALUE_VALUE_STR) + " = ? ";
sql += "AND " + quote(KettleDatabaseRepository.FIELD_VALUE_IS_NULL) + " = ? ";
RowMetaAndData result = repository.connectionDelegate.getOneRow(sql, table.getRowMeta(), table.getData());
if (result != null && result.getData()!=null && result.isNumeric(0))
return new LongObjectId( result.getInteger(0, 0L) );
else
return null;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:KettleDatabaseRepositoryConditionDelegate.java
示例5: getRootDirectoryID
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized long getRootDirectoryID() throws KettleException
{
RowMetaAndData result = database.getOneRow("SELECT "+quote(FIELD_DIRECTORY_ID_DIRECTORY)+" FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_DIRECTORY)+" WHERE "+quote(FIELD_DIRECTORY_ID_DIRECTORY_PARENT)+" = 0");
if (result != null && result.isNumeric(0))
return result.getInteger(0, -1);
return -1;
}
示例6: getRootDirectoryID
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized ObjectId getRootDirectoryID() throws KettleException
{
RowMetaAndData result = connectionDelegate.getOneRow("SELECT "+quote(KettleDatabaseRepository.FIELD_DIRECTORY_ID_DIRECTORY)+" FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_DIRECTORY)+" WHERE "+quote(KettleDatabaseRepository.FIELD_DIRECTORY_ID_DIRECTORY_PARENT)+" = 0");
if (result != null && result.isNumeric(0))
return new LongObjectId( result.getInteger(0, -1) );
return null;
}