Created
September 1, 2016 10:42
-
-
Save akleandrov/6a4382bf79b6ca09d2a129a6116c5517 to your computer and use it in GitHub Desktop.
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 static String GetEmail(String login) | |
{ | |
Session session = HibernateSessionFactory.getSessionFactory().openSession(); | |
session.beginTransaction(); | |
Query query = session.createNativeQuery("select * from target_persons where login= ?1", TargetPersonsEntity.class); | |
TargetPersonsEntity target = (TargetPersonsEntity) query.getSingleResult(); | |
return target.getEmail(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment