1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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  }