1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.dao.orm;
16  
17  /**
18   * <a href="ProjectionFactoryUtil.java.html"><b><i>View Source</i></b></a>
19   *
20   * @author Brian Wing Shun Chan
21   */
22  public class ProjectionFactoryUtil {
23  
24      public static Projection alias(Projection projection, String alias) {
25          return getProjectionFactory().alias(projection, alias);
26      }
27  
28      public static Projection avg(String propertyName) {
29          return getProjectionFactory().avg(propertyName);
30      }
31  
32      public static Projection count(String propertyName) {
33          return getProjectionFactory().count(propertyName);
34      }
35  
36      public static Projection countDistinct(String propertyName) {
37          return getProjectionFactory().countDistinct(propertyName);
38      }
39  
40      public static Projection distinct(Projection projection) {
41          return getProjectionFactory().distinct(projection);
42      }
43  
44      public static ProjectionFactory getProjectionFactory() {
45          return _projectionFactory;
46      }
47  
48      public static Projection groupProperty(String propertyName) {
49          return getProjectionFactory().groupProperty(propertyName);
50      }
51  
52      public static Projection max(String propertyName) {
53          return getProjectionFactory().max(propertyName);
54      }
55  
56      public static Projection min(String propertyName) {
57          return getProjectionFactory().min(propertyName);
58      }
59  
60      public static ProjectionList projectionList() {
61          return getProjectionFactory().projectionList();
62      }
63  
64      public static Projection property(String propertyName) {
65          return getProjectionFactory().property(propertyName);
66      }
67  
68      public static Projection rowCount() {
69          return getProjectionFactory().rowCount();
70      }
71  
72      public static Projection sum(String propertyName) {
73          return getProjectionFactory().sum(propertyName);
74      }
75  
76      public void setProjectionFactory(ProjectionFactory projectionFactory) {
77          _projectionFactory = projectionFactory;
78      }
79  
80      private static ProjectionFactory _projectionFactory;
81  
82  }