Examples of OCommandExecutionException


Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

    final Class<? extends OSQLFunction> f = aggregationFunctions.get(iFunctionName.toUpperCase());
    if (f != null)
      try {
        return f.newInstance();
      } catch (Exception e) {
        throw new OCommandExecutionException("Error in creation of function " + iFunctionName
            + "(). Probably there is not an empty constructor or the constructor generates errors", e);
      }
    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

    if (commandClass != null)
      try {
        return commandClass.newInstance();
      } catch (Exception e) {
        throw new OCommandExecutionException("Error in creation of command " + commandClass
            + "(). Probably there is not an empty constructor or the constructor generates errors", e);
      }

    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

    return this;
  }

  public Object execute(final Map<Object, Object> iArgs) {
    if (subjectName == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    database.query(query, iArgs);
    return recordCount;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

    return this;
  }

  public Object execute(final Map<Object, Object> iArgs) {
    if (query == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    query.execute(iArgs);
    return recordCount;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

  /**
   * Execute the CREATE INDEX.
   */
  public Object execute(final Map<Object, Object> iArgs) {
    if (field == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    OClass cls = database.getMetadata().getSchema().getClass(sourceClassName);
    if (cls == null)
      throw new OCommandExecutionException("Class '" + sourceClassName + "' not found");

    OProperty prop = cls.getProperty(field);
    if (prop == null)
      throw new IllegalArgumentException("Property '" + field + "' was not found in class '" + cls + "'");

View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

    } else if (compiledFilter.getTargetClusters() != null) {
      String firstCluster = compiledFilter.getTargetClusters().keySet().iterator().next();

      if (firstCluster == null || firstCluster.length() == 0)
        throw new OCommandExecutionException("No cluster or schema class selected in query");

      if (Character.isDigit(firstCluster.charAt(0)))
        // GET THE CLUSTER NUMBER
        clusterIds = OStringSerializerHelper.splitIntArray(firstCluster);
      else
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

  /**
   * Execute the FIND REFERENCES.
   */
  public Object execute(final Map<Object, Object> iArgs) {
    if (recordId == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    Set<ORID> result = new HashSet<ORID>();
    if (classList == null || classList.equals("")) {
      for (String clusterName : database.getClusterNames()) {
        browseCluster(clusterName, result);
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

  private void browseClass(final String iClassName, final Set<ORID> ids) {
    final OClass clazz = database.getMetadata().getSchema().getClass(iClassName);

    if (clazz == null)
      throw new OCommandExecutionException("Class '" + iClassName + "' was not found");

    for (int i : clazz.getClusterIds()) {
      browseCluster(database.getClusterNameById(i), ids);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

  /**
   * Execute the INSERT and return the ODocument object created.
   */
  public Object execute(final Map<Object, Object> iArgs) {
    if (fieldNames == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    if (indexName != null) {
      final OIndex index = database.getMetadata().getIndexManager().getIndex(indexName);
      if (index == null)
        throw new OCommandExecutionException("Target index '" + indexName + "' not found");

      // BIND VALUES
      Object key = null;
      OIdentifiable value = null;
      for (int i = 0; i < fieldNames.size(); ++i) {
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OCommandExecutionException

  /**
   * Execute the command.
   */
  public Object execute(final Map<Object, Object> iArgs) {
    if (clusterName == null)
      throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet");

    OCluster cluster = ((OStorageEmbedded) database.getStorage()).getClusterByName(clusterName);

    final long recs = cluster.getEntries();

    try {
      cluster.truncate();
    } catch (IOException e) {
      throw new OCommandExecutionException("Error on executing command", e);
    }

    return recs;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.