Package gov.nysenate.openleg.util

Examples of gov.nysenate.openleg.util.ResultIterator


        return response;
    }

    public IBaseObject getSenateObject(String oid, String type) {
        oid = oid.replace(" ", "-").replace(",", "");
        ResultIterator longSearch = new ResultIterator("otype:"+type+" AND oid:\""+oid+"\"", 1, 1, "oid", true);
        for(Result result:longSearch) {
            return result.getObject();
        }
        return null;
    }
View Full Code Here


    @SuppressWarnings("unchecked") // Doesn't seem to be a way to properly type check here
    public <T extends IBaseObject> ArrayList<T> getSenateObjects(String query) {
        ArrayList<T> senateObjects = new ArrayList<T>();

        ResultIterator longSearch = new ResultIterator(query);
        for(Result result:longSearch) {
            senateObjects.add((T)result.getObject());
        }

        return senateObjects;
View Full Code Here

TOP

Related Classes of gov.nysenate.openleg.util.ResultIterator

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.