| ClassNameLocalServiceFactory.java |
1 /**
2 * Copyright (c) 2000-2009 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 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17 * SOFTWARE.
18 */
19
20 package com.liferay.portal.service;
21
22 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
23
24 /**
25 * <a href="ClassNameLocalServiceFactory.java.html"><b><i>View Source</i></b></a>
26 *
27 * <p>
28 * ServiceBuilder generated this class. Modifications in this class will be
29 * overwritten the next time is generated.
30 * </p>
31 *
32 * <p>
33 * This class is responsible for the lookup of the implementation for
34 * <code>com.liferay.portal.service.ClassNameLocalService</code>.
35 * Spring manages the lookup and lifecycle of the beans. This means you can
36 * modify the Spring configuration files to return a different implementation or
37 * to inject additional behavior.
38 * </p>
39 *
40 * <p>
41 * See the <code>spring.configs</code> property in portal.properties for
42 * additional information on how to customize the Spring XML files.
43 * </p>
44 *
45 * @author Brian Wing Shun Chan
46 *
47 * @see com.liferay.portal.service.ClassNameLocalService
48 * @see com.liferay.portal.service.ClassNameLocalServiceUtil
49 *
50 */
51 public class ClassNameLocalServiceFactory {
52 /**
53 * @deprecated
54 */
55 public static ClassNameLocalService getService() {
56 return _getFactory()._service;
57 }
58
59 /**
60 * @deprecated
61 */
62 public static ClassNameLocalService getImpl() {
63 if (_impl == null) {
64 _impl = (ClassNameLocalService)PortalBeanLocatorUtil.locate(_IMPL);
65 }
66
67 return _impl;
68 }
69
70 /**
71 * @deprecated
72 */
73 public static ClassNameLocalService getTxImpl() {
74 if (_txImpl == null) {
75 _txImpl = (ClassNameLocalService)PortalBeanLocatorUtil.locate(_TX_IMPL);
76 }
77
78 return _txImpl;
79 }
80
81 /**
82 * @deprecated
83 */
84 public void setService(ClassNameLocalService service) {
85 _service = service;
86 }
87
88 private static ClassNameLocalServiceFactory _getFactory() {
89 if (_factory == null) {
90 _factory = (ClassNameLocalServiceFactory)PortalBeanLocatorUtil.locate(_FACTORY);
91 }
92
93 return _factory;
94 }
95
96 private static final String _FACTORY = ClassNameLocalServiceFactory.class.getName();
97 private static final String _IMPL = ClassNameLocalService.class.getName() +
98 ".impl";
99 private static final String _TX_IMPL = ClassNameLocalService.class.getName() +
100 ".transaction";
101 private static ClassNameLocalServiceFactory _factory;
102 private static ClassNameLocalService _impl;
103 private static ClassNameLocalService _txImpl;
104 private ClassNameLocalService _service;
105 }