1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.service.persistence;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="TagsAssetFinderUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class TagsAssetFinderUtil {
33      public static int countAssets(long groupId, long[] classNameIds,
34          boolean excludeZeroViewCount, java.util.Date publishDate,
35          java.util.Date expirationDate)
36          throws com.liferay.portal.SystemException {
37          return getFinder()
38                     .countAssets(groupId, classNameIds, excludeZeroViewCount,
39              publishDate, expirationDate);
40      }
41  
42      public static int countByAndEntryIds(long groupId, long[] classNameIds,
43          long[] entryIds, long[] notEntryIds, boolean excludeZeroViewCount,
44          java.util.Date publishDate, java.util.Date expirationDate)
45          throws com.liferay.portal.SystemException {
46          return getFinder()
47                     .countByAndEntryIds(groupId, classNameIds, entryIds,
48              notEntryIds, excludeZeroViewCount, publishDate, expirationDate);
49      }
50  
51      public static int countByOrEntryIds(long groupId, long[] classNameIds,
52          long[] entryIds, long[] notEntryIds, boolean excludeZeroViewCount,
53          java.util.Date publishDate, java.util.Date expirationDate)
54          throws com.liferay.portal.SystemException {
55          return getFinder()
56                     .countByOrEntryIds(groupId, classNameIds, entryIds,
57              notEntryIds, excludeZeroViewCount, publishDate, expirationDate);
58      }
59  
60      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAssets(
61          long groupId, long[] classNameIds, java.lang.String orderByCol1,
62          java.lang.String orderByCol2, java.lang.String orderByType1,
63          java.lang.String orderByType2, boolean excludeZeroViewCount,
64          java.util.Date publishDate, java.util.Date expirationDate, int start,
65          int end) throws com.liferay.portal.SystemException {
66          return getFinder()
67                     .findAssets(groupId, classNameIds, orderByCol1, orderByCol2,
68              orderByType1, orderByType2, excludeZeroViewCount, publishDate,
69              expirationDate, start, end);
70      }
71  
72      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByAndEntryIds(
73          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
74          java.lang.String orderByCol1, java.lang.String orderByCol2,
75          java.lang.String orderByType1, java.lang.String orderByType2,
76          boolean excludeZeroViewCount, java.util.Date publishDate,
77          java.util.Date expirationDate, int start, int end)
78          throws com.liferay.portal.SystemException {
79          return getFinder()
80                     .findByAndEntryIds(groupId, classNameIds, entryIds,
81              notEntryIds, orderByCol1, orderByCol2, orderByType1, orderByType2,
82              excludeZeroViewCount, publishDate, expirationDate, start, end);
83      }
84  
85      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByOrEntryIds(
86          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
87          java.util.Date publishDate, java.util.Date expirationDate)
88          throws com.liferay.portal.SystemException {
89          return getFinder()
90                     .findByOrEntryIds(groupId, classNameIds, entryIds,
91              notEntryIds, publishDate, expirationDate);
92      }
93  
94      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByOrEntryIds(
95          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
96          java.lang.String orderByCol1, java.lang.String orderByCol2,
97          java.lang.String orderByType1, java.lang.String orderByType2,
98          boolean excludeZeroViewCount, java.util.Date publishDate,
99          java.util.Date expirationDate, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getFinder()
102                    .findByOrEntryIds(groupId, classNameIds, entryIds,
103             notEntryIds, orderByCol1, orderByCol2, orderByType1, orderByType2,
104             excludeZeroViewCount, publishDate, expirationDate, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByViewCount(
108         long[] classNameId, boolean asc, int start, int end)
109         throws com.liferay.portal.SystemException {
110         return getFinder().findByViewCount(classNameId, asc, start, end);
111     }
112 
113     public static TagsAssetFinder getFinder() {
114         if (_finder == null) {
115             _finder = (TagsAssetFinder)PortalBeanLocatorUtil.locate(TagsAssetFinder.class.getName());
116         }
117 
118         return _finder;
119     }
120 
121     public void setFinder(TagsAssetFinder finder) {
122         _finder = finder;
123     }
124 
125     private static TagsAssetFinder _finder;
126 }