core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLCreateVertex.java
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");

    // CREATE VERTEX DOES NOT HAVE TO BE IN TX
    final OVertex vertex = getDatabase().newVertex(clazz);

    if (fields != null)
      // EVALUATE FIELDS
      for (final OPair<String, Object> f : fields) {
        if (f.getValue() instanceof OSQLFunctionRuntime)
          f.setValue(((OSQLFunctionRuntime) f.getValue()).getValue(vertex.getRecord(), null, context));
      }

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

    if (content != null)
      ((ODocument)vertex.getRecord()).merge(content, true, false);

    if (clusterName != null)
      vertex.save(clusterName);
    else
      vertex.save();

    return vertex.getRecord();

  }
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");

    // CREATE VERTEX DOES NOT HAVE TO BE IN TX
    final OVertex vertex = getDatabase().newVertex(clazz);

    if (fields != null)
      // EVALUATE FIELDS
      for (final OPair<String, Object> f : fields) {
        if (f.getValue() instanceof OSQLFunctionRuntime)
          f.setValue(((OSQLFunctionRuntime) f.getValue()).getValue(vertex.getRecord(), null, context));
      }

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

    if (content != null)
      ((ODocument)vertex.getRecord()).merge(content, true, false);

    if (clusterName != null)
      vertex.save(clusterName);
    else
      vertex.save();

    return vertex.getRecord();

  }
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" ) ; // CREATE VERTEX DOES NOT HAVE TO BE IN TX final OVertex vertex = getDatabase ( ) . newVertex ( clazz ) ; if ( fields != null ) // EVALUATE FIELDS for ( final OPair < String , Object > f : fields ) { if ( f . getValue ( ) instanceof OSQLFunctionRuntime ) f . setValue ( ( ( OSQLFunctionRuntime ) f . getValue ( ) ) . getValue ( vertex . getRecord ( ) , null , context ) ) ; } OSQLHelper . bindParameters ( vertex . getRecord ( ) , fields , new OCommandParameters ( iArgs ) , context ) ; if ( content != null ) ( ( ODocument ) vertex . getRecord ( ) ) . merge ( content , true , false ) ; if ( clusterName != null ) vertex . save ( clusterName ) ; else vertex . save ( ) ; return vertex . getRecord ( ) ; }
Execute the command and return the ODocument object created.
Execute the command and return the ODocument object created .