Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static String GetEmail(String login)
Session session = HibernateSessionFactory.getSessionFactory().openSession();
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