本文整理汇总了Java中org.pentaho.di.repository.RepositoryDirectoryInterface.setObjectId方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryDirectoryInterface.setObjectId方法的具体用法?Java RepositoryDirectoryInterface.setObjectId怎么用?Java RepositoryDirectoryInterface.setObjectId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.RepositoryDirectoryInterface
的用法示例。
在下文中一共展示了RepositoryDirectoryInterface.setObjectId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveRepositoryDirectory
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public void saveRepositoryDirectory(RepositoryDirectoryInterface dir) throws KettleException {
try {
ObjectId id_directory_parent = null;
if (dir.getParent() != null) {
id_directory_parent = dir.getParent().getObjectId();
}
dir.setObjectId(insertDirectory(id_directory_parent, dir));
log.logDetailed("New id of directory = " + dir.getObjectId());
repository.commit();
} catch (Exception e) {
throw new KettleException("Unable to save directory [" + dir + "] in the repository", e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:KettleDatabaseRepositoryDirectoryDelegate.java
示例2: saveRepositoryDirectory
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public void saveRepositoryDirectory(RepositoryDirectoryInterface dir) throws KettleException {
try
{
String filename = calcDirectoryName(dir);
ObjectId objectId = new StringObjectId(calcRelativeElementDirectory(dir));
FileObject fileObject = KettleVFS.getFileObject(filename);
fileObject.createFolder(); // also create parents
dir.setObjectId(objectId);
log.logDetailed("New id of directory = "+dir.getObjectId());
}
catch(Exception e)
{
throw new KettleException("Unable to save directory ["+dir+"] in the repository", e);
}
}