本文整理汇总了Java中org.pentaho.di.core.RowMetaAndData.getInteger方法的典型用法代码示例。如果您正苦于以下问题:Java RowMetaAndData.getInteger方法的具体用法?Java RowMetaAndData.getInteger怎么用?Java RowMetaAndData.getInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.RowMetaAndData
的用法示例。
在下文中一共展示了RowMetaAndData.getInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadRep
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public void loadRep(Repository rep, long id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException
{
try
{
RowMetaAndData r = rep.getJobEntry(id_jobentry);
if (r != null)
{
setName(r.getString("NAME", null));
setDescription(r.getString("DESCRIPTION", null));
int id_jobentry_type = (int) r.getInteger("ID_JOBENTRY_TYPE", 0);
RowMetaAndData jetrow = rep.getJobEntryType(id_jobentry_type);
if (jetrow != null)
{
type = JobEntryCopy.getType(jetrow.getString("CODE", null));
}
}
}
catch(KettleDatabaseException dbe)
{
throw new KettleException("Unable to load base job entry information from the repository for id_jobentry="+id_jobentry, dbe);
}
}
示例2: countNrStepAttributes
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int countNrStepAttributes(ObjectId id_step, String code) throws KettleException
{
if (stepAttributesBuffer!=null) // see if we can do this in memory...
{
int nr = searchNrStepAttributes(id_step, code);
return nr;
}
else
{
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, KettleDatabaseRepository.TABLE_R_STEP_ATTRIBUTE)+" WHERE "+quote(KettleDatabaseRepository.FIELD_STEP_ATTRIBUTE_ID_STEP)+" = ? AND "+quote(KettleDatabaseRepository.FIELD_STEP_ATTRIBUTE_CODE)+" = ?";
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_STEP_ATTRIBUTE_ID_STEP, ValueMetaInterface.TYPE_INTEGER), id_step);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_STEP_ATTRIBUTE_CODE, ValueMetaInterface.TYPE_STRING), code);
RowMetaAndData r = database.getOneRow(sql, table.getRowMeta(), table.getData());
if (r == null || r.getData()==null) return 0;
return (int) r.getInteger(0, 0L);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例3: getNextTableID
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
private synchronized long getNextTableID(String tablename, String idfield) throws KettleException
{
long retval = -1;
RowMetaAndData r = database.getOneRow("SELECT MAX(" + idfield + ") FROM " + tablename);
if (r != null)
{
Long id = r.getInteger(0);
if (id == null)
{
if (log.isDebug()) log.logDebug(toString(), "no max(" + idfield + ") found in table " + tablename);
retval = 1;
}
else
{
if (log.isDebug()) log.logDebug(toString(), "max(" + idfield + ") found in table " + tablename + " --> " + idfield + " number: " + id);
retval = id.longValue() + 1L;
}
}
return retval;
}
示例4: 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
示例5: updateTableRow
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized void updateTableRow(String tablename, String idfield, RowMetaAndData values) throws KettleException
{
long id = values.getInteger(idfield, 0L);
values.removeValue(idfield);
String sets[] = new String[values.size()];
for (int i = 0; i < values.size(); i++)
sets[i] = values.getValueMeta(i).getName();
String codes[] = new String[] { idfield };
String condition[] = new String[] { "=" };
database.prepareUpdate(tablename, codes, condition, sets);
values.addValue(new ValueMeta(idfield, ValueMetaInterface.TYPE_INTEGER), new Long(id));
database.setValuesUpdate(values.getRowMeta(), values.getData());
database.updateRow();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例6: getNrTransHops
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrTransHops(ObjectId id_transformation) throws KettleException
{
int retval = 0;
RowMetaAndData par = repository.connectionDelegate.getParameterMetaData(id_transformation);
String sql = "SELECT COUNT(*) FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_TRANS_HOP)+" WHERE "+quote(KettleDatabaseRepository.FIELD_TRANS_HOP_ID_TRANSFORMATION)+" = ? ";
RowMetaAndData r = repository.connectionDelegate.getOneRow(sql, par.getRowMeta(), par.getData());
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}
示例7: countNrJobAttributes
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int countNrJobAttributes(long id_job, String code) throws KettleException
{
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_JOB_ATTRIBUTE)+" WHERE "+quote(FIELD_JOB_ATTRIBUTE_ID_JOB)+" = ? AND "+quote(FIELD_JOB_ATTRIBUTE_CODE)+" = ?";
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(FIELD_JOB_ATTRIBUTE_ID_JOB, ValueMetaInterface.TYPE_INTEGER), new Long(id_job));
table.addValue(new ValueMeta(FIELD_JOB_ATTRIBUTE_CODE, ValueMetaInterface.TYPE_STRING), code);
RowMetaAndData r = database.getOneRow(sql, table.getRowMeta(), table.getData());
if (r == null|| r.getData()==null)
return 0;
return (int) r.getInteger(0, 0L);
}
示例8: getNrSubDirectories
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrSubDirectories(long id_directory) throws KettleException
{
int retval = 0;
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_DIRECTORY)+" WHERE "+quote(FIELD_DIRECTORY_ID_DIRECTORY_PARENT)+" = " + id_directory;
RowMetaAndData r = database.getOneRow(sql);
if (r != null)
{
retval = (int) r.getInteger(0, 0);
}
return retval;
}
示例9: getNrDatabases
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrDatabases() throws KettleException
{
int retval = 0;
String sql = "SELECT COUNT(*) FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_DATABASE);
RowMetaAndData r = repository.connectionDelegate.getOneRow(sql);
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:14,代码来源:KettleDatabaseRepositoryDatabaseDelegate.java
示例10: getNrSubDirectories
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrSubDirectories(ObjectId id_directory) throws KettleException {
int retval = 0;
RowMetaAndData dirParRow = repository.connectionDelegate.getParameterMetaData(id_directory);
String sql = "SELECT COUNT(*) FROM " + quoteTable(KettleDatabaseRepository.TABLE_R_DIRECTORY) + " WHERE "
+ quote(KettleDatabaseRepository.FIELD_DIRECTORY_ID_DIRECTORY_PARENT) + " = ? ";
RowMetaAndData r = repository.connectionDelegate.getOneRow(sql, dirParRow.getRowMeta(), dirParRow.getData());
if (r != null) {
retval = (int) r.getInteger(0, 0);
}
return retval;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:14,代码来源:KettleDatabaseRepositoryDirectoryDelegate.java
示例11: countNrTransAttributes
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int countNrTransAttributes(ObjectId id_transformation, String code) throws KettleException
{
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, KettleDatabaseRepository.TABLE_R_TRANS_ATTRIBUTE)+" WHERE "+quote(KettleDatabaseRepository.FIELD_TRANS_ATTRIBUTE_ID_TRANSFORMATION)+" = ? AND "+quote(KettleDatabaseRepository.FIELD_TRANS_ATTRIBUTE_CODE)+" = ?";
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_TRANS_ATTRIBUTE_ID_TRANSFORMATION, ValueMetaInterface.TYPE_INTEGER), id_transformation);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_TRANS_ATTRIBUTE_CODE, ValueMetaInterface.TYPE_STRING), code);
RowMetaAndData r = database.getOneRow(sql, table.getRowMeta(), table.getData());
if (r == null|| r.getData()==null)
return 0;
return (int) r.getInteger(0, 0L);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例12: getNrJobs
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrJobs() throws KettleException
{
int retval = 0;
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_JOB);
RowMetaAndData r = database.getOneRow(sql);
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}
示例13: getNrTransformations
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrTransformations(long id_directory) throws KettleException
{
int retval = 0;
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_TRANSFORMATION)+" WHERE "+quote(FIELD_TRANSFORMATION_ID_DIRECTORY)+" = " + id_directory;
RowMetaAndData r = database.getOneRow(sql);
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}
示例14: getNrConditions
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrConditions(long id_transforamtion) throws KettleException
{
int retval = 0;
String sql = "SELECT COUNT(*) FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_TRANS_STEP_CONDITION)+" WHERE "+quote(FIELD_TRANS_STEP_CONDITION_ID_TRANSFORMATION)+" = " + id_transforamtion;
RowMetaAndData r = database.getOneRow(sql);
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}
示例15: getNrTransformations
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized int getNrTransformations(ObjectId id_directory) throws KettleException
{
int retval = 0;
RowMetaAndData par = repository.connectionDelegate.getParameterMetaData(id_directory);
String sql = "SELECT COUNT(*) FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_TRANSFORMATION)+" WHERE "+quote(KettleDatabaseRepository.FIELD_TRANSFORMATION_ID_DIRECTORY)+" = ? ";
RowMetaAndData r = repository.connectionDelegate.getOneRow(sql, par.getRowMeta(), par.getData());
if (r != null)
{
retval = (int) r.getInteger(0, 0L);
}
return retval;
}