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 #43182] Thu, 20 March 2008 14:54 Go to next message
Eclipse UserFriend
Originally posted by: dunkelpeter.spam.gmx.net

Hello!

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"
(String).

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
dataset".
Is this possible?
Is there a way to push the message window?

Peter
Re: ODA with POJOs [message #43446 is a reply to message #43182] Tue, 01 April 2008 03:23 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Peter,

Please see my response in the corresponding posting on the BIRT newsgroup.

Linda
Re: ODA with POJOs [message #590697 is a reply to message #43182] Tue, 01 April 2008 03:23 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Peter,

Please see my response in the corresponding posting on the BIRT newsgroup.

Linda
Previous Topic:Re: DTP: Why SQL statements die saying "no database selected"
Next Topic:Getting started with Ecore ODA Driver
Goto Forum:
  


Current Time: Wed Nov 25 17:52:14 GMT 2020

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

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

Back to the top