Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » ODA with POJOs
ODA with POJOs [message #590595] Thu, 20 March 2008 14:54
Peter Dunkel is currently offline Peter DunkelFriend
Messages: 3
Registered: July 2009
Junior Member

I have to develop a framework for printing.

For rendering I am using BIRT, and to get the data I am using ODA.

The reports have to print the data from on one or many software-components,
not from a database!
Some components are developed, the most will be developed in the next years
from different teams.

The team, that is developing a component, can provide some classes of POJOs
with the data for printing.

The enduser can create or modify the reports. So I think, a "Scripted Data
Source" with many JavaScript is not a good idea.

So the POJOs have for every field, that can be printed on a report, a
special getter, example:
public String ptoGetterDayOfBirth()
to get the birthday for the person as a formated string.

With reflection I can get the "fieldname" (DayOfBirth) and the "fieldtype"

The POJO classes are in the project of the component.
In the "PtoDataBase" class the POJOs will be instanced at startup.
The "PtoDataBase" provides an array of each POJO like a database table.
If a report have to print a "database table", BIRT will ask for a ResultSet
and the "PtoDataBase" will ask the component to deliver the data.

Because there will be developed many POJO classes, I can not put the
classfiles or the name of the classes into to the plug-in.

I have create an "ODA Runtime Driver Plug-in" and an "ODA Designer Plug-in"
with the wizards and modify them.

It works, but I have some problems:

In the BIRT report was created one Data Source "myPtoDataBase".
Then, based on the Data Source, the user can create Data Sets.
All data sets have as "Data Set Type" "myPtoDataSet".

With the "next" button, I see my new dialog to select the "Result Set",
better the POJO class.
This is the "query", so all I need is selected.

After pressing the "finish" button, I get the normal dialog "Edit Data Set".
Is there a way to hide this dialog?

The wizard calls the methode
protected DataSetDesign collectDataSetDesign(DataSetDesign dataSetDesign)

Here I can set the queryText, the DataSetParameters, the PublicProperties
and the PrivateProperties.

I have to store a property, that indicates the POJO Class, so
that "PtoDataBase" can instance them.
The best place is a PrivateProperty, but when BIRT calls the PtoDataBase,
there is no way to get the properties.

In the class Connection is a methode
public void open(Properties connProperties)
but is methode is never called!

The only way I found is in the class Connection
public IQuery newQuery( String dataSetType )
where I get the queryText.

This works, but normally it contains a SQL-Select. In the "Property Editor"
View I see in the tab "Advanced" the test in "Query".

What is to do, that the methode open( connProperties) is called?

The next thing: in the "Data Explorer" View I see the Data Sets, with a
double-click or the "Edit" from the context-menue, the "Edit Data Set"
Dialog will be open.
There is nothing in this dialog, the user has to chance!
And the user can "destroy" the data set.
Instead of the dialog, I need a message window "You need no to modify the
Is this possible?
Is there a way to push the message window?

Previous Topic:Can't Add Data Source (Oracle)
Next Topic:Discouraged Access Warnings
Goto Forum:

Current Time: Mon May 17 22:55:45 GMT 2021

Powered by FUDForum. Page generated in 0.02752 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top