本文整理汇总了Java中org.pentaho.di.repository.LongObjectId.getId方法的典型用法代码示例。如果您正苦于以下问题:Java LongObjectId.getId方法的具体用法?Java LongObjectId.getId怎么用?Java LongObjectId.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.LongObjectId
的用法示例。
在下文中一共展示了LongObjectId.getId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getElementTypes
import org.pentaho.di.repository.LongObjectId; //导入方法依赖的package包/类
public Collection<RowMetaAndData> getElementTypes( LongObjectId namespaceId ) throws KettleDatabaseException,
KettleValueException {
List<RowMetaAndData> attrs = new ArrayList<RowMetaAndData>();
String sql =
"SELECT * FROM "
+ quoteTable( KettleDatabaseRepository.TABLE_R_ELEMENT_TYPE ) + " WHERE "
+ quote( KettleDatabaseRepository.FIELD_ELEMENT_TYPE_ID_NAMESPACE ) + " = " + namespaceId.getId();
List<Object[]> rows = repository.connectionDelegate.getRows( sql, 0 );
for ( Object[] row : rows ) {
RowMetaAndData rowWithMeta = new RowMetaAndData( repository.connectionDelegate.getReturnRowMeta(), row );
long id = rowWithMeta.getInteger( quote( KettleDatabaseRepository.FIELD_ELEMENT_TYPE_ID_ELEMENT_TYPE ), 0 );
if ( id > 0 ) {
attrs.add( rowWithMeta );
}
}
return attrs;
}
示例2: getElements
import org.pentaho.di.repository.LongObjectId; //导入方法依赖的package包/类
public Collection<RowMetaAndData> getElements( LongObjectId elementTypeId ) throws KettleDatabaseException,
KettleValueException {
List<RowMetaAndData> attrs = new ArrayList<RowMetaAndData>();
String sql =
"SELECT * FROM "
+ quoteTable( KettleDatabaseRepository.TABLE_R_ELEMENT ) + " WHERE "
+ quote( KettleDatabaseRepository.FIELD_ELEMENT_ID_ELEMENT_TYPE ) + " = " + elementTypeId.getId();
List<Object[]> rows = repository.connectionDelegate.getRows( sql, 0 );
for ( Object[] row : rows ) {
RowMetaAndData rowWithMeta = new RowMetaAndData( repository.connectionDelegate.getReturnRowMeta(), row );
long id = rowWithMeta.getInteger( quote( KettleDatabaseRepository.FIELD_ELEMENT_ID_ELEMENT_TYPE ), 0 );
if ( id > 0 ) {
attrs.add( rowWithMeta );
}
}
return attrs;
}