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.
  */

Base of all query terms.

Author(s):
Brett Porter
 
 public class CompoundQueryTerm
 {
    
The query to add to the compound query.
 
     private final Query query;

    
Whether the term is required (an AND).
 
     private final boolean required;

    
Whether the term is prohibited (a NOT).
 
     private final boolean prohibited;

    
Class constructor

Parameters:
query the subquery to add
required whether the term is required (an AND)
prohibited whether the term is prohibited (a NOT)
 
     private CompoundQueryTermQuery queryboolean requiredboolean prohibited )
     {
         this. = query;
         this. = prohibited;
         this. = required;
     }

    
Method to test if the Query is a search requirement

Returns:
true if this Query is a search requirement, otherwise returns false
 
     public boolean isRequired()
     {
         return ;
     }

    
Method to test if the Query is prohibited in the search result

Returns:
true if this Query is prohibited in the search result
 
     public boolean isProhibited()
     {
         return ;
     }


    
The subquery to execute.

Returns:
the query
 
     public Query getQuery()
     {
         return ;
     }
 
     static CompoundQueryTerm andQuery query )
     {
         return new CompoundQueryTermquerytruefalse );
     }
 
     static CompoundQueryTerm orQuery query )
     {
         return new CompoundQueryTermqueryfalsefalse );
     }
 
     static CompoundQueryTerm notQuery query )
    {
        return new CompoundQueryTermqueryfalsetrue );
    }
New to GrepCode? Check out our FAQ X