Created
November 3, 2011 13:01
-
-
Save aziz781/1336420 to your computer and use it in GitHub Desktop.
java: Hibernate String How to execute named query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean dealerExists(String agentNumber) { | |
return getSessionFactory().getCurrentSession() | |
.getNamedQuery("myapp.namedquery").setParameter(0, agentNumber) | |
.list().get(0) != null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment