private ODocument getOrCreateModel ( String model ) { ODocument node = getModel ( model ) ; if ( node == null ) { node = graph . createVertex ( "Models" ) ; OrientModelGraphUtils . setIdFieldValue ( node , model . toString ( ) ) ; OrientModelGraphUtils . setActiveFieldValue ( node , false ) ; node . save ( ) ; } return node ; }
Returns the model with the given name or creates one if it isn t existing until then and returns the new one .