java - Where to use @NamedQueries -


i using @namedqueries not sure best way use it.

  1. use above entity class
  2. use above dao class
  3. create 1 namedqueriesfactory class have centralized named queries entity
  4. any other better way.

i way put of them in xml file used lot. externalizes queries , gives freedom of sending on xml file dba easier analysis later on.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -