Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink Expressions - is there a better way to design the DAO?
EclipseLink Expressions - is there a better way to design the DAO? [message #478673] Thu, 06 August 2009 10:51
Rahul Thakur is currently offline Rahul ThakurFriend
Messages: 39
Registered: July 2009
Member
Greetings!

I have a generic DAO with one of the API methods like this:

public interface IStore<T> {

public List<T> query(Class<T> klass, int startIdx, int range,
Expression expression) throws StoreException;

}

As you can see the Expression is externally created and passed into the
DAO implementation.

My question is: is this a bad way to design the Store API and make the
tier adjacent to the DAO responsible for creating Expression instances? In
my case Expressions are being created in Stripes Action implementations. I
do understand this makes it tied to a specific ORM provider, but what if I
know that my application is going to use EclipseLink for sure.

If this isn't a desirable design decision, can someone suggest if there is
a better way to use Expressions for creating criteria queries in my
application.

Many thanks,

Rahul
Previous Topic:Alias for identifier have more than 30 char. ora-00972 identifier too long
Next Topic:@NamedQuery "DELETE FROM"
Goto Forum:
  


Current Time: Fri Mar 29 11:22:47 GMT 2024

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

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

Back to the top