Code example for SessionFactory

Methods: getCurrentSession

	 * @return List<Note> object of all Notes from the database 
	public List<Note> getNotes() {"Getting all notes from the database");
		return sessionFactory.getCurrentSession().createQuery("from Note").list();
	 * @see org.openmrs.api.db.NoteDAO#getNote(Integer) 
	public Note getNote(Integer id) {"Get note " + id);
		return (Note) sessionFactory.getCurrentSession().get(Note.class, id);
	public void createNote(Note note) {
		log.debug("Creating new note");
Connect your IDE to all the code out there  Get Codota for Java