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.imagegallery.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="IGImageFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class IGImageFinderUtil {
26      public static int countByFolderIds(java.util.List<java.lang.Long> folderIds)
27          throws com.liferay.portal.SystemException {
28          return getFinder().countByFolderIds(folderIds);
29      }
30  
31      public static com.liferay.portlet.imagegallery.model.IGImage fetchByAnyImageId(
32          long imageId) throws com.liferay.portal.SystemException {
33          return getFinder().fetchByAnyImageId(imageId);
34      }
35  
36      public static com.liferay.portlet.imagegallery.model.IGImage findByAnyImageId(
37          long imageId)
38          throws com.liferay.portal.SystemException,
39              com.liferay.portlet.imagegallery.NoSuchImageException {
40          return getFinder().findByAnyImageId(imageId);
41      }
42  
43      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByNoAssets()
44          throws com.liferay.portal.SystemException {
45          return getFinder().findByNoAssets();
46      }
47  
48      public static IGImageFinder getFinder() {
49          if (_finder == null) {
50              _finder = (IGImageFinder)PortalBeanLocatorUtil.locate(IGImageFinder.class.getName());
51  
52              ReferenceRegistry.registerReference(IGImageFinderUtil.class,
53                  "_finder");
54          }
55  
56          return _finder;
57      }
58  
59      public void setFinder(IGImageFinder finder) {
60          _finder = finder;
61  
62          ReferenceRegistry.registerReference(IGImageFinderUtil.class, "_finder");
63      }
64  
65      private static IGImageFinder _finder;
66  }