Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.apache.maven.archiva.indexer.query;
  
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you 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.
  */
 
 import java.util.List;

Class to hold multiple SinglePhraseQueries and/or other CompoundQueries.

Author(s):
Edwin Punzalan
 
 public class CompoundQuery
     implements Query
 {
    
The query terms.
 
     private final List compoundQueryTerms = new ArrayList();

    
Appends a required term to this query.

Parameters:
term the term to be appended to this query
 
     public void andQueryTerm term )
     {
         .add( CompoundQueryTerm.andnew SingleTermQueryterm ) ) );
     }

    
Appends an optional term to this query.

Parameters:
term the term to be appended to this query
 
     public void orQueryTerm term )
     {
         .add( CompoundQueryTerm.ornew SingleTermQueryterm ) ) );
     }

    
Appends a prohibited term to this query.

Parameters:
term the term to be appended to this query
 
     public void notQueryTerm term )
     {
         .add( CompoundQueryTerm.notnew SingleTermQueryterm ) ) );
     }

    
Appends a required subquery to this query.

Parameters:
query the subquery to be appended to this query
 
     public void andQuery query )
     {
         .add( CompoundQueryTerm.andquery ) );
     }

    
Appends an optional subquery to this query.

Parameters:
query the subquery to be appended to this query
 
     public void orQuery query )
     {
         .add( CompoundQueryTerm.orquery ) );
     }

    
Appends a prohibited subquery to this query.

Parameters:
query the subquery to be appended to this query
 
     public void notQuery query )
     {
         .add( CompoundQueryTerm.notquery ) );
     }

    
Method to get the List of Queries appended into this

Returns:
List of all Queries added to this Query
    public List getCompoundQueryTerms()
    {
        return ;
    }
New to GrepCode? Check out our FAQ X