Package com.orientechnologies.orient.core.sql

Examples of com.orientechnologies.orient.core.sql.OCommandSQL


    // CLASS.PROPERTY NAME
    cmd.append(name);
    cmd.append('.');
    cmd.append(iPropertyName);

    document.getDatabase().command(new OCommandSQL(cmd.toString())).execute();

    if (existsProperty(iPropertyName))
      properties.remove(lowerName);
  }
View Full Code Here


      // TYPE
      cmd.append(' ');
      cmd.append(iLinkedClass.getName());
    }

    document.getDatabase().command(new OCommandSQL(cmd.toString())).execute();

    if (existsProperty(iPropertyName))
      return properties.get(lowerName);
    else
      // ADD IT LOCALLY AVOIDING TO RELOAD THE ENTIRE SCHEMA
View Full Code Here

  }

  public OClass setOverSize(final float overSize) {
    document.getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter class %s oversize %f", name, overSize);
    document.getDatabase().command(new OCommandSQL(cmd)).execute();
    setOverSizeInternal(overSize);
    return this;
  }
View Full Code Here

  }

  public OPropertyIndex setIndex(final OIndex iIndex) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s index %s", getFullName(), iIndex.getIdentity());
    getDatabase().command(new OCommandSQL(cmd)).execute();

    index = new OPropertyIndex(getDatabase(), owner, new String[] { name });

    return index;
  }
View Full Code Here

  }

  public OProperty setName(final String iName) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s name %s", getFullName(), iName);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    this.name = iName;
    return this;
  }
View Full Code Here

  }

  public OPropertyImpl setLinkedClass(final OClass iLinkedClass) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s linkedclass %s", getFullName(), iLinkedClass);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    this.linkedClass = iLinkedClass;
    return this;
  }
View Full Code Here

  }

  public OPropertyImpl setLinkedType(final OType iLinkedType) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s linkedtype %s", getFullName(), iLinkedType);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    this.linkedType = iLinkedType;
    return this;
  }
View Full Code Here

  }

  public OPropertyImpl setNotNull(final boolean iNotNull) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s notnull %s", getFullName(), iNotNull);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    notNull = iNotNull;
    return this;
  }
View Full Code Here

  }

  public OPropertyImpl setMandatory(final boolean iMandatory) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s mandatory %s", getFullName(), iMandatory);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    this.mandatory = iMandatory;

    return this;
  }
View Full Code Here

  }

  public OPropertyImpl setMin(final String iMin) {
    getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
    final String cmd = String.format("alter property %s min %s", getFullName(), iMin);
    getDatabase().command(new OCommandSQL(cmd)).execute();
    this.min = iMin;
    checkForDateFormat(iMin);
    return this;
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.sql.OCommandSQL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.