It's all about the answers!

Ask a question

Extending the Data Warehouse


Robert Farrugia (5614) | asked Mar 17 '08, 6:46 a.m.
Following the instructions within the tutorial to extend the report data warehouse we are having problems with the following method: createTableDescriptors()

The tutorial states that the method should be overriden as follows:

protected ITableDescriptor[] createTableDescriptors()
{
ITableDescriptor numbersStorageTable =
createNumbersStorageFact();
return new ITableDescriptor[] { numbersStorageTable };
}

However, the version of Jazz we are using (v JazzTeamServer-1.0M5a) defines the method as follows:

protected void createTableDescriptors() throws TeamRepositoryException
{
// TODO Auto-generated method stub
}

Has anyone encountered this same problem with the clash of return types? Any suggestions please?

One answer



permanent link
James Moody (3.3k24) | answered Mar 17 '08, 10:25 a.m.
JAZZ DEVELOPER
Hi,

The data warehouse API changed slightly since the article was written.

- I will update the page in the wiki so that it reflects the current
codebase.
- As you've seen, createTableDescriptors() no longer needs to return the
tables, as all the addition happens when you call the
createTableDescriptor() method. Here's an updated version from our
example (NumbersTableDescriptorFactory):

public class NumbersTableDescriptorFactory extends
AbstractTableDescriptorFactory {

protected void createTableDescriptors() throws
TeamRepositoryException {
createNumbersStorageFact();
}

private ITableDescriptor createNumbersStorageFact()
throws TeamRepositoryException {
IFieldDescriptor id = createFieldDescriptor(
ISnapshotService.FACT_ID_COLUMN, FieldKind.LONG,
FieldFlags.DEFAULT);
IFieldDescriptor timeId = createFieldDescriptor(
ISnapshotService.TIME_ID_COLUMN, FieldKind.LONG,
FieldFlags.QUERYABLE);
IFieldDescriptor continent = createFieldDescriptor(
INumbersSnapshotService.CONTINENT_COLUMN, FieldKind.STRING,
FieldFlags.QUERYABLE | FieldFlags.PARAMETER |
FieldFlags.SELECT);
IFieldDescriptor number = createFieldDescriptor(
INumbersSnapshotService.NUMBER_COLUMN, FieldKind.INTEGER,
FieldFlags.SELECT);
timeId.setReference(getTableDescriptor(
ICommonSnapshotService.SNAPSHOT_NAME,
ICommonSnapshotService.TIME_DIMENSION));
ITableDescriptor numbersStorageTable = createTableDescriptor(
INumbersSnapshotService.NUMBERS_FACT_TABLE,
new IFieldDescriptor[] { id, timeId, continent, number
}, id);
return numbersStorageTable;
}
}

Hope this helps.

james
Jazz Reports Team Lead

farrugiarobert wrote:
Following the instructions within the tutorial to extend the report
data warehouse we are having problems with the following method:
createTableDescriptors()

The tutorial states that the method should be overriden as follows:

protected ITableDescriptor[] createTableDescriptors()
{
ITableDescriptor numbersStorageTable =
createNumbersStorageFact();
return new ITableDescriptor[] { numbersStorageTable };
}

However, the version of Jazz we are using (v JazzTeamServer-1.0M5a)
defines the method as follows:

protected void createTableDescriptors() throws TeamRepositoryException

{
// TODO Auto-generated method stub
}

Has anyone encountered this same problem with the clash of return
types? Any suggestions please?

Your answer


Register or to post your answer.