public Object execute ( final Map < Object , Object > iArgs ) { if ( className == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not been parsed yet" ) ; final ODatabaseDocument database = getDatabase ( ) ; boolean alreadyExists = database . getMetadata ( ) . getSchema ( ) . existsClass ( className ) ; if ( ! alreadyExists || ! ifNotExists ) { if ( clusters != null ) database . getMetadata ( ) . getSchema ( ) . createClass ( className , clusters , superClasses . toArray ( new OClass [ 0 ] ) ) ; else database . getMetadata ( ) . getSchema ( ) . createClass ( className , clusterIds , superClasses . toArray ( new OClass [ 0 ] ) ) ; } return database . getMetadata ( ) . getSchema ( ) . getClasses ( ) . size ( ) ; }
Execute the CREATE CLASS .