Package com.dbxml.db.core.data

Examples of com.dbxml.db.core.data.Key


            String selector = (String)attribs.get("select");

            // If we found an XPath selector we need to execute the commands.
            if ( selector != null ) {
               ResultSet rs = domAdapter.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, selector, null);
               Key lastKey = null;
               while ( rs != null && rs.next() ) {
                  Key key = rs.getResultKey();
                  if ( lastKey != null && (key == lastKey || key.equals(lastKey)) )
                     continue;

            Document doc = domAdapter.getDocument(tx, key);
           
            if ( doc == null )
View Full Code Here


    * @param obj The Object to insert
    * @return The new Object Identifier
    * @throws DBException If a Database Exception occurs
    */
   public Key insertObject(Transaction tx, XMLSerializable obj) throws DBException {
      Key key = col.createNewOID();
      putObject(tx, key, obj);
      return key;
   }
View Full Code Here

            // Alternate Collection
            attrID = tb.addEntry(Constants.OBJ_BEGIN_ATTRIBUTE, QNAME_COL);
            tb.addEntry(Constants.OBJ_TEXT, UTF8.toUTF8(c.getCanonicalName()));
            tb.addEntry(Constants.OBJ_END_ATTRIBUTE, attrID);
         }
         Key key = rs.getResultKey();
         if ( key != null && key.getLength() > 0 ) {
            // Key
            attrID = tb.addEntry(Constants.OBJ_BEGIN_ATTRIBUTE, QNAME_KEY);
            tb.addEntry(Constants.OBJ_TEXT, key.getData());
            tb.addEntry(Constants.OBJ_END_ATTRIBUTE, attrID);
         }

         DocumentTable table = rs.getResult();
         if ( table != null ) {
View Full Code Here

         while ( rs.next() ) {
            Collection c = rs.getResultCollection();
            sw.write(RESULT_START);
            if ( c != col )
               writeStrings(sw, new String[]{" ", COL, "=\"", c.getCanonicalName(), "\""});
            Key key = rs.getResultKey();
            if ( key != null && key.getLength() > 0 )
               writeStrings(sw, new String[]{" ", KEY, "=\"", key.toString(), "\""});
            sw.write(">");

            DocumentTable table = rs.getResult();
            DTSMHelper.tableToWriter(table, sw, true);
            sw.write(RESULT_END);
View Full Code Here

    * @param obj The Object to insert
    * @return The new Object Identifier
    * @throws DBException If a Database Exception occurs
    */
   public Key insertObject(Transaction tx, Element obj) throws DBException {
      Key key = col.createNewOID();
      putObject(tx, key, obj);
      return key;
   }
View Full Code Here

         return pos < files.length;
      }

      public synchronized Record getNextRecord() throws DBException {
         File file = files[pos++];
         return readRecord(tx, new Key(file.getName()));
      }
View Full Code Here

      public synchronized Value getNextValue() throws DBException {
         return getNextRecord().getValue();
      }

      public synchronized Key getNextKey() {
         return new Key(files[pos++].getName());
      }
View Full Code Here

    * @param obj The Document to insert
    * @return The new Object Identifier
    * @throws DBException If a Database Exception occurs
    */
   public Key insertDocument(Transaction tx, Document doc) throws DBException {
      Key key = col.createNewOID();
      putDocument(tx, key, doc);
      return key;
   }
View Full Code Here

TOP

Related Classes of com.dbxml.db.core.data.Key

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.