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.security.permission;
16  
17  /**
18   * <a href="InlineSQLHelperUtil.java.html"><b><i>View Source</i></b></a>
19   *
20   * @author Raymond Augé
21   */
22  public class InlineSQLHelperUtil {
23  
24      public static String replacePermissionCheck(
25          String sql, String className, String classPKField, String userIdField) {
26  
27          return getInlineSQLHelper().replacePermissionCheck(
28              sql, className, classPKField, userIdField);
29      }
30  
31      public static String replacePermissionCheck(
32          String sql, String className, String classPKField, String userIdField,
33          long groupId) {
34  
35          return getInlineSQLHelper().replacePermissionCheck(
36              sql, className, classPKField, userIdField, groupId);
37      }
38  
39      public static String replacePermissionCheck(
40          String sql, String className, String classPKField, String userIdField,
41          long groupId, String bridgeJoin) {
42  
43          return getInlineSQLHelper().replacePermissionCheck(
44              sql, className, classPKField, userIdField, groupId, bridgeJoin);
45      }
46  
47      public static String replacePermissionCheck(
48          String sql, String className, String classPKField, String userIdField,
49          String bridgeJoin) {
50  
51          return getInlineSQLHelper().replacePermissionCheck(
52              sql, className, classPKField, userIdField, bridgeJoin);
53      }
54  
55      public void setInlineSQLHelper(InlineSQLHelper inlineSQLPermission) {
56          _inlineSQLPermission = inlineSQLPermission;
57      }
58  
59      public static InlineSQLHelper getInlineSQLHelper() {
60          return _inlineSQLPermission;
61      }
62  
63      private static InlineSQLHelper _inlineSQLPermission;
64  
65  }