Package org.apache.oodt.cas.filemgr.structs

Examples of org.apache.oodt.cas.filemgr.structs.Query


     * (non-Javadoc)
     *
     * @see org.apache.oodt.cas.filemgr.util.Pagination#getFirstPage(org.apache.oodt.cas.filemgr.structs.ProductType)
     */
    public ProductPage getFirstPage(ProductType type) {
        Query query = new Query();
        ProductPage firstPage = null;

        try {
            firstPage = pagedQuery(query, type, 1);
        } catch (CatalogException e) {
View Full Code Here


     * @see org.apache.oodt.cas.filemgr.util.Pagination#getLastProductPage(org.apache.oodt.cas.filemgr.structs.ProductType)
     */
    public ProductPage getLastProductPage(ProductType type) {
        ProductPage lastPage = null;
        ProductPage firstPage = getFirstPage(type);
        Query query = new Query();
        try {
            lastPage = pagedQuery(query, type, firstPage.getTotalPages());
        } catch (CatalogException e) {
            LOG.log(Level.WARNING, "Exception getting last page: Message: "
                    + e.getMessage());
View Full Code Here

        if (currentPage.isLastPage()) {
            return currentPage;
        }

        ProductPage nextPage = null;
        Query query = new Query();

        try {
            nextPage = pagedQuery(query, type, currentPage.getPageNum() + 1);
        } catch (CatalogException e) {
            LOG.log(Level.WARNING, "Exception getting next page: Message: "
View Full Code Here

        if (currentPage.isFirstPage()) {
            return currentPage;
        }
        ProductPage prevPage = null;
        Query query = new Query();

        try {
            prevPage = pagedQuery(query, type, currentPage.getPageNum() - 1);
        } catch (CatalogException e) {
            LOG.log(Level.WARNING, "Exception getting prev page: Message: "
View Full Code Here

        queryHash.put("criteria", criteriaVector);
        return queryHash;
    }

    public static Query getQueryFromXmlRpc(Hashtable<String, Object> queryHash) {
        Query query = new Query();
        List<QueryCriteria> criteria = getQueryCriteriaListFromXmlRpc((Vector<Hashtable<String, Object>>) queryHash
                .get("criteria"));
        query.setCriteria(criteria);
        return query;
    }
View Full Code Here

     *             If any error occurs.
     */
    public boolean liveHasProduct(String uniqueElementName,
            String uniqueElementValue, String productTypeName)
            throws CacheException {
        Query query = new Query();
        query.addCriterion(new TermQueryCriteria(uniqueElementName,
                uniqueElementValue));
        try {
            return !(fm.query(query, fm.getProductTypeByName(productTypeName))
                    .isEmpty());
        } catch (Exception e) {
View Full Code Here

    private List<Product> getProductsOverDateRange(String elementName, String productType,
            String startOfQuery, String endOfQuery) throws CacheException {
        List<Product> products = new Vector<Product>();
        try {       
            Query query = new Query();
            query.addCriterion(new RangeQueryCriteria(elementName,
                    startOfQuery, endOfQuery));
            if(this.uniqueElementProductTypeNames != null &&
                    this.uniqueElementProductTypeNames.size() > 0){
                for(Iterator<String> i = this.uniqueElementProductTypeNames.iterator(); i.hasNext(); ){
                    String productTypeName = i.next();
View Full Code Here

            Hashtable<String, Object> queryHash,
            Hashtable<String, Object> productTypeHash,
            int pageNum) throws CatalogException {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        Query query = XmlRpcStructFactory.getQueryFromXmlRpc(queryHash);

        ProductPage prodPage = null;

        try {
            prodPage = catalog.pagedQuery(this.getCatalogQuery(query, type), type, pageNum);
View Full Code Here

   
    public Vector<Hashtable<String, Object>> query(
            Hashtable<String, Object> queryHash,
            Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        Query query = XmlRpcStructFactory.getQueryFromXmlRpc(queryHash);
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        return XmlRpcStructFactory.getXmlRpcProductList(this.query(query, type));
    }
View Full Code Here

   
    public Hashtable<String, Object> getCatalogQuery(
            Hashtable<String, Object> queryHash,
            Hashtable<String, Object> productTypeHash)
            throws RepositoryManagerException, QueryFormulationException {
        Query query = XmlRpcStructFactory.getQueryFromXmlRpc(queryHash);
        ProductType productType = XmlRpcStructFactory.getProductTypeFromXmlRpc(productTypeHash);
        return XmlRpcStructFactory.getXmlRpcQuery(this.getCatalogQuery(query, productType));
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.structs.Query

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.