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.expando.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 ExpandoRow. 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 ExpandoRowLocalServiceUtil 036 * @see com.liferay.portlet.expando.service.base.ExpandoRowLocalServiceBaseImpl 037 * @see com.liferay.portlet.expando.service.impl.ExpandoRowLocalServiceImpl 038 * @generated 039 */ 040 @ProviderType 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface ExpandoRowLocalService extends BaseLocalService, 044 PersistedModelLocalService { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. Always use {@link ExpandoRowLocalServiceUtil} to access the expando row local service. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoRowLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 049 */ 050 051 /** 052 * Adds the expando row to the database. Also notifies the appropriate model listeners. 053 * 054 * @param expandoRow the expando row 055 * @return the expando row that was added 056 */ 057 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 058 public com.liferay.portlet.expando.model.ExpandoRow addExpandoRow( 059 com.liferay.portlet.expando.model.ExpandoRow expandoRow); 060 061 public com.liferay.portlet.expando.model.ExpandoRow addRow(long tableId, 062 long classPK) throws PortalException; 063 064 /** 065 * Creates a new expando row with the primary key. Does not add the expando row to the database. 066 * 067 * @param rowId the primary key for the new expando row 068 * @return the new expando row 069 */ 070 public com.liferay.portlet.expando.model.ExpandoRow createExpandoRow( 071 long rowId); 072 073 /** 074 * Deletes the expando row from the database. Also notifies the appropriate model listeners. 075 * 076 * @param expandoRow the expando row 077 * @return the expando row that was removed 078 */ 079 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 080 public com.liferay.portlet.expando.model.ExpandoRow deleteExpandoRow( 081 com.liferay.portlet.expando.model.ExpandoRow expandoRow); 082 083 /** 084 * Deletes the expando row with the primary key from the database. Also notifies the appropriate model listeners. 085 * 086 * @param rowId the primary key of the expando row 087 * @return the expando row that was removed 088 * @throws PortalException if a expando row with the primary key could not be found 089 */ 090 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 091 public com.liferay.portlet.expando.model.ExpandoRow deleteExpandoRow( 092 long rowId) throws PortalException; 093 094 /** 095 * @throws PortalException 096 */ 097 @Override 098 public com.liferay.portal.model.PersistedModel deletePersistedModel( 099 com.liferay.portal.model.PersistedModel persistedModel) 100 throws PortalException; 101 102 public void deleteRow(long companyId, java.lang.String className, 103 java.lang.String tableName, long classPK) throws PortalException; 104 105 public void deleteRow(long companyId, long classNameId, 106 java.lang.String tableName, long classPK) throws PortalException; 107 108 public void deleteRow(com.liferay.portlet.expando.model.ExpandoRow row); 109 110 public void deleteRow(long rowId) throws PortalException; 111 112 public void deleteRow(long tableId, long classPK) throws PortalException; 113 114 public void deleteRows(long classPK); 115 116 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 117 118 /** 119 * Performs a dynamic query on the database and returns the matching rows. 120 * 121 * @param dynamicQuery the dynamic query 122 * @return the matching rows 123 */ 124 public <T> java.util.List<T> dynamicQuery( 125 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 126 127 /** 128 * Performs a dynamic query on the database and returns a range of the matching rows. 129 * 130 * <p> 131 * 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.expando.model.impl.ExpandoRowModelImpl}. 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. 132 * </p> 133 * 134 * @param dynamicQuery the dynamic query 135 * @param start the lower bound of the range of model instances 136 * @param end the upper bound of the range of model instances (not inclusive) 137 * @return the range of matching rows 138 */ 139 public <T> java.util.List<T> dynamicQuery( 140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 141 int end); 142 143 /** 144 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 145 * 146 * <p> 147 * 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.expando.model.impl.ExpandoRowModelImpl}. 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. 148 * </p> 149 * 150 * @param dynamicQuery the dynamic query 151 * @param start the lower bound of the range of model instances 152 * @param end the upper bound of the range of model instances (not inclusive) 153 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 154 * @return the ordered range of matching rows 155 */ 156 public <T> java.util.List<T> dynamicQuery( 157 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 158 int end, 159 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 160 161 /** 162 * Returns the number of rows matching the dynamic query. 163 * 164 * @param dynamicQuery the dynamic query 165 * @return the number of rows matching the dynamic query 166 */ 167 public long dynamicQueryCount( 168 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 169 170 /** 171 * Returns the number of rows matching the dynamic query. 172 * 173 * @param dynamicQuery the dynamic query 174 * @param projection the projection to apply to the query 175 * @return the number of rows matching the dynamic query 176 */ 177 public long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 179 com.liferay.portal.kernel.dao.orm.Projection projection); 180 181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 182 public com.liferay.portlet.expando.model.ExpandoRow fetchExpandoRow( 183 long rowId); 184 185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 186 public com.liferay.portlet.expando.model.ExpandoRow fetchRow(long tableId, 187 long classPK); 188 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 191 192 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 193 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows( 194 long companyId, java.lang.String className, int start, int end); 195 196 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 197 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows( 198 long companyId, long classNameId, int start, int end); 199 200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 201 public int getDefaultTableRowsCount(long companyId, 202 java.lang.String className); 203 204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 205 public int getDefaultTableRowsCount(long companyId, long classNameId); 206 207 /** 208 * Returns the expando row with the primary key. 209 * 210 * @param rowId the primary key of the expando row 211 * @return the expando row 212 * @throws PortalException if a expando row with the primary key could not be found 213 */ 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public com.liferay.portlet.expando.model.ExpandoRow getExpandoRow( 216 long rowId) throws PortalException; 217 218 /** 219 * Returns a range of all the expando rows. 220 * 221 * <p> 222 * 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.expando.model.impl.ExpandoRowModelImpl}. 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. 223 * </p> 224 * 225 * @param start the lower bound of the range of expando rows 226 * @param end the upper bound of the range of expando rows (not inclusive) 227 * @return the range of expando rows 228 */ 229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 230 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getExpandoRows( 231 int start, int end); 232 233 /** 234 * Returns the number of expando rows. 235 * 236 * @return the number of expando rows 237 */ 238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 239 public int getExpandoRowsCount(); 240 241 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 242 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 243 244 /** 245 * Returns the OSGi service identifier. 246 * 247 * @return the OSGi service identifier 248 */ 249 public java.lang.String getOSGiServiceIdentifier(); 250 251 @Override 252 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 253 public com.liferay.portal.model.PersistedModel getPersistedModel( 254 java.io.Serializable primaryKeyObj) throws PortalException; 255 256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 257 public com.liferay.portlet.expando.model.ExpandoRow getRow(long companyId, 258 java.lang.String className, java.lang.String tableName, long classPK); 259 260 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 261 public com.liferay.portlet.expando.model.ExpandoRow getRow(long companyId, 262 long classNameId, java.lang.String tableName, long classPK); 263 264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 265 public com.liferay.portlet.expando.model.ExpandoRow getRow(long rowId) 266 throws PortalException; 267 268 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 269 public com.liferay.portlet.expando.model.ExpandoRow getRow(long tableId, 270 long classPK) throws PortalException; 271 272 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 273 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 274 long companyId, java.lang.String className, java.lang.String tableName, 275 int start, int end); 276 277 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 278 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 279 long companyId, long classNameId, java.lang.String tableName, 280 int start, int end); 281 282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 283 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 284 long tableId, int start, int end); 285 286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 287 public int getRowsCount(long companyId, java.lang.String className, 288 java.lang.String tableName); 289 290 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 291 public int getRowsCount(long companyId, long classNameId, 292 java.lang.String tableName); 293 294 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 295 public int getRowsCount(long tableId); 296 297 /** 298 * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 299 * 300 * @param expandoRow the expando row 301 * @return the expando row that was updated 302 */ 303 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 304 public com.liferay.portlet.expando.model.ExpandoRow updateExpandoRow( 305 com.liferay.portlet.expando.model.ExpandoRow expandoRow); 306 }