public Title getTitle ( int pageId ) throws WikiApiException { Session session = this . __getHibernateSession ( ) ; session . beginTransaction ( ) ; Object returnValue = session . createNativeQuery ( "select p.name from PageMapLine as p where p.pageId= :pId" ) . setParameter ( "pId" , pageId , IntegerType . INSTANCE ) . uniqueResult ( ) ; session . getTransaction ( ) . commit ( ) ; String title = ( String ) returnValue ; if ( title == null ) { throw new WikiPageNotFoundException ( ) ; } return new Title ( title ) ; }
Gets the title for a given pageId .