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.blogs.service.persistence;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="BlogsEntryFinderUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class BlogsEntryFinderUtil {
33      public static int countByOrganizationId(long organizationId,
34          java.util.Date displayDate, boolean draft)
35          throws com.liferay.portal.SystemException {
36          return getFinder()
37                     .countByOrganizationId(organizationId, displayDate, draft);
38      }
39  
40      public static int countByOrganizationIds(
41          java.util.List<Long> organizationIds, java.util.Date displayDate,
42          boolean draft) throws com.liferay.portal.SystemException {
43          return getFinder()
44                     .countByOrganizationIds(organizationIds, displayDate, draft);
45      }
46  
47      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationId(
48          long organizationId, java.util.Date displayDate, boolean draft,
49          int start, int end) throws com.liferay.portal.SystemException {
50          return getFinder()
51                     .findByOrganizationId(organizationId, displayDate, draft,
52              start, end);
53      }
54  
55      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationIds(
56          java.util.List<Long> organizationIds, java.util.Date displayDate,
57          boolean draft, int start, int end)
58          throws com.liferay.portal.SystemException {
59          return getFinder()
60                     .findByOrganizationIds(organizationIds, displayDate, draft,
61              start, end);
62      }
63  
64      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByNoAssets()
65          throws com.liferay.portal.SystemException {
66          return getFinder().findByNoAssets();
67      }
68  
69      public static BlogsEntryFinder getFinder() {
70          if (_finder == null) {
71              _finder = (BlogsEntryFinder)PortalBeanLocatorUtil.locate(BlogsEntryFinder.class.getName());
72          }
73  
74          return _finder;
75      }
76  
77      public void setFinder(BlogsEntryFinder finder) {
78          _finder = finder;
79      }
80  
81      private static BlogsEntryFinder _finder;
82  }