Author: bpoussin Date: 2012-01-07 13:04:11 +0100 (Sat, 07 Jan 2012) New Revision: 1294 Url: http://nuiton.org/repositories/revision/wikitty/1294 Log: suppression du In qui ne sert plus Removed: trunk/wikitty-api/src/main/java/org/nuiton/wikitty/query/conditions/In.java Deleted: trunk/wikitty-api/src/main/java/org/nuiton/wikitty/query/conditions/In.java =================================================================== --- trunk/wikitty-api/src/main/java/org/nuiton/wikitty/query/conditions/In.java 2012-01-07 12:01:56 UTC (rev 1293) +++ trunk/wikitty-api/src/main/java/org/nuiton/wikitty/query/conditions/In.java 2012-01-07 12:04:11 UTC (rev 1294) @@ -1,90 +0,0 @@ -/* - * #%L - * Wikitty :: api - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2012 CodeLutin, Benjamin Poussin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ -package org.nuiton.wikitty.query.conditions; - -import java.util.HashSet; -import java.util.Set; -import org.apache.commons.lang.ObjectUtils; - -/** - * In is used to join to Wikitty type. - * - * ex: - * <li> {@link WikittyQueryMaker}.in(myfield).eq(otherwikittyfield, "toto") - * is equivalent to - * <li> {@link WikittyQueryMaker}.containsOne(myfield, id1, id2, id3) - * where [id1, id2, id3] is id retrieved by query eq(otherwikittyfield, "toto") - * - * @author poussin - * @version $Revision$ - * @since 3.3 - * - * Last update: $Date$ - * by : $Author$ - */ -public class In extends ConditionUnary { - - private static final long serialVersionUID = 1L; - - protected Element element; - - public In(Element element) { - this.element = element; - } - - public In(Element element, Condition restriction) { - super(restriction); - this.element = element; - } - - /** - * Le In autorise le Select - * @return - */ - @Override - public Set<Class<? extends Condition>> rejectedCondition() { - Set<Class<? extends Condition>> result = - new HashSet<Class<? extends Condition>>(super.rejectedCondition()); - // le in autorise le Select - result.remove(Select.class); - return result; - } - - public Element getElement() { - return element; - } - - @Override - boolean equalsDeep(Object other) { - boolean result = super.equalsDeep(other); - if (result) { - In op = (In)other; - result = ObjectUtils.equals(this.getElement(), op.getElement()); - } - return result; - } - - -}