Class KettleDatabaseRepositoryTransDelegate
- java.lang.Object
-
- org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryBaseDelegate
-
- org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryTransDelegate
-
public class KettleDatabaseRepositoryTransDelegate extends KettleDatabaseRepositoryBaseDelegate
-
-
Field Summary
Fields Modifier and Type Field Description static String
TRANS_ATTRIBUTE_PREFIX
-
Fields inherited from class org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryBaseDelegate
log, repository
-
-
Constructor Summary
Constructors Constructor Description KettleDatabaseRepositoryTransDelegate(KettleDatabaseRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countTransParameter(org.pentaho.di.repository.ObjectId id_transformation)
Count the number of parameters of a transaction.boolean
existsTransMeta(String transname, org.pentaho.di.repository.RepositoryDirectory directory)
boolean
existsTransMeta(String name, org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory, org.pentaho.di.repository.RepositoryObjectType objectType)
org.pentaho.di.repository.ObjectId
getDependencyID(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_database, String tablename)
int
getNrTransDependencies(org.pentaho.di.repository.ObjectId id_transformation)
int
getNrTransformations(org.pentaho.di.repository.ObjectId id_directory)
int
getNrTransHops(org.pentaho.di.repository.ObjectId id_transformation)
boolean
getTransAttributeBoolean(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code)
long
getTransAttributeInteger(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code)
String
getTransAttributeString(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code)
org.pentaho.di.core.RowMetaAndData
getTransDependency(org.pentaho.di.repository.ObjectId id_dependency)
org.pentaho.di.core.RowMetaAndData
getTransformation(org.pentaho.di.repository.ObjectId id_transformation)
org.pentaho.di.repository.ObjectId
getTransformationID(String name, org.pentaho.di.repository.ObjectId id_directory)
String[]
getTransformationsWithIDList(List<Object[]> list, org.pentaho.di.core.row.RowMetaInterface rowMeta)
String[]
getTransformationsWithIDList(org.pentaho.di.repository.ObjectId[] ids)
org.pentaho.di.core.RowMetaAndData
getTransHop(org.pentaho.di.repository.ObjectId id_trans_hop)
org.pentaho.di.repository.ObjectId
getTransHopID(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_step_from, org.pentaho.di.repository.ObjectId id_step_to)
org.pentaho.di.repository.ObjectId[]
getTransHopIDs(org.pentaho.di.repository.ObjectId id_transformation)
String
getTransParameterDefault(org.pentaho.di.repository.ObjectId id_transformation, int nr)
Get a transformation parameter default.String
getTransParameterDescription(org.pentaho.di.repository.ObjectId id_transformation, int nr)
Get a transformation parameter description.String
getTransParameterKey(org.pentaho.di.repository.ObjectId id_transformation, int nr)
Get a transformation parameter key.void
insertTransParameter(org.pentaho.di.repository.ObjectId id_transformation, long nr, String key, String defValue, String description)
Insert a parameter for a transformation in the repository.TransDependency
loadTransDependency(org.pentaho.di.repository.ObjectId id_dependency, List<org.pentaho.di.core.database.DatabaseMeta> databases)
TransMeta
loadTransformation(TransMeta transMeta, String transname, org.pentaho.di.repository.RepositoryDirectoryInterface repdir, org.pentaho.di.core.ProgressMonitorListener monitor, boolean setInternalVariables)
Read a transformation with a certain name from a repositoryTransHopMeta
loadTransHopMeta(org.pentaho.di.repository.ObjectId id_trans_hop, List<StepMeta> steps)
void
moveTransformation(String transname, org.pentaho.di.repository.ObjectId id_directory_from, org.pentaho.di.repository.ObjectId id_directory_to)
void
readClusters(TransMeta transMeta, boolean overWriteShared)
Read the clusters in the repository and add them to this transformation if they are not yet present.void
readDatabases(TransMeta transMeta, boolean overWriteShared)
Read all the databases from the repository, insert into the TransMeta object, overwriting optionallyvoid
readPartitionSchemas(TransMeta transMeta, boolean overWriteShared)
Read the partitions in the repository and add them to this transformation if they are not yet present.void
readSlaves(TransMeta transMeta, boolean overWriteShared)
Read the slave servers in the repository and add them to this transformation if they are not yet present.SharedObjects
readTransSharedObjects(TransMeta transMeta)
void
renameTransformation(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.RepositoryDirectoryInterface newParentDir, String newname)
void
saveTransDependency(TransDependency transDependency, org.pentaho.di.repository.ObjectId id_transformation)
void
saveTransformation(TransMeta transMeta, String versionComment, org.pentaho.di.core.ProgressMonitorListener monitor, boolean overwriteAssociated)
Saves the transformation to a repository.void
saveTransHopMeta(TransHopMeta transHopMeta, org.pentaho.di.repository.ObjectId id_transformation)
void
saveTransParameters(TransMeta transMeta)
Save the parameters of this transformation to the repository.-
Methods inherited from class org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryBaseDelegate
quote, quoteTable
-
-
-
-
Field Detail
-
TRANS_ATTRIBUTE_PREFIX
public static final String TRANS_ATTRIBUTE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KettleDatabaseRepositoryTransDelegate
public KettleDatabaseRepositoryTransDelegate(KettleDatabaseRepository repository)
-
-
Method Detail
-
getTransformation
public org.pentaho.di.core.RowMetaAndData getTransformation(org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransHop
public org.pentaho.di.core.RowMetaAndData getTransHop(org.pentaho.di.repository.ObjectId id_trans_hop) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransDependency
public org.pentaho.di.core.RowMetaAndData getTransDependency(org.pentaho.di.repository.ObjectId id_dependency) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
existsTransMeta
public boolean existsTransMeta(String name, org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory, org.pentaho.di.repository.RepositoryObjectType objectType) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransformationID
public org.pentaho.di.repository.ObjectId getTransformationID(String name, org.pentaho.di.repository.ObjectId id_directory) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransHopID
public org.pentaho.di.repository.ObjectId getTransHopID(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_step_from, org.pentaho.di.repository.ObjectId id_step_to) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getDependencyID
public org.pentaho.di.repository.ObjectId getDependencyID(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_database, String tablename) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
saveTransformation
public void saveTransformation(TransMeta transMeta, String versionComment, org.pentaho.di.core.ProgressMonitorListener monitor, boolean overwriteAssociated) throws org.pentaho.di.core.exception.KettleException
Saves the transformation to a repository.- Parameters:
transMeta
- the transformation metadata to storemonitor
- the way we report progress to the user, can be null if no UI is presentoverwriteAssociated
- Overwrite existing object(s)?- Throws:
org.pentaho.di.core.exception.KettleException
- if an error occurs.
-
saveTransParameters
public void saveTransParameters(TransMeta transMeta) throws org.pentaho.di.core.exception.KettleException
Save the parameters of this transformation to the repository.- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error. TODO: Move this code over to the Repository class for refactoring...
-
loadTransformation
public TransMeta loadTransformation(TransMeta transMeta, String transname, org.pentaho.di.repository.RepositoryDirectoryInterface repdir, org.pentaho.di.core.ProgressMonitorListener monitor, boolean setInternalVariables) throws org.pentaho.di.core.exception.KettleException
Read a transformation with a certain name from a repository- Parameters:
transname
- The name of the transformation.repdir
- the path to the repository directorymonitor
- The progress monitor to display the progress of the file-open operation in a dialogsetInternalVariables
- true if you want to set the internal variables based on this transformation information- Throws:
org.pentaho.di.core.exception.KettleException
-
countTransParameter
public int countTransParameter(org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
Count the number of parameters of a transaction.- Parameters:
id_transformation
- transformation id- Returns:
- the number of transactions
- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error.
-
getTransParameterKey
public String getTransParameterKey(org.pentaho.di.repository.ObjectId id_transformation, int nr) throws org.pentaho.di.core.exception.KettleException
Get a transformation parameter key. You can count the number of parameters up front.- Parameters:
id_transformation
- transformation idnr
- number of the parameter- Returns:
- they key/name of specified parameter
- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error.
-
getTransParameterDefault
public String getTransParameterDefault(org.pentaho.di.repository.ObjectId id_transformation, int nr) throws org.pentaho.di.core.exception.KettleException
Get a transformation parameter default. You can count the number of parameters up front.- Parameters:
id_transformation
- transformation idnr
- number of the parameter- Returns:
- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error.
-
getTransParameterDescription
public String getTransParameterDescription(org.pentaho.di.repository.ObjectId id_transformation, int nr) throws org.pentaho.di.core.exception.KettleException
Get a transformation parameter description. You can count the number of parameters up front.- Parameters:
id_transformation
- transformation idnr
- number of the parameter- Returns:
- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error.
-
insertTransParameter
public void insertTransParameter(org.pentaho.di.repository.ObjectId id_transformation, long nr, String key, String defValue, String description) throws org.pentaho.di.core.exception.KettleException
Insert a parameter for a transformation in the repository.- Parameters:
id_transformation
- transformation idnr
- number of the parameter to insertkey
- key to insertdefValue
- default valuedescription
- description to insert- Throws:
org.pentaho.di.core.exception.KettleException
- Upon any error.
-
readDatabases
public void readDatabases(TransMeta transMeta, boolean overWriteShared) throws org.pentaho.di.core.exception.KettleException
Read all the databases from the repository, insert into the TransMeta object, overwriting optionally- Parameters:
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwrite- Throws:
org.pentaho.di.core.exception.KettleException
-
readClusters
public void readClusters(TransMeta transMeta, boolean overWriteShared) throws org.pentaho.di.core.exception.KettleException
Read the clusters in the repository and add them to this transformation if they are not yet present.- Parameters:
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwrite- Throws:
org.pentaho.di.core.exception.KettleException
-
readPartitionSchemas
public void readPartitionSchemas(TransMeta transMeta, boolean overWriteShared) throws org.pentaho.di.core.exception.KettleException
Read the partitions in the repository and add them to this transformation if they are not yet present.- Parameters:
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwrite- Throws:
org.pentaho.di.core.exception.KettleException
-
readSlaves
public void readSlaves(TransMeta transMeta, boolean overWriteShared) throws org.pentaho.di.core.exception.KettleException
Read the slave servers in the repository and add them to this transformation if they are not yet present.- Parameters:
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwrite- Throws:
org.pentaho.di.core.exception.KettleException
-
loadTransDependency
public TransDependency loadTransDependency(org.pentaho.di.repository.ObjectId id_dependency, List<org.pentaho.di.core.database.DatabaseMeta> databases) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
saveTransDependency
public void saveTransDependency(TransDependency transDependency, org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
saveTransHopMeta
public void saveTransHopMeta(TransHopMeta transHopMeta, org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
loadTransHopMeta
public TransHopMeta loadTransHopMeta(org.pentaho.di.repository.ObjectId id_trans_hop, List<StepMeta> steps) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getNrTransformations
public int getNrTransformations(org.pentaho.di.repository.ObjectId id_directory) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getNrTransHops
public int getNrTransHops(org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getNrTransDependencies
public int getNrTransDependencies(org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransformationsWithIDList
public String[] getTransformationsWithIDList(List<Object[]> list, org.pentaho.di.core.row.RowMetaInterface rowMeta) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransformationsWithIDList
public String[] getTransformationsWithIDList(org.pentaho.di.repository.ObjectId[] ids) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
existsTransMeta
public boolean existsTransMeta(String transname, org.pentaho.di.repository.RepositoryDirectory directory) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransHopIDs
public org.pentaho.di.repository.ObjectId[] getTransHopIDs(org.pentaho.di.repository.ObjectId id_transformation) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransAttributeBoolean
public boolean getTransAttributeBoolean(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransAttributeString
public String getTransAttributeString(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getTransAttributeInteger
public long getTransAttributeInteger(org.pentaho.di.repository.ObjectId id_transformation, int nr, String code) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
readTransSharedObjects
public SharedObjects readTransSharedObjects(TransMeta transMeta) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
moveTransformation
public void moveTransformation(String transname, org.pentaho.di.repository.ObjectId id_directory_from, org.pentaho.di.repository.ObjectId id_directory_to) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
renameTransformation
public void renameTransformation(org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.RepositoryDirectoryInterface newParentDir, String newname) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-