Package com.dbxml.db.core

Examples of com.dbxml.db.core.DBException


            else
               pi.set("newBin", newObj);
         }
      }
      catch ( DTSMException e ) {
         throw new DBException(FaultCodes.SCR_RUNTIME_ERROR, e);
      }

      // Now run the actual script
      pi.exec(script);
View Full Code Here


            else
               scope.put("newBin", scope, Context.toObject(newObj, scope));
         }
      }
      catch ( DTSMException e ) {
         throw new DBException(FaultCodes.SCR_RUNTIME_ERROR, e);
      }


      // Now run the actual script and populate the result
      try {
View Full Code Here

            return col.getRecord(tx, docName).getValue().getData();
      }
      catch ( DTSMException e ) {
         tx.cancel();
         //e.printStackTrace(System.err);
         throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Can't retrieve '" + docName + "'", e);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
      }
View Full Code Here

      try {
         return DTSMHelper.tableToText(col.getDocument(tx, docName));
      }
      catch ( DTSMException e ) {
         tx.cancel();
         throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Can't retrieve '" + docName + "'", e);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
      }
View Full Code Here

         DocumentTable dt = DTSMHelper.textToTable(document, col.getSymbols());
         col.setDocument(tx, docName, dt);
      }
      catch ( DTSMException e ) {
         tx.cancel();
         throw new DBException(FaultCodes.COL_CANNOT_STORE, "Can't parse Document '" + docName + "'", e);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
      }
View Full Code Here

      if ( c != null ) {
        ContentProxy dp = new ContentProxy(col, docName);
        return new ObjectInstance(dp);
      }
      else
        throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Container '"+docName+"' not found");
    }
    catch ( DBException e ) {
      tx.cancel();
      throw e;
    }
View Full Code Here

   public String getDocument(String docKey) throws DBException {
      Transaction tx = new Transaction();
      try {
         DocumentTable dt = col.getDocument(tx, docKey);
         if ( dt == null )
            throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Document '"+docKey+"' not found");

         return DTSMHelper.tableToText(dt);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
      }
      catch ( DTSMException e ) {
         tx.cancel();
         throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Can't convert Document '" + docKey + "' to text", e);
      }
      finally {
         if ( tx.getStatus() == Transaction.ACTIVE )
            tx.commit();
      }
View Full Code Here

         tx.cancel();
         throw e;
      }
      catch ( DTSMException e ) {
         tx.cancel();
         throw new DBException(FaultCodes.COL_CANNOT_STORE, "Can't parse Document", e);
      }
      finally {
         if ( tx.getStatus() == Transaction.ACTIVE )
            tx.commit();
      }
View Full Code Here

         tx.cancel();
         throw e;
      }
      catch ( DTSMException e ) {
         tx.cancel();
         throw new DBException(FaultCodes.COL_CANNOT_STORE, "Can't parse Document '" + docKey + "'", e);
      }
      finally {
         if ( tx.getStatus() == Transaction.ACTIVE )
            tx.commit();
      }
View Full Code Here

   public byte[] getValue(String key) throws DBException {
      Transaction tx = new Transaction();
      try {
         Record rec = col.getRecord(tx, key);
         if ( rec == null )
            throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Record '"+key+"' not found");

         return rec.getValue().getData();
      }
      catch ( DBException e ) {
         tx.cancel();
View Full Code Here

TOP

Related Classes of com.dbxml.db.core.DBException

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.