Skip to main content

Blog Archive for gadominas during January 2008

Let's say I have tones of named queries through all my entities. These queries have one/two or more named parameters in conditional expression. The common way to encapsulate my named query lookup in my JPADAO is something like this: Query q = %getEntityManager()%.createNamedQuery( %queryName% ); q.setParameter ("someParam", new Date ()); q.setParameter ("anotherParam", true); ... q.setParameter...