Package org.apache.slide.search.basic.expression

Source Code of org.apache.slide.search.basic.expression.EmptyExpression

/*
* $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/expression/EmptyExpression.java,v 1.2.2.1 2004/02/05 16:05:11 mholz Exp $
* $Revision: 1.2.2.1 $
* $Date: 2004/02/05 16:05:11 $
*
* ====================================================================
*
* Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package org.apache.slide.search.basic.expression;

import org.apache.slide.search.SearchException;
import org.apache.slide.search.basic.BasicResultSetImpl;
import org.apache.slide.search.basic.ComparableResourcesPool;
import org.apache.slide.search.basic.IBasicExpression;
import org.apache.slide.search.basic.IBasicResultSet;

/**
* Represents an AND expression.
*
* @author <a href="mailto:martin.wallmer@softwareag.com">Martin Wallmer</a>
* @version $Revision: 1.2.2.1 $
*/
public class EmptyExpression implements IBasicExpression {
   
    /**
     * The pool of resources to apply the expression to.
     */
    protected ComparableResourcesPool requestedResourcesPool = null;
   
   
    /**
     * Creates an empty expression. This occurs when no <where> clause
     * was supplied
     *
     * @param requestedResourcesPool  the pool of resources to apply the expression to.
     */
    public EmptyExpression (ComparableResourcesPool requestedResourcesPool) {
        this.requestedResourcesPool = requestedResourcesPool;
    }
   
    /**
     * Executes the expression.
     *
     * @return   a Set of RequestedResource objects
     *
     * @throws   SearchException
     */
    public IBasicResultSet execute () throws SearchException {
        return new BasicResultSetImpl(requestedResourcesPool.getPool(),
                                     requestedResourcesPool.partialResult());
    }
   
   
   
    /**
     * String representation for debugging purposes.
     *
     * @return   this expression as String
     */
    public String toString () {
        return "";
    }
   
}

TOP

Related Classes of org.apache.slide.search.basic.expression.EmptyExpression

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.