Package com.orientechnologies.orient.core.exception

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


  }

  @Override
  protected void checkOpeness() {
    if (isClosed())
      throw new ODatabaseException("Database is closed");
  }
View Full Code Here


    underlying.unregisterListener(iListener);
  }

  protected void checkOpeness() {
    if (isClosed())
      throw new ODatabaseException("Database is closed. Open it before to use.");
  }
View Full Code Here

    return connection.database;
  }

  protected void createDatabase(final ODatabaseDocumentTx iDatabase, String dbUser, String dbPasswd) {
    if (iDatabase.exists())
      throw new ODatabaseException("Database '" + iDatabase.getURL() + "' already exists");

    for (OStorage stg : Orient.instance().getStorages()) {
      if (stg.getName().equalsIgnoreCase(iDatabase.getName()) && stg.exists())
        throw new ODatabaseException("Database '" + iDatabase.getURL() + "' already exists: " + stg);
    }

    iDatabase.create();
    if (dbUser != null) {
View Full Code Here

      if (previous != null) {
        if (previous instanceof RuntimeException)
          throw (RuntimeException) previous;
        else
          throw new ODatabaseException("Generic error, see the underlying cause", previous);
      } else
        throw new ONetworkProtocolException("Network response error: " + buffer.toString());

    } else {
      // PROTOCOL ERROR
View Full Code Here

   * <code>doc.load( "*:3" ); // LOAD THE DOCUMENT BY EARLY FETCHING UP TO 3rd LEVEL OF CONNECTIONS</code>
   * </p>
   */
  public ODocument load(final String iFetchPlan) {
    if (_database == null)
      throw new ODatabaseException("No database assigned to current record");

    Object result = null;
    try {
      result = _database.load(this, iFetchPlan);
    } catch (Exception e) {
View Full Code Here

      // SET DEFAULT PROPERTIES
      setProperty("fetch-max", 50);

    } catch (Throwable t) {
      throw new ODatabaseException("Error on opening database '" + iURL + "'", t);
    }
  }
View Full Code Here

      status = STATUS.OPEN;
    } catch (OException e) {
      // PASS THROUGH
      throw e;
    } catch (Exception e) {
      throw new ODatabaseException("Can't open database", e);
    }
    return (DB) this;
  }
View Full Code Here

        } catch (Throwable t) {
        }

      status = STATUS.OPEN;
    } catch (Exception e) {
      throw new ODatabaseException("Can't create database", e);
    }
    return (DB) this;
  }
View Full Code Here

      status = STATUS.CLOSED;
    } catch (OException e) {
      // PASS THROUGH
      throw e;
    } catch (Exception e) {
      throw new ODatabaseException("Can't delete database", e);
    }
  }
View Full Code Here

    try {
      return storage.readRecord(databaseOwner, iRid, iFetchPlan);

    } catch (Throwable t) {
      throw new ODatabaseException("Error on retrieving record " + iRid + " (cluster: "
          + storage.getPhysicalClusterNameById(iRid.clusterId) + ")", t);
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.ODatabaseException

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.