public Object execute(final Map<Object, Object> iArgs) {
    if (clazz == null)
      throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");

    ODatabaseRecord database = getDatabase();
    if (!(database instanceof OGraphDatabase))
      database = new OGraphDatabase((ODatabaseRecordTx) database);

    final ODocument vertex = ((OGraphDatabase) database).createVertex(clazz.getName());

    OSQLHelper.bindParameters(vertex, fields, new OCommandParameters(iArgs));

    vertex.save(clusterName);

    return vertex;
  }
public Object execute ( final Map < Object , Object > iArgs ) { if ( clazz == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not been parsed yet" ) ; ODatabaseRecord database = getDatabase ( ) ; if ( ! ( database instanceof OGraphDatabase ) ) database = new OGraphDatabase ( ( ODatabaseRecordTx ) database ) ; final ODocument vertex = ( ( OGraphDatabase ) database ) . createVertex ( clazz . getName ( ) ) ; OSQLHelper . bindParameters ( vertex , fields , new OCommandParameters ( iArgs ) ) ; vertex . save ( clusterName ) ; return vertex ; }
Execute the command and return the ODocument object created.