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.portal.security.permission;
016    
017    /**
018     * @author Raymond Augé
019     */
020    public interface InlineSQLHelper {
021    
022            public boolean isEnabled();
023    
024            public boolean isEnabled(long groupId);
025    
026            public boolean isEnabled(long[] groupIds);
027    
028            public String replacePermissionCheck(
029                    String sql, String className, String classPKField);
030    
031            public String replacePermissionCheck(
032                    String sql, String className, String classPKField, long groupId);
033    
034            public String replacePermissionCheck(
035                    String sql, String className, String classPKField, long groupId,
036                    String bridgeJoin);
037    
038            public String replacePermissionCheck(
039                    String sql, String className, String classPKField, long[] groupIds);
040    
041            public String replacePermissionCheck(
042                    String sql, String className, String classPKField, long[] groupIds,
043                    String bridgeJoin);
044            public String replacePermissionCheck(
045                    String sql, String className, String classPKField, String userIdField);
046    
047            public String replacePermissionCheck(
048                    String sql, String className, String classPKField, String userIdField,
049                    long groupId);
050    
051            public String replacePermissionCheck(
052                    String sql, String className, String classPKField, String userIdField,
053                    long groupId, String bridgeJoin);
054    
055            public String replacePermissionCheck(
056                    String sql, String className, String classPKField, String userIdField,
057                    long[] groupIds);
058    
059            public String replacePermissionCheck(
060                    String sql, String className, String classPKField, String userIdField,
061                    long[] groupIds, String bridgeJoin);
062    
063            public String replacePermissionCheck(
064                    String sql, String className, String classPKField, String userIdField,
065                    String bridgeJoin);
066    
067    }