Skip to main content



      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
Eclipse UserFriend
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: Sun Jul 06 22:50:57 EDT 2025

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

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

Back to the top