001    /**
002     * Copyright (c) 2000-2010 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.portal.kernel.dao.orm;
016    
017    /**
018     * @author Brian Wing Shun Chan
019     */
020    public class DynamicQueryFactoryUtil {
021    
022            public static DynamicQuery forClass(Class<?> clazz) {
023                    return getDynamicQueryFactory().forClass(clazz);
024            }
025    
026            public static DynamicQuery forClass(
027                    Class<?> clazz, ClassLoader classLoader) {
028    
029                    return getDynamicQueryFactory().forClass(clazz, classLoader);
030            }
031    
032            public static DynamicQuery forClass(Class<?> clazz, String alias) {
033                    return getDynamicQueryFactory().forClass(clazz, alias);
034            }
035    
036            public static DynamicQuery forClass(
037                    Class<?> clazz, String alias, ClassLoader classLoader) {
038    
039                    return getDynamicQueryFactory().forClass(clazz, alias, classLoader);
040            }
041    
042            public static DynamicQueryFactory getDynamicQueryFactory() {
043                    return _dynamicQueryFactory;
044            }
045    
046            public void setDynamicQueryFactory(
047                    DynamicQueryFactory dynamicQueryFactory) {
048    
049                    _dynamicQueryFactory = dynamicQueryFactory;
050            }
051    
052            private static DynamicQueryFactory _dynamicQueryFactory;
053    
054    }