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.portlet.tags.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="TagsAssetFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class TagsAssetFinderUtil {
26      public static int countAssets(long groupId, long[] classNameIds,
27          boolean excludeZeroViewCount, java.util.Date publishDate,
28          java.util.Date expirationDate)
29          throws com.liferay.portal.SystemException {
30          return getFinder()
31                     .countAssets(groupId, classNameIds, excludeZeroViewCount,
32              publishDate, expirationDate);
33      }
34  
35      public static int countByAndEntryIds(long groupId, long[] classNameIds,
36          long[] entryIds, long[] notEntryIds, boolean excludeZeroViewCount,
37          java.util.Date publishDate, java.util.Date expirationDate)
38          throws com.liferay.portal.SystemException {
39          return getFinder()
40                     .countByAndEntryIds(groupId, classNameIds, entryIds,
41              notEntryIds, excludeZeroViewCount, publishDate, expirationDate);
42      }
43  
44      public static int countByOrEntryIds(long groupId, long[] classNameIds,
45          long[] entryIds, long[] notEntryIds, boolean excludeZeroViewCount,
46          java.util.Date publishDate, java.util.Date expirationDate)
47          throws com.liferay.portal.SystemException {
48          return getFinder()
49                     .countByOrEntryIds(groupId, classNameIds, entryIds,
50              notEntryIds, excludeZeroViewCount, publishDate, expirationDate);
51      }
52  
53      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAssets(
54          long groupId, long[] classNameIds, java.lang.String orderByCol1,
55          java.lang.String orderByCol2, java.lang.String orderByType1,
56          java.lang.String orderByType2, boolean excludeZeroViewCount,
57          java.util.Date publishDate, java.util.Date expirationDate, int start,
58          int end) throws com.liferay.portal.SystemException {
59          return getFinder()
60                     .findAssets(groupId, classNameIds, orderByCol1, orderByCol2,
61              orderByType1, orderByType2, excludeZeroViewCount, publishDate,
62              expirationDate, start, end);
63      }
64  
65      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByAndEntryIds(
66          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
67          java.lang.String orderByCol1, java.lang.String orderByCol2,
68          java.lang.String orderByType1, java.lang.String orderByType2,
69          boolean excludeZeroViewCount, java.util.Date publishDate,
70          java.util.Date expirationDate, int start, int end)
71          throws com.liferay.portal.SystemException {
72          return getFinder()
73                     .findByAndEntryIds(groupId, classNameIds, entryIds,
74              notEntryIds, orderByCol1, orderByCol2, orderByType1, orderByType2,
75              excludeZeroViewCount, publishDate, expirationDate, start, end);
76      }
77  
78      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByOrEntryIds(
79          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
80          java.util.Date publishDate, java.util.Date expirationDate)
81          throws com.liferay.portal.SystemException {
82          return getFinder()
83                     .findByOrEntryIds(groupId, classNameIds, entryIds,
84              notEntryIds, publishDate, expirationDate);
85      }
86  
87      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByOrEntryIds(
88          long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
89          java.lang.String orderByCol1, java.lang.String orderByCol2,
90          java.lang.String orderByType1, java.lang.String orderByType2,
91          boolean excludeZeroViewCount, java.util.Date publishDate,
92          java.util.Date expirationDate, int start, int end)
93          throws com.liferay.portal.SystemException {
94          return getFinder()
95                     .findByOrEntryIds(groupId, classNameIds, entryIds,
96              notEntryIds, orderByCol1, orderByCol2, orderByType1, orderByType2,
97              excludeZeroViewCount, publishDate, expirationDate, start, end);
98      }
99  
100     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByViewCount(
101         long[] classNameId, boolean asc, int start, int end)
102         throws com.liferay.portal.SystemException {
103         return getFinder().findByViewCount(classNameId, asc, start, end);
104     }
105 
106     public static TagsAssetFinder getFinder() {
107         if (_finder == null) {
108             _finder = (TagsAssetFinder)PortalBeanLocatorUtil.locate(TagsAssetFinder.class.getName());
109 
110             ReferenceRegistry.registerReference(TagsAssetFinderUtil.class,
111                 "_finder");
112         }
113 
114         return _finder;
115     }
116 
117     public void setFinder(TagsAssetFinder finder) {
118         _finder = finder;
119 
120         ReferenceRegistry.registerReference(TagsAssetFinderUtil.class, "_finder");
121     }
122 
123     private static TagsAssetFinder _finder;
124 }