Package org.apache.xindice.core.data

Examples of org.apache.xindice.core.data.Record


         HashMap meta = new HashMap(2);
         meta.put(Record.CREATED, new Long(sph.getCreated()));
         meta.put(Record.MODIFIED, new Long(sph.getModified()));

         return new Record(key, v, meta);
      }
      catch ( BTreeNotFoundException e ) {
      }
      catch ( BTreeException e ) {
         throw e;
View Full Code Here


            HashMap meta = new HashMap(2);
            meta.put(Record.CREATED, new Long(sph.getCreated()));
            meta.put(Record.MODIFIED, new Long(sph.getModified()));

            return new Record(key, v, meta);
         }
      }
      catch ( Exception e ) {
         if (log.isDebugEnabled()) {
            log.debug("No message", e);
View Full Code Here

         HashMap meta = new HashMap(1);
         meta.put(Record.MODIFIED, new Long(file.lastModified()));

         byte[] valueData = cache.getFile(file);
         if ( valueData != null )
            return new Record(key, new Value(valueData), meta);
      }
      catch ( Exception e ) {
         if (log.isDebugEnabled()) {
            log.debug("No message", e);
         }
View Full Code Here

            }
         }
        
         RecordSet rs = collection.getFiler().getRecordSet();
         while ( rs.hasMoreRecords() ) {
            Record rec = rs.getNextRecord();

            if ( rec == null )
               continue;
           
            Key key = rec.getKey();
            Document doc = new DocumentImpl(rec.getValue().getData(), symbols, new NodeSource(collection, key));
            try {
               new SAXHandler(key, doc, ACTION_CREATE, list);
            }
            catch ( Exception e ) {
               if (log.isDebugEnabled()) {
View Full Code Here

      if (value == null ) {
         throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid null value");
      }
      checkOpened();
      checkReadOnly();
      hashTable.put(key, new Record(key, value));
      return true;
   }
View Full Code Here

   public void testSuccessWriteRecord()
         throws Exception {
      assertTrue(filer.writeRecord(TEST_KEY, TEST_VALUE));
      assertEquals(1, filer.getRecordCount());

      Record result = filer.readRecord(TEST_KEY);
      assertEquals(TEST_VALUE, result.getValue());

      RecordSet set = filer.getRecordSet();
      assertEquals(result.getValue(), set.getNextRecord().getValue());
      assertTrue(set.hasMoreRecords() == false);

      filer.deleteRecord(TEST_KEY);
      assertEquals(0, filer.getRecordCount());
   }
View Full Code Here

      filer.deleteRecord(TEST_KEY);
      assertEquals(0, filer.getRecordCount());
   }

   public void testFailReadDeletedRecord() throws Exception {
      Record result = filer.readRecord(TEST_KEY);
      assertNull(result);
   }
View Full Code Here

         throws Exception {
      assertTrue(filer.writeRecord(TEST_KEY, TEST_VALUE));
      assertEquals(1, filer.getRecordCount());

      // Valid key
      Record result = filer.readRecord(TEST_KEY);
      assertEquals(TEST_VALUE, result.getValue());
   }
View Full Code Here

   public void testFailReadRecordNullKey() throws Exception {
      assertTrue(filer.writeRecord(TEST_KEY, TEST_VALUE));
      assertEquals(1, filer.getRecordCount());

      // Null key
      Record result = filer.readRecord(null);
      assertNull(result);
   }
View Full Code Here

         throws Exception {
      assertTrue(filer.writeRecord(TEST_KEY, TEST_VALUE));
      assertEquals(1, filer.getRecordCount());

      // Empty key
      Record result = filer.readRecord(new Key(""));
      assertNull(result);
   }
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.data.Record

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.