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.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="LayoutFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class LayoutFinderUtil {
26      public static java.util.List<com.liferay.portal.model.Layout> findByNullFriendlyURL()
27          throws com.liferay.portal.SystemException {
28          return getFinder().findByNullFriendlyURL();
29      }
30  
31      public static java.util.List<com.liferay.portal.model.LayoutReference> findByC_P_P(
32          long companyId, java.lang.String portletId,
33          java.lang.String preferencesKey, java.lang.String preferencesValue)
34          throws com.liferay.portal.SystemException {
35          return getFinder()
36                     .findByC_P_P(companyId, portletId, preferencesKey,
37              preferencesValue);
38      }
39  
40      public static LayoutFinder getFinder() {
41          if (_finder == null) {
42              _finder = (LayoutFinder)PortalBeanLocatorUtil.locate(LayoutFinder.class.getName());
43  
44              ReferenceRegistry.registerReference(LayoutFinderUtil.class,
45                  "_finder");
46          }
47  
48          return _finder;
49      }
50  
51      public void setFinder(LayoutFinder finder) {
52          _finder = finder;
53  
54          ReferenceRegistry.registerReference(LayoutFinderUtil.class, "_finder");
55      }
56  
57      private static LayoutFinder _finder;
58  }