Search in sources :

Example 1 with KettleDatabaseRepositoryTransDelegate

use of org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate in project pentaho-kettle by pentaho.

the class KettleDatabaseRepository method init.

private void init() {
    // Create the delegates...
    // 
    this.transDelegate = new KettleDatabaseRepositoryTransDelegate(this);
    this.jobDelegate = new KettleDatabaseRepositoryJobDelegate(this);
    this.databaseDelegate = new KettleDatabaseRepositoryDatabaseDelegate(this);
    this.slaveServerDelegate = new KettleDatabaseRepositorySlaveServerDelegate(this);
    this.clusterSchemaDelegate = new KettleDatabaseRepositoryClusterSchemaDelegate(this);
    this.partitionSchemaDelegate = new KettleDatabaseRepositoryPartitionSchemaDelegate(this);
    this.directoryDelegate = new KettleDatabaseRepositoryDirectoryDelegate(this);
    this.connectionDelegate = new KettleDatabaseRepositoryConnectionDelegate(this, repositoryMeta.getConnection());
    this.userDelegate = new KettleDatabaseRepositoryUserDelegate(this);
    this.conditionDelegate = new KettleDatabaseRepositoryConditionDelegate(this);
    this.valueDelegate = new KettleDatabaseRepositoryValueDelegate(this);
    this.notePadDelegate = new KettleDatabaseRepositoryNotePadDelegate(this);
    this.stepDelegate = new KettleDatabaseRepositoryStepDelegate(this);
    this.jobEntryDelegate = new KettleDatabaseRepositoryJobEntryDelegate(this);
    this.metaStoreDelegate = new KettleDatabaseRepositoryMetaStoreDelegate(this);
    this.creationHelper = new KettleDatabaseRepositoryCreationHelper(this);
}
Also used : KettleDatabaseRepositoryStepDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryStepDelegate) KettleDatabaseRepositoryDatabaseDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryDatabaseDelegate) KettleDatabaseRepositoryDirectoryDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryDirectoryDelegate) KettleDatabaseRepositoryConnectionDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate) KettleDatabaseRepositoryClusterSchemaDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryClusterSchemaDelegate) KettleDatabaseRepositoryTransDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate) KettleDatabaseRepositoryPartitionSchemaDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryPartitionSchemaDelegate) KettleDatabaseRepositorySlaveServerDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositorySlaveServerDelegate) KettleDatabaseRepositoryValueDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryValueDelegate) KettleDatabaseRepositoryMetaStoreDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryMetaStoreDelegate) KettleDatabaseRepositoryJobDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryJobDelegate) KettleDatabaseRepositoryJobEntryDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryJobEntryDelegate) KettleDatabaseRepositoryUserDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryUserDelegate) KettleDatabaseRepositoryConditionDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConditionDelegate) KettleDatabaseRepositoryNotePadDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryNotePadDelegate)

Example 2 with KettleDatabaseRepositoryTransDelegate

use of org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate in project pentaho-kettle by pentaho.

the class KettleDatabaseRepository_GetObjectInformation_Test method getObjectInformation_ExistingTrans_IsDeletedFlagNotSet.

@Test
public void getObjectInformation_ExistingTrans_IsDeletedFlagNotSet() throws Exception {
    KettleDatabaseRepositoryTransDelegate transDelegate = spy(new KettleDatabaseRepositoryTransDelegate(repository));
    RowMeta meta = createMetaForJob();
    Object[] values = new Object[meta.size()];
    values[Arrays.asList(meta.getFieldNames()).indexOf(KettleDatabaseRepositoryBase.FIELD_TRANSFORMATION_NAME)] = EXISTING_ID;
    doReturn(new RowMetaAndData(meta, values)).when(transDelegate).getTransformation(new StringObjectId(EXISTING_ID));
    assertIsDeletedNotSet_ForExistingObject(transDelegate, null, RepositoryObjectType.TRANSFORMATION);
}
Also used : RowMetaAndData(org.pentaho.di.core.RowMetaAndData) RowMeta(org.pentaho.di.core.row.RowMeta) RepositoryObject(org.pentaho.di.repository.RepositoryObject) StringObjectId(org.pentaho.di.repository.StringObjectId) KettleDatabaseRepositoryTransDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate) Test(org.junit.Test)

Example 3 with KettleDatabaseRepositoryTransDelegate

use of org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate in project pentaho-kettle by pentaho.

the class KettleDatabaseRepository_GetObjectInformation_Test method getObjectInformation_AbsentTrans_IsDeletedFlagSet.

@Test
public void getObjectInformation_AbsentTrans_IsDeletedFlagSet() throws Exception {
    KettleDatabaseRepositoryTransDelegate transDelegate = spy(new KettleDatabaseRepositoryTransDelegate(repository));
    RowMeta meta = createMetaForTrans();
    doReturn(new RowMetaAndData(meta, new Object[meta.size()])).when(transDelegate).getTransformation(new StringObjectId(ABSENT_ID));
    assertIsDeletedSet_ForAbsentObject(transDelegate, null, RepositoryObjectType.TRANSFORMATION);
}
Also used : RowMetaAndData(org.pentaho.di.core.RowMetaAndData) RowMeta(org.pentaho.di.core.row.RowMeta) RepositoryObject(org.pentaho.di.repository.RepositoryObject) StringObjectId(org.pentaho.di.repository.StringObjectId) KettleDatabaseRepositoryTransDelegate(org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate) Test(org.junit.Test)

Aggregations

KettleDatabaseRepositoryTransDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate)3 Test (org.junit.Test)2 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)2 RowMeta (org.pentaho.di.core.row.RowMeta)2 RepositoryObject (org.pentaho.di.repository.RepositoryObject)2 StringObjectId (org.pentaho.di.repository.StringObjectId)2 KettleDatabaseRepositoryClusterSchemaDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryClusterSchemaDelegate)1 KettleDatabaseRepositoryConditionDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConditionDelegate)1 KettleDatabaseRepositoryConnectionDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate)1 KettleDatabaseRepositoryDatabaseDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryDatabaseDelegate)1 KettleDatabaseRepositoryDirectoryDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryDirectoryDelegate)1 KettleDatabaseRepositoryJobDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryJobDelegate)1 KettleDatabaseRepositoryJobEntryDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryJobEntryDelegate)1 KettleDatabaseRepositoryMetaStoreDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryMetaStoreDelegate)1 KettleDatabaseRepositoryNotePadDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryNotePadDelegate)1 KettleDatabaseRepositoryPartitionSchemaDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryPartitionSchemaDelegate)1 KettleDatabaseRepositorySlaveServerDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositorySlaveServerDelegate)1 KettleDatabaseRepositoryStepDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryStepDelegate)1 KettleDatabaseRepositoryUserDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryUserDelegate)1 KettleDatabaseRepositoryValueDelegate (org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryValueDelegate)1