Examples of insertDocument()


Examples of com.imaginea.mongodb.services.DocumentService.insertDocument()

                        if ("".equals(documentData)) {
                            ApplicationException e = new DocumentException(ErrorCodes.DOCUMENT_DOES_NOT_EXIST, "Document Data Missing in Request Body");
                            result = formErrorResponse(logger, e);
                        } else {
                            DBObject document = (DBObject) JSON.parse(documentData);
                            result = documentService.insertDocument(dbName, collectionName, document);
                        }
                        break;
                    }
                    case DELETE: {
                        if ("".equals(_id)) {
View Full Code Here

Examples of com.imaginea.mongodb.services.impl.DocumentServiceImpl.insertDocument()

                        if ("".equals(documentData)) {
                            ApplicationException e = new DocumentException(ErrorCodes.DOCUMENT_DOES_NOT_EXIST, "Document Data Missing in Request Body");
                            result = formErrorResponse(logger, e);
                        } else {
                            DBObject document = (DBObject) JSON.parse(documentData);
                            result = documentService.insertDocument(dbName, collectionName, document);
                        }
                        break;
                    }
                    case DELETE: {
                        if ("".equals(_id)) {
View Full Code Here

Examples of org.apache.xindice.client.corba.db.Collection.insertDocument()

      // The default install includes a test database with an ocs collection
      Collection col = app.getCollection("root/ocs");

      // CORBA requires the document to be an EncodedBuffer
      EncodedBuffer buf = new EncodedBuffer(-1, EmptyBytes, document.getBytes());
      String key = col.insertDocument("testdoc", buf);
      System.out.println("Document Key: " + key);


      col.remove();
      return key;
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

         throw new Exception( "Unable to parse Document" );
      }

      String id = (String) message.get(NAME);
      if ( id.equals( "" ) ) {
         id = col.insertDocument( doc ).toString();
      }
      else {
         col.insertDocument( id, doc );
      }
     
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

      String id = (String) message.get(NAME);
      if ( id.equals( "" ) ) {
         id = col.insertDocument( doc ).toString();
      }
      else {
         col.insertDocument( id, doc );
      }
     
      Hashtable result = new Hashtable();
      result.put(RESULT, id);
      return result;
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

        Collection col = getCollection((String) message.get(COLLECTION));
        if (obj instanceof byte[]) {
            id = col.insertBinary(id, (byte[])obj).toString();
        } else {
            Document doc = DOMParser.toDocument((String) obj);
            id = col.insertDocument(id, doc).toString();
        }

        Hashtable result = new Hashtable();
        result.put(RESULT, id);
        return result;
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

        Collection col = getCollection((String) message.get(COLLECTION));
        if (obj instanceof byte[]) {
            id = col.insertBinary(id, (byte[])obj).toString();
        } else {
            Document doc = DOMParser.toDocument((String) obj);
            id = col.insertDocument(id, doc).toString();
        }

        Hashtable result = new Hashtable();
        result.put(RESULT, id);
        return result;
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

                        status = WebdavStatus.SC_CREATED;
                    } else {
                        status = WebdavStatus.SC_NO_CONTENT;
                    }
                } else {
                    destCollection.insertDocument(destName, (Document) object.getValue());
                    status = WebdavStatus.SC_CREATED;
                }
            } else {
                // placeholder, won't get here
                status = WebdavStatus.SC_FORBIDDEN;
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

                col.setBinary(id, (byte[])obj);
            }
        } else {
            Document doc = DOMParser.toDocument((String) obj);
            if (id == null) {
                id = col.insertDocument(doc).toString();
            } else {
                col.setDocument(id, doc);
            }
        }
View Full Code Here

Examples of org.apache.xindice.core.Collection.insertDocument()

        Collection col = getCollection((String) message.get(COLLECTION));
        if (obj instanceof byte[]) {
            id = col.insertBinary(id, (byte[])obj).toString();
        } else {
            Document doc = DOMParser.toDocument((String) obj);
            id = col.insertDocument(id, doc).toString();
        }

        Hashtable result = new Hashtable();
        result.put(RESULT, id);
        return result;
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.