private ODocument getModel ( String model ) { String query = String . format ( "select from Models where %s = ?" , OGraphDatabase . LABEL ) ; List < ODocument > from = graph . query ( new OSQLSynchQuery < ODocument > ( query ) , model ) ; if ( from . size ( ) > 0 ) { return from . get ( 0 ) ; } else { return null ; } }
Returns the model with the given name .