本文整理汇总了Java中org.pentaho.di.trans.HasDatabasesInterface类 的典型用法代码示例。如果您正苦于以下问题:Java HasDatabasesInterface类的具体用法?Java HasDatabasesInterface怎么用?Java HasDatabasesInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HasDatabasesInterface类 属于org.pentaho.di.trans包,在下文中一共展示了HasDatabasesInterface类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: editConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void editConnection(DatabaseMeta databaseMeta) {
HasDatabasesInterface hasDatabasesInterface = spoon.getActiveHasDatabasesInterface();
if (hasDatabasesInterface == null) {
return; // program error, exit just to make sure.
}
getDatabaseDialog().setDatabaseMeta(databaseMeta);
getDatabaseDialog().setDatabases(hasDatabasesInterface.getDatabases());
String newname = getDatabaseDialog().open();
if (!Const.isEmpty(newname)) // null: CANCEL
{
databaseMeta = getDatabaseDialog().getDatabaseMeta();
saveConnection(databaseMeta, Const.VERSION_COMMENT_EDIT_VERSION);
spoon.refreshTree();
}
spoon.setShellText();
}
开发者ID:yintaoxue, 项目名称:read-open-source-code, 代码行数:20, 代码来源:SpoonDBDelegate.java
示例2: dupeConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void dupeConnection(HasDatabasesInterface hasDatabasesInterface, DatabaseMeta databaseMeta)
{
String name = databaseMeta.getName();
int pos = hasDatabasesInterface.indexOfDatabase(databaseMeta);
if (databaseMeta != null)
{
DatabaseMeta databaseMetaCopy = (DatabaseMeta) databaseMeta.clone();
String dupename = BaseMessages.getString(PKG, "Spoon.Various.DupeName") + name;
databaseMetaCopy.setName(dupename);
getDatabaseDialog().setDatabaseMeta(databaseMetaCopy);
String newname = getDatabaseDialog().open();
if (newname != null) // null: CANCEL
{
databaseMetaCopy.verifyAndModifyDatabaseName(hasDatabasesInterface.getDatabases(), name);
hasDatabasesInterface.addDatabase(pos + 1, databaseMetaCopy);
spoon
.addUndoNew((UndoInterface) hasDatabasesInterface,
new DatabaseMeta[] { (DatabaseMeta) databaseMetaCopy.clone() },
new int[] { pos + 1 });
saveConnection(databaseMetaCopy, Const.VERSION_COMMENT_EDIT_VERSION);
spoon.refreshTree();
}
}
}
开发者ID:yintaoxue, 项目名称:read-open-source-code, 代码行数:27, 代码来源:SpoonDBDelegate.java
示例3: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static PerformanceLogTable getDefault(VariableSpace space, HasDatabasesInterface databasesInterface) {
PerformanceLogTable table = new PerformanceLogTable(space, databasesInterface);
table.fields.add( new LogTableField(ID.ID_BATCH.id, true, false, "ID_BATCH", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.BatchID"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.BatchID"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.SEQ_NR.id, true, false, "SEQ_NR", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.SeqNr"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.SeqNr"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.LOGDATE.id, true, false, "LOGDATE", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LogDate"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LogDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.TRANSNAME.id, true, false, "TRANSNAME", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.TransName"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.TransName"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.STEPNAME.id, true, false, "STEPNAME", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.StepName"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.StepName"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.STEP_COPY.id, true, false, "STEP_COPY", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.StepCopy"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.StepCopy"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.LINES_READ.id, true, false, "LINES_READ", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesRead"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesRead"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.LINES_WRITTEN.id, true, false, "LINES_WRITTEN", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesWritten"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesWritten"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.LINES_UPDATED.id, true, false, "LINES_UPDATED", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesUpdated"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesUpdated"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.LINES_INPUT.id, true, false, "LINES_INPUT", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesInput"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesInput"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.LINES_OUTPUT.id, true, false, "LINES_OUTPUT", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesOutput"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesOutput"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.LINES_REJECTED.id, true, false, "LINES_REJECTED", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.LinesRejected"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.LinesRejected"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.ERRORS.id, true, false, "ERRORS", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.Errors"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.Errors"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.INPUT_BUFFER_ROWS.id, true, false, "INPUT_BUFFER_ROWS", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.InputBufferRows"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.InputBufferRows"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.fields.add( new LogTableField(ID.OUTPUT_BUFFER_ROWS.id, true, false, "OUTPUT_BUFFER_ROWS", BaseMessages.getString(PKG, "PerformanceLogTable.FieldName.OutputBufferRows"), BaseMessages.getString(PKG, "PerformanceLogTable.FieldDescription.OutputBufferRows"), ValueMetaInterface.TYPE_INTEGER, 18) );
table.findField(ID.ID_BATCH.id).setKey(true);
table.findField(ID.LOGDATE.id).setLogDateField(true);
table.findField(ID.TRANSNAME.id).setNameField(true);
return table;
}
开发者ID:yintaoxue, 项目名称:read-open-source-code, 代码行数:26, 代码来源:PerformanceLogTable.java
示例4: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static ChannelLogTable getDefault(VariableSpace space, HasDatabasesInterface databasesInterface) {
ChannelLogTable table = new ChannelLogTable(space, databasesInterface);
table.fields.add( new LogTableField(ID.ID_BATCH.id, true, false, "ID_BATCH", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.IdBatch"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.IdBatch"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.CHANNEL_ID.id, true, false, "CHANNEL_ID", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ChannelId"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ChannelId"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.LOG_DATE.id, true, false, "LOG_DATE", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.LogDate"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.LogDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.LOGGING_OBJECT_TYPE.id, true, false, "LOGGING_OBJECT_TYPE", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ObjectType"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ObjectType"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.OBJECT_NAME.id, true, false, "OBJECT_NAME", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ObjectName"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ObjectName"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.OBJECT_COPY.id, true, false, "OBJECT_COPY", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ObjectCopy"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ObjectCopy"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.REPOSITORY_DIRECTORY.id, true, false, "REPOSITORY_DIRECTORY", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.RepositoryDirectory"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.RepositoryDirectory"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.FILENAME.id, true, false, "FILENAME", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.Filename"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.Filename"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.OBJECT_ID.id, true, false, "OBJECT_ID", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ObjectId"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ObjectId"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.OBJECT_REVISION.id, true, false, "OBJECT_REVISION", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ObjectRevision"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ObjectRevision"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.PARENT_CHANNEL_ID.id, true, false, "PARENT_CHANNEL_ID", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.ParentChannelId"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.ParentChannelId"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.ROOT_CHANNEL_ID.id, true, false, "ROOT_CHANNEL_ID", BaseMessages.getString(PKG, "ChannelLogTable.FieldName.RootChannelId"), BaseMessages.getString(PKG, "ChannelLogTable.FieldDescription.RootChannelId"), ValueMetaInterface.TYPE_STRING, 255) );
table.findField(ID.LOG_DATE.id).setLogDateField(true);
table.findField(ID.ID_BATCH.id).setKey(true);
return table;
}
开发者ID:yintaoxue, 项目名称:read-open-source-code, 代码行数:22, 代码来源:ChannelLogTable.java
示例5: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static MetricsLogTable getDefault(VariableSpace space, HasDatabasesInterface databasesInterface) {
MetricsLogTable table = new MetricsLogTable(space, databasesInterface);
table.fields.add( new LogTableField(ID.ID_BATCH.id, true, false, "ID_BATCH", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.IdBatch"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.IdBatch"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.CHANNEL_ID.id, true, false, "CHANNEL_ID", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.ChannelId"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.ChannelId"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.LOG_DATE.id, true, false, "LOG_DATE", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.LogDate"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.LogDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.METRICS_DATE.id, true, false, "METRICS_DATE", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsDate"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.METRICS_CODE.id, true, false, "METRICS_CODE", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsDescription"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsCode"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.METRICS_DESCRIPTION.id, true, false, "METRICS_DESCRIPTION", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsDescription"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsDescription"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.METRICS_SUBJECT.id, true, false, "METRICS_SUBJECT", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsSubject"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsSubject"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.METRICS_TYPE.id, true, false, "METRICS_TYPE", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsType"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsType"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.METRICS_VALUE.id, true, false, "METRICS_VALUE", BaseMessages.getString(PKG, "MetricsLogTable.FieldName.MetricsValue"), BaseMessages.getString(PKG, "MetricsLogTable.FieldDescription.MetricsValue"), ValueMetaInterface.TYPE_INTEGER, 12) );
table.findField(ID.LOG_DATE.id).setLogDateField(true);
table.findField(ID.ID_BATCH.id).setKey(true);
return table;
}
开发者ID:jjeb, 项目名称:kettle-trunk, 代码行数:19, 代码来源:MetricsLogTable.java
示例6: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static CheckpointLogTable getDefault(VariableSpace space, HasDatabasesInterface databasesInterface) {
CheckpointLogTable table = new CheckpointLogTable(space, databasesInterface);
table.fields.add( new LogTableField(ID.ID_JOB_RUN.id, true, false, "ID_JOB_RUN", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.JobRunID"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.JobRunID"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.ID_JOB.id, true, false, "ID_JOB", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.JobID"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.JobID"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.JOBNAME.id, true, false, "JOBNAME", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.JobName"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.JobName"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.NAMESPACE.id, true, false, "NAMESPACE", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.Namespace"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.Namespace"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.CHECKPOINT_NAME.id, true, false, "CHECKPOINT_NAME", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.CheckpointName"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.CheckpointName"), ValueMetaInterface.TYPE_STRING, 255) );
table.fields.add( new LogTableField(ID.CHECKPOINT_COPYNR.id, true, false, "CHECKPOINT_COPYNR", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.CheckpointCopyNr"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.CheckpointCopyNr"), ValueMetaInterface.TYPE_INTEGER, 4) );
table.fields.add( new LogTableField(ID.ATTEMPT_NR.id, true, false, "ATTEMPT_NR", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.AttemptNr"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.AttemptNr"), ValueMetaInterface.TYPE_INTEGER, 8) );
table.fields.add( new LogTableField(ID.JOB_RUN_START_DATE.id, true, false, "JOB_RUN_START_DATE", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.JobRunStartDate"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.JobRunStartDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.LOGDATE.id, true, false, "LOGDATE", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.LogDate"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.LogDate"), ValueMetaInterface.TYPE_DATE, -1) );
table.fields.add( new LogTableField(ID.RESULT_XML.id, true, false, "RESULT_XML", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.ResultXml"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.ResultXml"), ValueMetaInterface.TYPE_STRING, DatabaseMeta.CLOB_LENGTH) );
table.fields.add( new LogTableField(ID.PARAMETER_XML.id, true, false, "PARAMETER_XML", BaseMessages.getString(PKG, "CheckpointLogTable.FieldName.ParameterXml"), BaseMessages.getString(PKG, "CheckpointLogTable.FieldDescription.ParameterXml"), ValueMetaInterface.TYPE_STRING, DatabaseMeta.CLOB_LENGTH) );
table.findField(ID.ID_JOB_RUN).setKey(true);
table.findField(ID.LOGDATE).setLogDateField(true);
table.findField(ID.JOBNAME).setNameField(true);
return table;
}
开发者ID:jjeb, 项目名称:kettle-trunk, 代码行数:22, 代码来源:CheckpointLogTable.java
示例7: readDatabases
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
/**
* Read all the databases from the repository, insert into the has databases object, overwriting optionally
*
* @param TransMeta
* The transformation to load into.
* @param overWriteShared
* if an object with the same name exists, overwrite
* @throws KettleException
*/
public void readDatabases( HasDatabasesInterface transMeta, boolean overWriteShared ) throws KettleException {
try {
ObjectId[] dbids = getDatabaseIDs( false );
for ( int i = 0; i < dbids.length; i++ ) {
DatabaseMeta databaseMeta = loadDatabaseMeta( dbids[i], null ); // reads last version
if ( transMeta instanceof VariableSpace ) {
databaseMeta.shareVariablesWith( (VariableSpace) transMeta );
}
DatabaseMeta check = transMeta.findDatabase( databaseMeta.getName() ); // Check if there already is one in the
// transformation
if ( check == null || overWriteShared ) { // We only add, never overwrite database connections.
if ( databaseMeta.getName() != null ) {
transMeta.addOrReplaceDatabase( databaseMeta );
if ( !overWriteShared ) {
databaseMeta.setChanged( false );
}
}
}
}
} catch ( KettleException e ) {
throw e;
}
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:34, 代码来源:KettleFileRepository.java
示例8: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static MetricsLogTable getDefault( VariableSpace space, HasDatabasesInterface databasesInterface ) {
MetricsLogTable table = new MetricsLogTable( space, databasesInterface );
//CHECKSTYLE:LineLength:OFF
table.fields.add( new LogTableField( ID.ID_BATCH.id, true, false, "ID_BATCH", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.IdBatch" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.IdBatch" ), ValueMetaInterface.TYPE_INTEGER, 8 ) );
table.fields.add( new LogTableField( ID.CHANNEL_ID.id, true, false, "CHANNEL_ID", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.ChannelId" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.ChannelId" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.LOG_DATE.id, true, false, "LOG_DATE", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.LogDate" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.LogDate" ), ValueMetaInterface.TYPE_DATE, -1 ) );
table.fields.add( new LogTableField( ID.METRICS_DATE.id, true, false, "METRICS_DATE", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsDate" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsDate" ), ValueMetaInterface.TYPE_DATE, -1 ) );
table.fields.add( new LogTableField( ID.METRICS_CODE.id, true, false, "METRICS_CODE", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsDescription" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsCode" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.METRICS_DESCRIPTION.id, true, false, "METRICS_DESCRIPTION", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsDescription" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsDescription" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.METRICS_SUBJECT.id, true, false, "METRICS_SUBJECT", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsSubject" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsSubject" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.METRICS_TYPE.id, true, false, "METRICS_TYPE", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsType" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsType" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.METRICS_VALUE.id, true, false, "METRICS_VALUE", BaseMessages.getString( PKG, "MetricsLogTable.FieldName.MetricsValue" ), BaseMessages.getString( PKG, "MetricsLogTable.FieldDescription.MetricsValue" ), ValueMetaInterface.TYPE_INTEGER, 12 ) );
table.findField( ID.LOG_DATE.id ).setLogDateField( true );
table.findField( ID.ID_BATCH.id ).setKey( true );
return table;
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:20, 代码来源:MetricsLogTable.java
示例9: getDefault
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public static PerformanceLogTable getDefault( VariableSpace space, HasDatabasesInterface databasesInterface ) {
PerformanceLogTable table = new PerformanceLogTable( space, databasesInterface );
//CHECKSTYLE:LineLength:OFF
table.fields.add( new LogTableField( ID.ID_BATCH.id, true, false, "ID_BATCH", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.BatchID" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.BatchID" ), ValueMetaInterface.TYPE_INTEGER, 8 ) );
table.fields.add( new LogTableField( ID.SEQ_NR.id, true, false, "SEQ_NR", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.SeqNr" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.SeqNr" ), ValueMetaInterface.TYPE_INTEGER, 8 ) );
table.fields.add( new LogTableField( ID.LOGDATE.id, true, false, "LOGDATE", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LogDate" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LogDate" ), ValueMetaInterface.TYPE_DATE, -1 ) );
table.fields.add( new LogTableField( ID.TRANSNAME.id, true, false, "TRANSNAME", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.TransName" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.TransName" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.STEPNAME.id, true, false, "STEPNAME", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.StepName" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.StepName" ), ValueMetaInterface.TYPE_STRING, 255 ) );
table.fields.add( new LogTableField( ID.STEP_COPY.id, true, false, "STEP_COPY", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.StepCopy" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.StepCopy" ), ValueMetaInterface.TYPE_INTEGER, 8 ) );
table.fields.add( new LogTableField( ID.LINES_READ.id, true, false, "LINES_READ", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesRead" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesRead" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.LINES_WRITTEN.id, true, false, "LINES_WRITTEN", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesWritten" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesWritten" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.LINES_UPDATED.id, true, false, "LINES_UPDATED", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesUpdated" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesUpdated" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.LINES_INPUT.id, true, false, "LINES_INPUT", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesInput" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesInput" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.LINES_OUTPUT.id, true, false, "LINES_OUTPUT", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesOutput" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesOutput" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.LINES_REJECTED.id, true, false, "LINES_REJECTED", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.LinesRejected" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.LinesRejected" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.ERRORS.id, true, false, "ERRORS", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.Errors" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.Errors" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.INPUT_BUFFER_ROWS.id, true, false, "INPUT_BUFFER_ROWS", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.InputBufferRows" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.InputBufferRows" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.fields.add( new LogTableField( ID.OUTPUT_BUFFER_ROWS.id, true, false, "OUTPUT_BUFFER_ROWS", BaseMessages.getString( PKG, "PerformanceLogTable.FieldName.OutputBufferRows" ), BaseMessages.getString( PKG, "PerformanceLogTable.FieldDescription.OutputBufferRows" ), ValueMetaInterface.TYPE_INTEGER, 18 ) );
table.findField( ID.ID_BATCH.id ).setKey( true );
table.findField( ID.LOGDATE.id ).setLogDateField( true );
table.findField( ID.TRANSNAME.id ).setNameField( true );
return table;
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:27, 代码来源:PerformanceLogTable.java
示例10: dupeConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void dupeConnection( HasDatabasesInterface hasDatabasesInterface, DatabaseMeta databaseMeta ) {
String name = databaseMeta.getName();
int pos = hasDatabasesInterface.indexOfDatabase( databaseMeta );
if ( databaseMeta != null ) {
DatabaseMeta databaseMetaCopy = (DatabaseMeta) databaseMeta.clone();
String dupename = BaseMessages.getString( PKG, "Spoon.Various.DupeName" ) + name;
databaseMetaCopy.setName( dupename );
getDatabaseDialog().setDatabaseMeta( databaseMetaCopy );
String newname = getDatabaseDialog().open();
if ( newname != null ) { // null: CANCEL
databaseMetaCopy.verifyAndModifyDatabaseName( hasDatabasesInterface.getDatabases(), name );
hasDatabasesInterface.addDatabase( pos + 1, databaseMetaCopy );
spoon.addUndoNew(
(UndoInterface) hasDatabasesInterface, new DatabaseMeta[] { (DatabaseMeta) databaseMetaCopy.clone() },
new int[] { pos + 1 } );
saveConnection( databaseMetaCopy, Const.VERSION_COMMENT_EDIT_VERSION );
spoon.refreshTree();
}
}
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:24, 代码来源:SpoonDBDelegate.java
示例11: delConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void delConnection() {
if ( RepositorySecurityUI.verifyOperations( shell, rep, RepositoryOperation.DELETE_DATABASE ) ) {
return;
}
final DatabaseMeta databaseMeta = (DatabaseMeta) selectionObject;
MessageBox mb = new MessageBox( shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION );
mb.setMessage( BaseMessages.getString(
PKG, "Spoon.ExploreDB.DeleteConnectionAsk.Message", databaseMeta.getName() ) );
mb.setText( BaseMessages.getString( PKG, "Spoon.ExploreDB.DeleteConnectionAsk.Title" ) );
int response = mb.open();
if ( response != SWT.YES ) {
return;
}
final HasDatabasesInterface hasDatabasesInterface = (HasDatabasesInterface) selectionObjectParent;
delegates.db.delConnection( hasDatabasesInterface, databaseMeta );
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:20, 代码来源:Spoon.java
示例12: getActiveDatabases
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public List<DatabaseMeta> getActiveDatabases() {
Map<String, DatabaseMeta> map = new Hashtable<>();
HasDatabasesInterface hasDatabasesInterface = getActiveHasDatabasesInterface();
if ( hasDatabasesInterface != null ) {
for ( int i = 0; i < hasDatabasesInterface.nrDatabases(); i++ ) {
map.put( hasDatabasesInterface.getDatabase( i ).getName(), hasDatabasesInterface.getDatabase( i ) );
}
}
if ( rep != null ) {
try {
List<DatabaseMeta> repDBs = rep.readDatabases();
for ( DatabaseMeta databaseMeta : repDBs ) {
map.put( databaseMeta.getName(), databaseMeta );
}
} catch ( Exception e ) {
log.logError( "Unexpected error reading databases from the repository: " + e.toString() );
log.logError( Const.getStackTracker( e ) );
}
}
List<DatabaseMeta> databases = new ArrayList<>();
databases.addAll( map.values() );
return databases;
}
开发者ID:pentaho, 项目名称:pentaho-kettle, 代码行数:27, 代码来源:Spoon.java
示例13: editConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void editConnection(DatabaseMeta databaseMeta)
{
HasDatabasesInterface hasDatabasesInterface = spoon.getActiveHasDatabasesInterface();
if (hasDatabasesInterface == null)
return; // program error, exit just to make sure.
DatabaseMeta before = (DatabaseMeta) databaseMeta.clone();
// DatabaseDialog con = new DatabaseDialog(spoon.getShell(), databaseMeta);
XulDatabaseDialog con = new XulDatabaseDialog(spoon.getShell(), databaseMeta);
con.setDatabases(hasDatabasesInterface.getDatabases());
String newname = con.open();
if (!Const.isEmpty(newname)) // null: CANCEL
{
databaseMeta = con.getDatabaseMeta();
// newname =
// db.verifyAndModifyDatabaseName(transMeta.getDatabases(), name);
// Store undo/redo information
DatabaseMeta after = (DatabaseMeta) databaseMeta.clone();
spoon.addUndoChange((UndoInterface) hasDatabasesInterface, new DatabaseMeta[] { before },
new DatabaseMeta[] { after }, new int[] { hasDatabasesInterface
.indexOfDatabase(databaseMeta) });
saveConnection(databaseMeta);
spoon.refreshTree();
}
spoon.setShellText();
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:31, 代码来源:SpoonDBDelegate.java
示例14: dupeConnection
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void dupeConnection(HasDatabasesInterface hasDatabasesInterface, DatabaseMeta databaseMeta)
{
String name = databaseMeta.getName();
int pos = hasDatabasesInterface.indexOfDatabase(databaseMeta);
if (databaseMeta != null)
{
DatabaseMeta databaseMetaCopy = (DatabaseMeta) databaseMeta.clone();
String dupename = Messages.getString("Spoon.Various.DupeName") + name; // "(copy
// of)
// "
databaseMetaCopy.setName(dupename);
DatabaseDialog con = new DatabaseDialog(spoon.getShell(), databaseMetaCopy);
String newname = con.open();
if (newname != null) // null: CANCEL
{
databaseMetaCopy.verifyAndModifyDatabaseName(hasDatabasesInterface.getDatabases(), name);
hasDatabasesInterface.addDatabase(pos + 1, databaseMetaCopy);
spoon
.addUndoNew((UndoInterface) hasDatabasesInterface,
new DatabaseMeta[] { (DatabaseMeta) databaseMetaCopy.clone() },
new int[] { pos + 1 });
saveConnection(databaseMetaCopy);
spoon.refreshTree();
}
}
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:28, 代码来源:SpoonDBDelegate.java
示例15: exploreDB
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void exploreDB(DatabaseMeta databaseMeta)
{
List<DatabaseMeta> databases = null;
HasDatabasesInterface activeHasDatabasesInterface = spoon.getActiveHasDatabasesInterface();
if (activeHasDatabasesInterface != null)
databases = activeHasDatabasesInterface.getDatabases();
DatabaseExplorerDialog std = new DatabaseExplorerDialog(spoon.getShell(), SWT.NONE, databaseMeta,
databases, true);
std.open();
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:12, 代码来源:SpoonDBDelegate.java
示例16: exploreDatabase
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public void exploreDatabase() {
// Show a minimal window to allow you to quickly select the database connection to explore
//
List<DatabaseMeta> databases = new ArrayList<DatabaseMeta>();
HasDatabasesInterface databasesInterface = getActiveHasDatabasesInterface();
if (databasesInterface != null) {
databases.addAll(databasesInterface.getDatabases());
}
if (rep != null) {
try {
databases.addAll(rep.readDatabases());
} catch (KettleException e) {
log.logError(toString(), "Unexpected repository error", e);
}
}
if (databases.size() == 0)
return;
// OK, get a list of all the database names...
//
String[] databaseNames = new String[databases.size()];
for (int i = 0; i < databases.size(); i++)
databaseNames[i] = databases.get(i).getName();
// show the shell...
//
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, databaseNames, Messages.getString("Spoon.ExploreDB.SelectDB.Title"), Messages.getString("Spoon.ExploreDB.SelectDB.Message"));
String name = dialog.open();
if (name != null) {
selectionObject = DatabaseMeta.findDatabase(databases, name);
exploreDB();
}
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:37, 代码来源:Spoon.java
示例17: getActiveHasDatabasesInterface
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
/**
* @return Either a TransMeta or JobMeta object
*/
public HasDatabasesInterface getActiveHasDatabasesInterface() {
TransMeta transMeta = getActiveTransformation();
if (transMeta != null)
return transMeta;
return getActiveJob();
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:10, 代码来源:Spoon.java
示例18: createDatabaseWizard
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
/**
* Shows a wizard that creates a new database connection...
*
*/
public void createDatabaseWizard() {
HasDatabasesInterface hasDatabasesInterface = getActiveHasDatabasesInterface();
if (hasDatabasesInterface == null)
return; // nowhere to put the new database
CreateDatabaseWizard cdw = new CreateDatabaseWizard();
DatabaseMeta newDBInfo = cdw.createAndRunDatabaseWizard(shell, props, hasDatabasesInterface.getDatabases());
if (newDBInfo != null) { // finished
hasDatabasesInterface.addDatabase(newDBInfo);
refreshTree();
refreshGraph();
}
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:18, 代码来源:Spoon.java
示例19: getActiveDatabases
import org.pentaho.di.trans.HasDatabasesInterface; //导入依赖的package包/类
public List<DatabaseMeta> getActiveDatabases() {
Map<String, DatabaseMeta> map = new Hashtable<String, DatabaseMeta>();
HasDatabasesInterface hasDatabasesInterface = getActiveHasDatabasesInterface();
if (hasDatabasesInterface != null) {
for (int i = 0; i < hasDatabasesInterface.nrDatabases(); i++) {
map.put(hasDatabasesInterface.getDatabase(i).getName(), hasDatabasesInterface.getDatabase(i));
}
}
if (rep != null) {
try {
List<DatabaseMeta> repDBs = rep.getDatabases();
for (int i = 0; i < repDBs.size(); i++) {
DatabaseMeta databaseMeta = (DatabaseMeta) repDBs.get(i);
map.put(databaseMeta.getName(), databaseMeta);
}
} catch (Exception e) {
log.logError(toString(), "Unexpected error reading databases from the repository: " + e.toString());
log.logError(toString(), Const.getStackTracker(e));
}
}
List<DatabaseMeta> databases = new ArrayList<DatabaseMeta>();
databases.addAll(map.values());
return databases;
}
开发者ID:icholy, 项目名称:geokettle-2.0, 代码行数:28, 代码来源:Spoon.java
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18982| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9920| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8302| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8667| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8600| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9611| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8590| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7974| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8604| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7516| 2022-11-06
请发表评论