001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 lt(String name, Object value) {
051                    return getConditionFactory().lt(name, value);
052            }
053    
054            public static Condition lte(String name, Object value) {
055                    return getConditionFactory().lte(name, value);
056            }
057    
058            public static Condition like(String name, Object value) {
059                    return getConditionFactory().like(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    }