001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.storage.query;
016    
017    /**
018     * @author Marcellus Tavares
019     */
020    public class ConditionFactoryUtil {
021    
022            public static Junction conjunction() {
023                    return getConditionFactory().conjunction();
024            }
025    
026            public static Junction disjunction() {
027                    return getConditionFactory().disjunction();
028            }
029    
030            public static Condition eq(String name, Object value) {
031                    return getConditionFactory().eq(name, value);
032            }
033    
034            public static ConditionFactory getConditionFactory() {
035                    return _conditionFactory;
036            }
037    
038            public static Condition gt(String name, Object value) {
039                    return getConditionFactory().gt(name, value);
040            }
041    
042            public static Condition gte(String name, Object value) {
043                    return getConditionFactory().gte(name, value);
044            }
045    
046            public static Condition in(String name, Object value) {
047                    return getConditionFactory().in(name, value);
048            }
049    
050            public static Condition like(String name, Object value) {
051                    return getConditionFactory().like(name, value);
052            }
053    
054            public static Condition lt(String name, Object value) {
055                    return getConditionFactory().lt(name, value);
056            }
057    
058            public static Condition lte(String name, Object value) {
059                    return getConditionFactory().lte(name, value);
060            }
061    
062            public static Condition ne(String name, Object value) {
063                    return getConditionFactory().ne(name, value);
064            }
065    
066            public static Condition notIn(String name, Object value) {
067                    return getConditionFactory().notIn(name, value);
068            }
069    
070            public void setConditionFactory(ConditionFactory conditionFactory) {
071                    _conditionFactory = conditionFactory;
072            }
073    
074            private static ConditionFactory _conditionFactory;
075    
076    }