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.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.service.BaseLocalService; 026 import com.liferay.portal.service.PersistedModelLocalService; 027 028 /** 029 * Provides the local service interface for DDMContent. Methods of this 030 * service will not have security checks based on the propagated JAAS 031 * credentials because this service can only be accessed from within the same 032 * VM. 033 * 034 * @author Brian Wing Shun Chan 035 * @see DDMContentLocalServiceUtil 036 * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMContentLocalServiceBaseImpl 037 * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMContentLocalServiceImpl 038 * @generated 039 */ 040 @ProviderType 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface DDMContentLocalService extends BaseLocalService, 044 PersistedModelLocalService { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. Always use {@link DDMContentLocalServiceUtil} to access the d d m content local service. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMContentLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 049 */ 050 public com.liferay.portlet.dynamicdatamapping.model.DDMContent addContent( 051 long userId, long groupId, java.lang.String name, 052 java.lang.String description, java.lang.String data, 053 com.liferay.portal.service.ServiceContext serviceContext) 054 throws PortalException; 055 056 /** 057 * Adds the d d m content to the database. Also notifies the appropriate model listeners. 058 * 059 * @param ddmContent the d d m content 060 * @return the d d m content that was added 061 */ 062 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 063 public com.liferay.portlet.dynamicdatamapping.model.DDMContent addDDMContent( 064 com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent); 065 066 /** 067 * Creates a new d d m content with the primary key. Does not add the d d m content to the database. 068 * 069 * @param contentId the primary key for the new d d m content 070 * @return the new d d m content 071 */ 072 public com.liferay.portlet.dynamicdatamapping.model.DDMContent createDDMContent( 073 long contentId); 074 075 public void deleteContent( 076 com.liferay.portlet.dynamicdatamapping.model.DDMContent content); 077 078 public void deleteContents(long groupId); 079 080 /** 081 * Deletes the d d m content with the primary key from the database. Also notifies the appropriate model listeners. 082 * 083 * @param contentId the primary key of the d d m content 084 * @return the d d m content that was removed 085 * @throws PortalException if a d d m content with the primary key could not be found 086 */ 087 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 088 public com.liferay.portlet.dynamicdatamapping.model.DDMContent deleteDDMContent( 089 long contentId) throws PortalException; 090 091 /** 092 * Deletes the d d m content from the database. Also notifies the appropriate model listeners. 093 * 094 * @param ddmContent the d d m content 095 * @return the d d m content that was removed 096 */ 097 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 098 public com.liferay.portlet.dynamicdatamapping.model.DDMContent deleteDDMContent( 099 com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent); 100 101 /** 102 * @throws PortalException 103 */ 104 @Override 105 public com.liferay.portal.model.PersistedModel deletePersistedModel( 106 com.liferay.portal.model.PersistedModel persistedModel) 107 throws PortalException; 108 109 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 110 111 /** 112 * Performs a dynamic query on the database and returns the matching rows. 113 * 114 * @param dynamicQuery the dynamic query 115 * @return the matching rows 116 */ 117 public <T> java.util.List<T> dynamicQuery( 118 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 119 120 /** 121 * Performs a dynamic query on the database and returns a range of the matching rows. 122 * 123 * <p> 124 * 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.DDMContentModelImpl}. 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. 125 * </p> 126 * 127 * @param dynamicQuery the dynamic query 128 * @param start the lower bound of the range of model instances 129 * @param end the upper bound of the range of model instances (not inclusive) 130 * @return the range of matching rows 131 */ 132 public <T> java.util.List<T> dynamicQuery( 133 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 134 int end); 135 136 /** 137 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 138 * 139 * <p> 140 * 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.DDMContentModelImpl}. 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. 141 * </p> 142 * 143 * @param dynamicQuery the dynamic query 144 * @param start the lower bound of the range of model instances 145 * @param end the upper bound of the range of model instances (not inclusive) 146 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 147 * @return the ordered range of matching rows 148 */ 149 public <T> java.util.List<T> dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 151 int end, 152 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 153 154 /** 155 * Returns the number of rows matching the dynamic query. 156 * 157 * @param dynamicQuery the dynamic query 158 * @return the number of rows matching the dynamic query 159 */ 160 public long dynamicQueryCount( 161 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 162 163 /** 164 * Returns the number of rows matching the dynamic query. 165 * 166 * @param dynamicQuery the dynamic query 167 * @param projection the projection to apply to the query 168 * @return the number of rows matching the dynamic query 169 */ 170 public long dynamicQueryCount( 171 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 172 com.liferay.portal.kernel.dao.orm.Projection projection); 173 174 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 175 public com.liferay.portlet.dynamicdatamapping.model.DDMContent fetchDDMContent( 176 long contentId); 177 178 /** 179 * Returns the d d m content matching the UUID and group. 180 * 181 * @param uuid the d d m content's UUID 182 * @param groupId the primary key of the group 183 * @return the matching d d m content, or <code>null</code> if a matching d d m content could not be found 184 */ 185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 186 public com.liferay.portlet.dynamicdatamapping.model.DDMContent fetchDDMContentByUuidAndGroupId( 187 java.lang.String uuid, long groupId); 188 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 191 192 /** 193 * Returns the Spring bean ID for this bean. 194 * 195 * @return the Spring bean ID for this bean 196 */ 197 public java.lang.String getBeanIdentifier(); 198 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portlet.dynamicdatamapping.model.DDMContent getContent( 201 long contentId) throws PortalException; 202 203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 204 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents(); 205 206 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 207 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents( 208 long groupId); 209 210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 211 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents( 212 long groupId, int start, int end); 213 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public int getContentsCount(long groupId); 216 217 /** 218 * Returns the d d m content with the primary key. 219 * 220 * @param contentId the primary key of the d d m content 221 * @return the d d m content 222 * @throws PortalException if a d d m content with the primary key could not be found 223 */ 224 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 225 public com.liferay.portlet.dynamicdatamapping.model.DDMContent getDDMContent( 226 long contentId) throws PortalException; 227 228 /** 229 * Returns the d d m content matching the UUID and group. 230 * 231 * @param uuid the d d m content's UUID 232 * @param groupId the primary key of the group 233 * @return the matching d d m content 234 * @throws PortalException if a matching d d m content could not be found 235 */ 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public com.liferay.portlet.dynamicdatamapping.model.DDMContent getDDMContentByUuidAndGroupId( 238 java.lang.String uuid, long groupId) throws PortalException; 239 240 /** 241 * Returns a range of all the d d m contents. 242 * 243 * <p> 244 * 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.DDMContentModelImpl}. 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. 245 * </p> 246 * 247 * @param start the lower bound of the range of d d m contents 248 * @param end the upper bound of the range of d d m contents (not inclusive) 249 * @return the range of d d m contents 250 */ 251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 252 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContents( 253 int start, int end); 254 255 /** 256 * Returns all the d d m contents matching the UUID and company. 257 * 258 * @param uuid the UUID of the d d m contents 259 * @param companyId the primary key of the company 260 * @return the matching d d m contents, or an empty list if no matches were found 261 */ 262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 263 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId( 264 java.lang.String uuid, long companyId); 265 266 /** 267 * Returns a range of d d m contents matching the UUID and company. 268 * 269 * @param uuid the UUID of the d d m contents 270 * @param companyId the primary key of the company 271 * @param start the lower bound of the range of d d m contents 272 * @param end the upper bound of the range of d d m contents (not inclusive) 273 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 274 * @return the range of matching d d m contents, or an empty list if no matches were found 275 */ 276 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 277 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId( 278 java.lang.String uuid, long companyId, int start, int end, 279 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMContent> orderByComparator); 280 281 /** 282 * Returns the number of d d m contents. 283 * 284 * @return the number of d d m contents 285 */ 286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 287 public int getDDMContentsCount(); 288 289 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 290 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 291 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 292 293 @Override 294 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 295 public com.liferay.portal.model.PersistedModel getPersistedModel( 296 java.io.Serializable primaryKeyObj) throws PortalException; 297 298 /** 299 * Sets the Spring bean ID for this bean. 300 * 301 * @param beanIdentifier the Spring bean ID for this bean 302 */ 303 public void setBeanIdentifier(java.lang.String beanIdentifier); 304 305 public com.liferay.portlet.dynamicdatamapping.model.DDMContent updateContent( 306 long contentId, java.lang.String name, java.lang.String description, 307 java.lang.String data, 308 com.liferay.portal.service.ServiceContext serviceContext) 309 throws PortalException; 310 311 /** 312 * Updates the d d m content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 313 * 314 * @param ddmContent the d d m content 315 * @return the d d m content that was updated 316 */ 317 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 318 public com.liferay.portlet.dynamicdatamapping.model.DDMContent updateDDMContent( 319 com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent); 320 }