本文整理汇总了Java中org.pentaho.di.core.RowMetaAndData.getString方法的典型用法代码示例。如果您正苦于以下问题:Java RowMetaAndData.getString方法的具体用法?Java RowMetaAndData.getString怎么用?Java RowMetaAndData.getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.RowMetaAndData
的用法示例。
在下文中一共展示了RowMetaAndData.getString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTransformationsWithIDList
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public String[] getTransformationsWithIDList(List<Object[]> list, RowMetaInterface rowMeta) throws KettleException
{
String[] transList = new String[list.size()];
for (int i=0;i<list.size();i++)
{
long id_transformation = rowMeta.getInteger( list.get(i), quote(KettleDatabaseRepository.FIELD_TRANSFORMATION_ID_TRANSFORMATION), -1L);
if (id_transformation > 0)
{
RowMetaAndData transRow = getTransformation(new LongObjectId(id_transformation));
if (transRow!=null)
{
String transName = transRow.getString(KettleDatabaseRepository.FIELD_TRANSFORMATION_NAME, "<name not found>");
long id_directory = transRow.getInteger(KettleDatabaseRepository.FIELD_TRANSFORMATION_ID_DIRECTORY, -1L);
RepositoryDirectoryInterface dir = repository.loadRepositoryDirectoryTree().findDirectory(new LongObjectId(id_directory));
transList[i]=dir.getPathObjectCombination(transName);
}
}
}
return transList;
}
示例2: getTransformationsWithIDList
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
private String[] getTransformationsWithIDList(List<Object[]> list, RowMetaInterface rowMeta) throws KettleException
{
String[] transList = new String[list.size()];
for (int i=0;i<list.size();i++)
{
long id_transformation = rowMeta.getInteger( list.get(i), quote(FIELD_TRANSFORMATION_ID_TRANSFORMATION), -1L);
if (id_transformation > 0)
{
RowMetaAndData transRow = getTransformation(id_transformation);
if (transRow!=null)
{
String transName = transRow.getString(quote(FIELD_TRANSFORMATION_NAME), "<name not found>");
long id_directory = transRow.getInteger(quote(FIELD_TRANSFORMATION_ID_DIRECTORY), -1L);
RepositoryDirectory dir = directoryTree.findDirectory(id_directory);
transList[i]=dir.getPathObjectCombination(transName);
}
}
}
return transList;
}
示例3: ClusterSchema
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public ClusterSchema(Repository rep, long id_cluster_schema, List<SlaveServer> slaveServers) throws KettleException
{
this();
setId(id_cluster_schema);
RowMetaAndData row = rep.getClusterSchema(id_cluster_schema);
name = row.getString(Repository.FIELD_CLUSTER_NAME, null); //$NON-NLS-1$
basePort = row.getString(Repository.FIELD_CLUSTER_BASE_PORT, null); //$NON-NLS-1$
socketsBufferSize = row.getString(Repository.FIELD_CLUSTER_SOCKETS_BUFFER_SIZE, null); //$NON-NLS-1$
socketsFlushInterval = row.getString(Repository.FIELD_CLUSTER_SOCKETS_FLUSH_INTERVAL, null); //$NON-NLS-1$
socketsCompressed = row.getBoolean(Repository.FIELD_CLUSTER_SOCKETS_COMPRESSED, true); //$NON-NLS-1$
dynamic = row.getBoolean(Repository.FIELD_CLUSTER_DYNAMIC, true); //$NON-NLS-1$
long[] pids = rep.getSlaveIDs(id_cluster_schema);
for (int i=0;i<pids.length;i++)
{
SlaveServer slaveServer = new SlaveServer(rep, pids[i]);
SlaveServer reference = SlaveServer.findSlaveServer(slaveServers, slaveServer.getName());
if (reference!=null)
this.slaveServers.add(reference);
else
this.slaveServers.add(slaveServer);
}
}
示例4: TransDependency
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public TransDependency(Repository rep, long id_dependency, List<DatabaseMeta> databases) throws KettleException
{
try
{
setID(id_dependency);
RowMetaAndData r = rep.getTransDependency(id_dependency);
if (r!=null)
{
long id_connection = r.getInteger("ID_DATABASE", 0); //$NON-NLS-1$
db = DatabaseMeta.findDatabase(databases, id_connection);
tablename = r.getString("TABLE_NAME", null); //$NON-NLS-1$
fieldname = r.getString("FIELD_NAME", null); //$NON-NLS-1$
}
}
catch(KettleException dbe)
{
throw new KettleException(Messages.getString("TransDependency.Exception.UnableToLoadTransformationDependency")+id_dependency, dbe); //$NON-NLS-1$
}
}
示例5: getTransAttributeString
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized String getTransAttributeString(ObjectId id_transformation, int nr, String code) throws KettleException
{
RowMetaAndData r = null;
r = getTransAttributeRow(id_transformation, nr, code);
if (r == null)
return null;
return r.getString(KettleDatabaseRepository.FIELD_TRANS_ATTRIBUTE_VALUE_STR, null);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例6: ProfileMeta
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public ProfileMeta(Repository rep, long id_profile)
throws KettleException
{
try
{
RowMetaAndData r = rep.getProfile(id_profile);
if (r!=null)
{
setID(id_profile);
name = r.getString("NAME", null);
description = r.getString("DESCRIPTION", null);
long pid[] = rep.getPermissionIDs(id_profile);
// System.out.println("Profile "+name+" has "+pid.length+" permissions.");
permissions = new ArrayList<PermissionMeta>();
for (int i=0;i<pid.length;i++)
{
PermissionMeta pi = new PermissionMeta(rep, pid[i]);
//System.out.println("Adding permission #"+i+" : "+pi+", id="+pi.getID());
if (pi.getID()>0) addPermission(pi);
}
}
else
{
throw new KettleException(Messages.getString("ProfileMeta.Error.NotFound", Long.toString(id_profile)));
}
}
catch(KettleDatabaseException dbe)
{
throw new KettleException(Messages.getString("ProfileMeta.Error.NotCreated", Long.toString(id_profile)), dbe);
}
}
示例7: getStringWithID
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
private synchronized String getStringWithID(String tablename, String keyfield, long id, String fieldname) throws KettleException
{
String sql = "SELECT " + fieldname + " FROM " + tablename + " WHERE " + keyfield + " = ?";
RowMetaAndData par = new RowMetaAndData();
par.addValue(new ValueMeta(keyfield, ValueMetaInterface.TYPE_INTEGER), new Long(id));
RowMetaAndData result = database.getOneRow(sql, par.getRowMeta(), par.getData());
if (result != null && result.getData()!=null)
{
return result.getString(0, null);
}
return null;
}
示例8: getStepAttributeString
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized String getStepAttributeString(ObjectId id_step, int nr, String code) throws KettleException
{
RowMetaAndData r = null;
if (stepAttributesBuffer!=null) r = searchStepAttributeInBuffer(id_step, code, (long)nr);
else r = getStepAttributeRow(id_step, nr, code);
if (r == null)
return null;
return r.getString(KettleDatabaseRepository.FIELD_STEP_ATTRIBUTE_VALUE_STR, null);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:10,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例9: showLogEntry
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public void showLogEntry()
{
if (rowList==null)
{
wText.setText(""); //$NON-NLS-1$
return;
}
// grab the selected line in the table:
int nr = wFields.table.getSelectionIndex();
if (nr>=0 && rowList!=null && nr<rowList.size())
{
// OK, grab this one from the buffer...
RowMetaAndData row = rowList.get(nr);
String logging=null;
try
{
int logFieldIndex = row.getRowMeta().indexOfValue("LOG_FIELD");
logging = logFieldIndex<0 ? "-" : row.getString(logFieldIndex, ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
}
catch (KettleValueException e)
{
new ErrorDialog(jobGraph.getShell(), Messages.getString("JobHistory.Error.GettingLoggingInfo"), Messages.getString("JobHistory.Error.GettingLogFieldFromLoggingTable"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
if (logging!=null)
{
wText.setText(logging);
}
else
{
wText.setText(""); //$NON-NLS-1$
}
}
}
示例10: getTransAttributeString
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized String getTransAttributeString(long id_transformation, int nr, String code) throws KettleException
{
RowMetaAndData r = null;
r = getTransAttributeRow(id_transformation, nr, code);
if (r == null)
return null;
return r.getString(FIELD_TRANS_ATTRIBUTE_VALUE_STR, null);
}
示例11: getJobEntryAttributeString
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized String getJobEntryAttributeString(long id_jobentry, int nr, String code) throws KettleException
{
RowMetaAndData r = getJobEntryAttributeRow(id_jobentry, nr, code);
if (r == null)
return null;
return r.getString(FIELD_JOBENTRY_ATTRIBUTE_VALUE_STR, null);
}
示例12: getJobEntryAttributeBoolean
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public boolean getJobEntryAttributeBoolean(long id_jobentry, int nr, String code, boolean def) throws KettleException
{
RowMetaAndData r = getJobEntryAttributeRow(id_jobentry, nr, code);
if (r == null) return def;
String v = r.getString(FIELD_JOBENTRY_ATTRIBUTE_VALUE_STR, null);
if (v==null || Const.isEmpty(v)) return def;
return ValueMeta.convertStringToBoolean(v).booleanValue();
}
示例13: getJobAttributeString
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public synchronized String getJobAttributeString(ObjectId id_job, int nr, String code) throws KettleException
{
RowMetaAndData r = null;
r = getJobAttributeRow(id_job, nr, code);
if (r == null)
return null;
return r.getString(KettleDatabaseRepository.FIELD_JOB_ATTRIBUTE_VALUE_STR, null);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:KettleDatabaseRepositoryConnectionDelegate.java
示例14: setEntryValue
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
private void setEntryValue(StepInjectionMetaEntry entry, RowMetaAndData row, SourceStepField source) throws KettleValueException {
// A standard attribute, a single row of data...
//
Object value = null;
switch(entry.getValueType()) {
case ValueMetaInterface.TYPE_STRING: value = row.getString(source.getField(), null); break;
case ValueMetaInterface.TYPE_BOOLEAN: value = row.getBoolean(source.getField(), false); break;
case ValueMetaInterface.TYPE_INTEGER: value = row.getInteger(source.getField(), 0L); break;
case ValueMetaInterface.TYPE_NUMBER: value = row.getNumber(source.getField(), 0.0D); break;
case ValueMetaInterface.TYPE_DATE: value = row.getDate(source.getField(), null); break;
case ValueMetaInterface.TYPE_BIGNUMBER: value = row.getBigNumber(source.getField(), null); break;
}
entry.setValue(value);
}
示例15: execute
import org.pentaho.di.core.RowMetaAndData; //导入方法依赖的package包/类
public Result execute(Result result, int nr) throws KettleException {
List<RowMetaAndData> rows = result.getRows();
RowMetaAndData resultRow = null;
int NrErrFiles = 0;
result.setResult(false);
result.setNrErrors(1);
if (argFromPrevious) {
if(log.isDetailed())
logDetailed(BaseMessages.getString(PKG, "JobEntryDeleteFiles.FoundPreviousRows", String.valueOf((rows != null ? rows.size() : 0)))); //$NON-NLS-1$
}
if (argFromPrevious && rows != null) // Copy the input row to the (command line) arguments
{
for (int iteration = 0; iteration < rows.size() && !parentJob.isStopped(); iteration++) {
resultRow = rows.get(iteration);
String args_previous = resultRow.getString(0, null);
String fmasks_previous = resultRow.getString(1, null);
// ok we can process this file/folder
if(log.isDetailed())
logDetailed(BaseMessages.getString(PKG, "JobEntryDeleteFiles.ProcessingRow", args_previous, fmasks_previous)); //$NON-NLS-1$
if (!ProcessFile(args_previous, fmasks_previous,parentJob)) {
NrErrFiles++;
}
}
} else if (arguments != null) {
for (int i = 0; i < arguments.length && !parentJob.isStopped(); i++) {
// ok we can process this file/folder
if(log.isDetailed())
logDetailed(BaseMessages.getString(PKG, "JobEntryDeleteFiles.ProcessingArg", arguments[i], filemasks[i])); //$NON-NLS-1$
if (!ProcessFile(arguments[i], filemasks[i],parentJob)) {
NrErrFiles++;
}
}
}
if (NrErrFiles==0)
{
result.setResult(true);
result.setNrErrors(0);
}else
{
result.setNrErrors(NrErrFiles);
result.setResult(false);
}
return result;
}