001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatalists.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for DDLRecord. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDLRecordService
032     * @see com.liferay.portlet.dynamicdatalists.service.base.DDLRecordServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDLRecordServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord addRecord(
044                    long groupId, long recordSetId, int displayIndex,
045                    com.liferay.portlet.dynamicdatamapping.storage.Fields fields,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addRecord(groupId, recordSetId, displayIndex, fields,
050                            serviceContext);
051            }
052    
053            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord addRecord(
054                    long groupId, long recordSetId, int displayIndex,
055                    java.util.Map<java.lang.String, java.io.Serializable> fieldsMap,
056                    com.liferay.portal.service.ServiceContext serviceContext)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService()
059                                       .addRecord(groupId, recordSetId, displayIndex, fieldsMap,
060                            serviceContext);
061            }
062    
063            public static void deleteRecord(long recordId)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    getService().deleteRecord(recordId);
066            }
067    
068            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord deleteRecordLocale(
069                    long recordId, java.util.Locale locale,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService().deleteRecordLocale(recordId, locale, serviceContext);
073            }
074    
075            /**
076            * Returns the Spring bean ID for this bean.
077            *
078            * @return the Spring bean ID for this bean
079            */
080            public static java.lang.String getBeanIdentifier() {
081                    return getService().getBeanIdentifier();
082            }
083    
084            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord getRecord(
085                    long recordId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().getRecord(recordId);
088            }
089    
090            public static void revertRecord(long recordId, java.lang.String version,
091                    com.liferay.portal.service.ServiceContext serviceContext)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    getService().revertRecord(recordId, version, serviceContext);
094            }
095    
096            /**
097            * @deprecated As of 7.0.0, replaced by {@link #revertRecord(long, long,
098            String, ServiceContext)}
099            */
100            @Deprecated
101            public static void revertRecordVersion(long recordId,
102                    java.lang.String version,
103                    com.liferay.portal.service.ServiceContext serviceContext)
104                    throws com.liferay.portal.kernel.exception.PortalException {
105                    getService().revertRecordVersion(recordId, version, serviceContext);
106            }
107    
108            /**
109            * Sets the Spring bean ID for this bean.
110            *
111            * @param beanIdentifier the Spring bean ID for this bean
112            */
113            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
114                    getService().setBeanIdentifier(beanIdentifier);
115            }
116    
117            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord updateRecord(
118                    long recordId, int displayIndex,
119                    java.util.Map<java.lang.String, java.io.Serializable> fieldsMap,
120                    boolean mergeFields,
121                    com.liferay.portal.service.ServiceContext serviceContext)
122                    throws com.liferay.portal.kernel.exception.PortalException {
123                    return getService()
124                                       .updateRecord(recordId, displayIndex, fieldsMap,
125                            mergeFields, serviceContext);
126            }
127    
128            public static com.liferay.portlet.dynamicdatalists.model.DDLRecord updateRecord(
129                    long recordId, boolean majorVersion, int displayIndex,
130                    com.liferay.portlet.dynamicdatamapping.storage.Fields fields,
131                    boolean mergeFields,
132                    com.liferay.portal.service.ServiceContext serviceContext)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    return getService()
135                                       .updateRecord(recordId, majorVersion, displayIndex, fields,
136                            mergeFields, serviceContext);
137            }
138    
139            public static DDLRecordService getService() {
140                    if (_service == null) {
141                            _service = (DDLRecordService)PortalBeanLocatorUtil.locate(DDLRecordService.class.getName());
142    
143                            ReferenceRegistry.registerReference(DDLRecordServiceUtil.class,
144                                    "_service");
145                    }
146    
147                    return _service;
148            }
149    
150            /**
151             * @deprecated As of 6.2.0
152             */
153            @Deprecated
154            public void setService(DDLRecordService service) {
155            }
156    
157            private static DDLRecordService _service;
158    }