001/** 002 * Copyright 2015 Tampere University of Technology, Pori Department 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package core.tut.pori.dao.filter; 017 018import java.util.Collection; 019 020/** 021 * Basic and filter with AND relation to other query filters, the values themselves have OR relation with one another. 022 * 023 */ 024public class AndQueryFilter extends OrQueryFilter { 025 /** 026 * @param fieldName 027 * @param values 028 * @throws IllegalArgumentException 029 */ 030 public AndQueryFilter(String fieldName, Collection<? extends Object> values) throws IllegalArgumentException { 031 super(fieldName, values); 032 } 033 034 /** 035 * @param fieldName 036 * @param values 037 * @throws IllegalArgumentException 038 */ 039 public AndQueryFilter(String fieldName, int[] values) throws IllegalArgumentException { 040 super(fieldName, values); 041 } 042 043 /** 044 * @param fieldName 045 * @param values 046 * @throws IllegalArgumentException 047 */ 048 public AndQueryFilter(String fieldName, long[] values) throws IllegalArgumentException { 049 super(fieldName, values); 050 } 051 052 /** 053 * @param fieldName 054 * @param value 055 * @throws IllegalArgumentException 056 */ 057 public AndQueryFilter(String fieldName, Object value) throws IllegalArgumentException { 058 super(fieldName, value); 059 } 060 061 @Override 062 public void toFilterString(StringBuilder fq) { 063 super.toFilterString(fq); 064 } 065 066 @Override 067 public QueryType getQueryType() { 068 return QueryType.AND; 069 } 070}