Package com.db4o.query

Examples of com.db4o.query.Query.descend()


    }
    private boolean checkService(String feedId,String serviceId){
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feedId).equal();
        query.descend("serviceType").constrain(serviceId).equal();
        return query.execute().size() == 1;
    }
    private ObjectSet getEnriesForFeedID(String feedId) {
        Query query = this.container.query();
View Full Code Here


    }
    private boolean checkService(String feedId,String serviceId){
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feedId).equal();
        query.descend("serviceType").constrain(serviceId).equal();
        return query.execute().size() == 1;
    }
    private ObjectSet getEnriesForFeedID(String feedId) {
        Query query = this.container.query();
        query.constrain(DB4oEntry.class);
View Full Code Here

        return query.execute().size() == 1;
    }
    private ObjectSet getEnriesForFeedID(String feedId) {
        Query query = this.container.query();
        query.constrain(DB4oEntry.class);
        query.descend("feedId").constrain(feedId).equal();

        return query.execute();
    }

    /**
 
View Full Code Here

    @SuppressWarnings("unchecked")
    private DB4oEntry getInternalEntry(String id) throws StorageException {
        Query query = this.container.query();
        query.constrain(DB4oEntry.class);
        query.descend("entry").descend("id").constrain(id).equal();
        ObjectSet<DB4oEntry> resultSet = query.execute();
        if (resultSet.size() > 1)
            throw new StorageException(
                    "Entry query returned not a unique result");
        if (resultSet.hasNext())
View Full Code Here

            throw new StorageException("Can not store feed -- service type is null");
        if(accountname == null)
            throw new StorageException("Account name is null");
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feed.getId()).equal();
        ObjectSet set = query.execute();
        if (set.hasNext())
            throw new StorageException("feed with feedID " + feed.getId()
                    + " is already stored");
        GDataAccount account = getAccount(accountname);
View Full Code Here

    public void deleteFeed(String feedId) throws StorageException {
        if (feedId == null)
            throw new StorageException("can not delete feed -- feed id is null");
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feedId).equal();
        ObjectSet set = query.execute();
        if (set.size() > 1)
            throw new StorageException(
                    "Feed query returned not a unique result");
        if (set.size() == 0)
View Full Code Here

        if(accountname == null)
            throw new StorageException("Account name is null");
        GDataAccount account = getAccount(accountname);
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feed.getId());
        ObjectSet<ServerBaseFeed> set=  query.execute();
        if (set.size() > 1)
            throw new StorageException("Query for feed id " + feed.getId()
                    + " returns more than one result");
        if (set.size() < 1)
View Full Code Here

            throw new StorageException("can not get Service for feed -- feed id is null");
        if(LOG.isInfoEnabled())
            LOG.info("Retrieving Service for feed -- feed id: "+feedId);
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feedId);
        ObjectSet<ServerBaseFeed> feed =  query.execute();
        if (feed.size() > 1)
            throw new StorageException("Query for feed id " + feedId
                    + " returns more than one result");
        if (feed.size() < 1)
View Full Code Here

                    "Can not get account -- account name is null");
        if (LOG.isInfoEnabled())
            LOG.info("Retrieving account for account name: " + accountName);
        Query query = this.container.query();
        query.constrain(GDataAccount.class);
        query.descend("name").constrain(accountName).equal();
        ObjectSet set = query.execute();
        if (set.size() > 1)
            throw new StorageException(
                    "Account query returned not a unique result -- account name: "
                            + accountName);
View Full Code Here

   
    @SuppressWarnings("unchecked")
    private ServerBaseFeed getServerBaseFeed(String feedId)throws StorageException{
        Query query = this.container.query();
        query.constrain(ServerBaseFeed.class);
        query.descend("feed").descend("id").constrain(feedId);
        ObjectSet<ServerBaseFeed> feed =  query.execute();
        if (feed.size() > 1)
            throw new StorageException("Query for feed id " + feedId
                    + " returns more than one result");
        if (feed.size() < 1)
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.