Jump to content
We've recently updated our Privacy Statement, available here ×

Recommended Posts

By: M. Overdijk - marceloverdijk

EJB3 SQL

2006-02-05 08:03

Hi,

 

I'm new to JasperReports

I know you can create a report based on a SQL query inside the report or you can create custom datasources and pass them in when 'executing' the report.

 

Can JR be customized in such a way that I can enter EJB3 SQL in the report itself, so without using custom datasources?

 

Any ideas are welcome.

 

Regards,

Marcel

 

 

 

 

By: Lucian Chirita - lucianc

RE: EJB3 SQL

2006-02-08 00:35

Hi

 

JR 1.2.0 includes a query executer mechanism that provides support for multiple query languages. The library currently ships with query executer implementations for SQL, HQL and XPath.

 

Support for embedded EJB QL queries can be obtained by writing a query executer implementation. I don't think there is such implementation yet, you could try writing one. If you need any guidance let me know.

 

Regards,

Lucian

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-08 02:53

Thanks Lucian,

 

This is what I was lookinf for. I was using JR 1.1 before.

 

It's more like an experiment to base my query in JR on EJBQL. So I will try if I can make something to work.

 

I'm just wondering if there are plans by the JR-team to support this in the near future.

If so, I can spend my time better in learning creating reports.

 

 

 

 

By: Lucian Chirita - lucianc

RE: EJB3 SQL

2006-02-08 09:12

There are currently no plans to add such functionality.

 

Regards,

Lucian

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-08 11:47

OK.

 

I will look into it myself. It will be something like the Hibernate stuff.

 

If I get some results it might be interesting ti add it to JR.

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-11 02:35

Hi Lucian,

 

As mentioned I'm working on the EJBQL query executor functionality. As starting point I used your Hibernate QE.

 

I have some questions for you:

 

In the Hibernate QU it's possible to supply the JDBC_FETCH_SIZE or the HIBERNATE_QUERY_LIST_PAGE_SIZE. I think both are used to not query large resultsets in 1 database call. Can you tell if there are any other differences and how to choose one of them?

 

Second do you know if it's possible to have a report parameter in which you can define 0, 1 or more named/value pairs. I don't want to fill the parameter runtime, but just add them to the report file like the queryString.

Something like:

<queryHints>

<![CDATA[

fetchSize=10,

anyhint=true]]>

</queryHints>

Those hints can have any name so I cannot use paramters like JDBC_FETCH_SIZE.

 

And third, is the JR team interested to incorporate this EJBQL in the JR distribution.

Is there a developers list to talk about this?

 

 

Regards,

Marcel

 

 

 

 

 

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-11 07:31

Lucian,

 

A fourth question:

 

The Hibernate QE has the method

protected String getHqlParameterName(String parameterName)

{

return '_' + JRStringUtil.getLiteral(parameterName);

}

 

What is the reason that the parameter name is prefixed with a _ ? Is this related to Hibernate?

 

 

Regards,

Marcel

 

 

 

 

By: Lucian Chirita - lucianc

RE: EJB3 SQL

2006-02-13 01:41

Hi Marcel

 

Sorry for the delay, I've been away for the weekend.

 

1. This is how I see it:

- JDBC_FETCH_SIZE is a means of optimizing the JBDC to DB communication time.

- HIBERNATE_QUERY_LIST_PAGE_SIZE can be used to avoid keeping the entire Hibernate result in memory.

 

2. You can use report report/dataset properties for this. For instance, JDBC_FETCH_SIZE is a property that can be specified both at a global level (jasperreports.properties) and at report/dataset level (as a <property> element). The only inconvenient is that the property is not directly linked to the query (as the <queryHints> could be).

 

3. Of course we'd be glad to include it in the distribution.

 

4. I don't think there is actually any reason for using '_' (and I don't remember why I put it there).

 

There was once a developer mailing list, but it's been inactive for a long while and I don't think it's still usable.

 

 

Regards,

Lucian

 

 

 

 

By: Teodor Danciu - teodord

RE: EJB3 SQL

2006-02-13 01:48

 

Hi,

 

I don't think there is a need for a developer list.

Once a patch entry is created in the Patched area,

discussions could continue on that entry.

 

Thank you,

Teodor

 

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-13 01:56

Thanks Lucian,

 

1. TRUE; good point, I will add (or better copy ;-) this also.

 

2. I will take al look at the property element.

 

3. According to Teodor's mail, I guess creating a patch entry is the way to do this.

 

4. Clear.

 

I will create a patch entry later today.

I have some questions to discuss, but I think it's better to this in the Patched area, because it's getting off-topic.

 

Regards,

Marcel Overdijk

 

 

 

 

 

By: M. Overdijk - marceloverdijk

RE: EJB3 SQL

2006-02-13 02:53

I've created a patch entry for this topic:

[ 1430560 ] Add EJBQL Query Language to JR Engine

 

http://sourceforge.net/tracker/index.php?func=detail&aid=1430560&group_id=36382&atid=416705

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...