Package org.apache.lucene.gdata.storage.lucenestorage

Examples of org.apache.lucene.gdata.storage.lucenestorage.StorageEntryWrapper


        entry.setUpdated(new DateTime(TIMESTAMP,0));
        entry.setTitle(new PlainTextConstruct(TITLE));
        ProvidedService config = new ProvidedServiceStub();
        entry.setFeedId(FEEDID);
        entry.setServiceConfig(config);
        this.wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
        this.deleteWrapper = new StorageEntryWrapper(entry,StorageOperation.DELETE);
       
       
    }
View Full Code Here


        StringReader reader = new StringReader(this.delete);
        assertNotNull(this.recReader.recoverEntries(new BufferedReader(reader)));
        reader = new StringReader(this.delete);
        List<StorageEntryWrapper> recList = this.recReader.recoverEntries(new BufferedReader(reader));
        assertEquals(1,recList.size());
        StorageEntryWrapper delWrapper = recList.get(0);
        assertEquals(StorageOperation.DELETE,delWrapper.getOperation());
        assertEquals(feedId,delWrapper.getFeedId());
        assertEquals(entryId,delWrapper.getEntryId());
       
    }
View Full Code Here

    public void testRecoverInsertedEntries() throws IOException {
       
        StringReader reader = new StringReader(this.insert);
        List<StorageEntryWrapper> recList = this.recReader.recoverEntries(new BufferedReader(reader));
        assertEquals(1,recList.size());
        StorageEntryWrapper insWrapper = recList.get(0);
        assertEquals(StorageOperation.INSERT,insWrapper.getOperation());
        assertEquals(feedId,insWrapper.getFeedId());
        assertEquals(entryId,insWrapper.getEntryId());
        assertEquals(dateTime,insWrapper.getEntry().getUpdated());
        assertEquals(this.title,insWrapper.getEntry().getTitle().getPlainText());
       
       
    }
View Full Code Here

        ServerBaseEntry entry = new ServerBaseEntry();
        entry.setFeedId(this.feedId);
        entry.setId(entryId);
        entry.setUpdated(DateTime.now());
        entry.setServiceConfig(new ProvidedServiceStub());
        StorageEntryWrapper wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
        this.writeController.storageModified(wrapper);
        assertEquals(1,this.recDir.listFiles().length);
        this.writeController.destroy();
    }
View Full Code Here

                retVal.setId(this.entryId);
                retVal.setFeedId(this.feedId);
                retVal.setServiceConfig(this.config);
               
           try{
            return new StorageEntryWrapper(retVal,this.operation);
           }catch (IOException e) {
               throw new RecoverException("Can't create StorageWrapper -- "+e.getMessage(),e);
        }
        }
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.storage.lucenestorage.StorageEntryWrapper

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.