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 06:51
Rahul Thakur is currently offline Rahul Thakur
Messages: 40
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: Thu Jul 24 13:43:45 EDT 2014

Powered by FUDForum. Page generated in 0.01804 seconds