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.dynamicdatamapping.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 local service utility for DDMTemplateLink. This utility wraps 024 * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLinkLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see DDMTemplateLinkLocalService 032 * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateLinkLocalServiceBaseImpl 033 * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLinkLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class DDMTemplateLinkLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the d d m template link to the database. Also notifies the appropriate model listeners. 046 * 047 * @param ddmTemplateLink the d d m template link 048 * @return the d d m template link that was added 049 */ 050 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink addDDMTemplateLink( 051 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink ddmTemplateLink) { 052 return getService().addDDMTemplateLink(ddmTemplateLink); 053 } 054 055 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink addTemplateLink( 056 long classNameId, long classPK, long templateId) { 057 return getService().addTemplateLink(classNameId, classPK, templateId); 058 } 059 060 /** 061 * Creates a new d d m template link with the primary key. Does not add the d d m template link to the database. 062 * 063 * @param templateLinkId the primary key for the new d d m template link 064 * @return the new d d m template link 065 */ 066 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink createDDMTemplateLink( 067 long templateLinkId) { 068 return getService().createDDMTemplateLink(templateLinkId); 069 } 070 071 /** 072 * Deletes the d d m template link from the database. Also notifies the appropriate model listeners. 073 * 074 * @param ddmTemplateLink the d d m template link 075 * @return the d d m template link that was removed 076 */ 077 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink deleteDDMTemplateLink( 078 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink ddmTemplateLink) { 079 return getService().deleteDDMTemplateLink(ddmTemplateLink); 080 } 081 082 /** 083 * Deletes the d d m template link with the primary key from the database. Also notifies the appropriate model listeners. 084 * 085 * @param templateLinkId the primary key of the d d m template link 086 * @return the d d m template link that was removed 087 * @throws PortalException if a d d m template link with the primary key could not be found 088 */ 089 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink deleteDDMTemplateLink( 090 long templateLinkId) 091 throws com.liferay.portal.kernel.exception.PortalException { 092 return getService().deleteDDMTemplateLink(templateLinkId); 093 } 094 095 /** 096 * @throws PortalException 097 */ 098 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 099 com.liferay.portal.model.PersistedModel persistedModel) 100 throws com.liferay.portal.kernel.exception.PortalException { 101 return getService().deletePersistedModel(persistedModel); 102 } 103 104 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink deleteTemplateLink( 105 long classNameId, long classPK) { 106 return getService().deleteTemplateLink(classNameId, classPK); 107 } 108 109 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink deleteTemplateLink( 110 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink templateLink) { 111 return getService().deleteTemplateLink(templateLink); 112 } 113 114 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink deleteTemplateLink( 115 long templateLinkId) 116 throws com.liferay.portal.kernel.exception.PortalException { 117 return getService().deleteTemplateLink(templateLinkId); 118 } 119 120 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 121 return getService().dynamicQuery(); 122 } 123 124 /** 125 * Performs a dynamic query on the database and returns the matching rows. 126 * 127 * @param dynamicQuery the dynamic query 128 * @return the matching rows 129 */ 130 public static <T> java.util.List<T> dynamicQuery( 131 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 132 return getService().dynamicQuery(dynamicQuery); 133 } 134 135 /** 136 * Performs a dynamic query on the database and returns a range of the matching rows. 137 * 138 * <p> 139 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 140 * </p> 141 * 142 * @param dynamicQuery the dynamic query 143 * @param start the lower bound of the range of model instances 144 * @param end the upper bound of the range of model instances (not inclusive) 145 * @return the range of matching rows 146 */ 147 public static <T> java.util.List<T> dynamicQuery( 148 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 149 int end) { 150 return getService().dynamicQuery(dynamicQuery, start, end); 151 } 152 153 /** 154 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 155 * 156 * <p> 157 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 158 * </p> 159 * 160 * @param dynamicQuery the dynamic query 161 * @param start the lower bound of the range of model instances 162 * @param end the upper bound of the range of model instances (not inclusive) 163 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 164 * @return the ordered range of matching rows 165 */ 166 public static <T> java.util.List<T> dynamicQuery( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 168 int end, 169 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 170 return getService() 171 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 172 } 173 174 /** 175 * Returns the number of rows matching the dynamic query. 176 * 177 * @param dynamicQuery the dynamic query 178 * @return the number of rows matching the dynamic query 179 */ 180 public static long dynamicQueryCount( 181 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 182 return getService().dynamicQueryCount(dynamicQuery); 183 } 184 185 /** 186 * Returns the number of rows matching the dynamic query. 187 * 188 * @param dynamicQuery the dynamic query 189 * @param projection the projection to apply to the query 190 * @return the number of rows matching the dynamic query 191 */ 192 public static long dynamicQueryCount( 193 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 194 com.liferay.portal.kernel.dao.orm.Projection projection) { 195 return getService().dynamicQueryCount(dynamicQuery, projection); 196 } 197 198 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink fetchDDMTemplateLink( 199 long templateLinkId) { 200 return getService().fetchDDMTemplateLink(templateLinkId); 201 } 202 203 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 204 return getService().getActionableDynamicQuery(); 205 } 206 207 /** 208 * Returns the Spring bean ID for this bean. 209 * 210 * @return the Spring bean ID for this bean 211 */ 212 public static java.lang.String getBeanIdentifier() { 213 return getService().getBeanIdentifier(); 214 } 215 216 /** 217 * Returns the d d m template link with the primary key. 218 * 219 * @param templateLinkId the primary key of the d d m template link 220 * @return the d d m template link 221 * @throws PortalException if a d d m template link with the primary key could not be found 222 */ 223 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink getDDMTemplateLink( 224 long templateLinkId) 225 throws com.liferay.portal.kernel.exception.PortalException { 226 return getService().getDDMTemplateLink(templateLinkId); 227 } 228 229 /** 230 * Returns a range of all the d d m template links. 231 * 232 * <p> 233 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 234 * </p> 235 * 236 * @param start the lower bound of the range of d d m template links 237 * @param end the upper bound of the range of d d m template links (not inclusive) 238 * @return the range of d d m template links 239 */ 240 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink> getDDMTemplateLinks( 241 int start, int end) { 242 return getService().getDDMTemplateLinks(start, end); 243 } 244 245 /** 246 * Returns the number of d d m template links. 247 * 248 * @return the number of d d m template links 249 */ 250 public static int getDDMTemplateLinksCount() { 251 return getService().getDDMTemplateLinksCount(); 252 } 253 254 public static com.liferay.portal.model.PersistedModel getPersistedModel( 255 java.io.Serializable primaryKeyObj) 256 throws com.liferay.portal.kernel.exception.PortalException { 257 return getService().getPersistedModel(primaryKeyObj); 258 } 259 260 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink getTemplateLink( 261 long classNameId, long classPK) 262 throws com.liferay.portal.kernel.exception.PortalException { 263 return getService().getTemplateLink(classNameId, classPK); 264 } 265 266 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink getTemplateLink( 267 long templateLinkId) 268 throws com.liferay.portal.kernel.exception.PortalException { 269 return getService().getTemplateLink(templateLinkId); 270 } 271 272 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink> getTemplateLinks( 273 long classNameId) { 274 return getService().getTemplateLinks(classNameId); 275 } 276 277 /** 278 * Sets the Spring bean ID for this bean. 279 * 280 * @param beanIdentifier the Spring bean ID for this bean 281 */ 282 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 283 getService().setBeanIdentifier(beanIdentifier); 284 } 285 286 /** 287 * Updates the d d m template link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 288 * 289 * @param ddmTemplateLink the d d m template link 290 * @return the d d m template link that was updated 291 */ 292 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink updateDDMTemplateLink( 293 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink ddmTemplateLink) { 294 return getService().updateDDMTemplateLink(ddmTemplateLink); 295 } 296 297 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink updateTemplateLink( 298 long classNameId, long classPK, long templateId) { 299 return getService().updateTemplateLink(classNameId, classPK, templateId); 300 } 301 302 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink updateTemplateLink( 303 long templateLinkId, long templateId) 304 throws com.liferay.portal.kernel.exception.PortalException { 305 return getService().updateTemplateLink(templateLinkId, templateId); 306 } 307 308 public static DDMTemplateLinkLocalService getService() { 309 if (_service == null) { 310 _service = (DDMTemplateLinkLocalService)PortalBeanLocatorUtil.locate(DDMTemplateLinkLocalService.class.getName()); 311 312 ReferenceRegistry.registerReference(DDMTemplateLinkLocalServiceUtil.class, 313 "_service"); 314 } 315 316 return _service; 317 } 318 319 /** 320 * @deprecated As of 6.2.0 321 */ 322 @Deprecated 323 public void setService(DDMTemplateLinkLocalService service) { 324 } 325 326 private static DDMTemplateLinkLocalService _service; 327 }