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 /** 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 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows( 201 long companyId, java.lang.String className, int start, int end); 202 203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 204 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows( 205 long companyId, long classNameId, int start, int end); 206 207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 208 public int getDefaultTableRowsCount(long companyId, 209 java.lang.String className); 210 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public int getDefaultTableRowsCount(long companyId, long classNameId); 213 214 /** 215 * Returns the expando row with the primary key. 216 * 217 * @param rowId the primary key of the expando row 218 * @return the expando row 219 * @throws PortalException if a expando row with the primary key could not be found 220 */ 221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 222 public com.liferay.portlet.expando.model.ExpandoRow getExpandoRow( 223 long rowId) throws PortalException; 224 225 /** 226 * Returns a range of all the expando rows. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param start the lower bound of the range of expando rows 233 * @param end the upper bound of the range of expando rows (not inclusive) 234 * @return the range of expando rows 235 */ 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getExpandoRows( 238 int start, int end); 239 240 /** 241 * Returns the number of expando rows. 242 * 243 * @return the number of expando rows 244 */ 245 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 246 public int getExpandoRowsCount(); 247 248 @Override 249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 250 public com.liferay.portal.model.PersistedModel getPersistedModel( 251 java.io.Serializable primaryKeyObj) throws PortalException; 252 253 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 254 public com.liferay.portlet.expando.model.ExpandoRow getRow(long companyId, 255 java.lang.String className, java.lang.String tableName, long classPK); 256 257 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 258 public com.liferay.portlet.expando.model.ExpandoRow getRow(long companyId, 259 long classNameId, java.lang.String tableName, long classPK); 260 261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 262 public com.liferay.portlet.expando.model.ExpandoRow getRow(long rowId) 263 throws PortalException; 264 265 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 266 public com.liferay.portlet.expando.model.ExpandoRow getRow(long tableId, 267 long classPK) throws PortalException; 268 269 /** 270 * @deprecated As of 6.1.0, replaced by {@link #getRows(long, String, 271 String, int, int)} 272 */ 273 @java.lang.Deprecated 274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 275 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 276 java.lang.String className, java.lang.String tableName, int start, 277 int end); 278 279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 280 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 281 long companyId, java.lang.String className, java.lang.String tableName, 282 int start, int end); 283 284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 285 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 286 long companyId, long classNameId, java.lang.String tableName, 287 int start, int end); 288 289 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 290 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows( 291 long tableId, int start, int end); 292 293 /** 294 * @deprecated As of 6.1.0, replaced by {@link #getRowsCount(long, String, 295 String)} 296 */ 297 @java.lang.Deprecated 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public int getRowsCount(java.lang.String className, 300 java.lang.String tableName); 301 302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 303 public int getRowsCount(long companyId, java.lang.String className, 304 java.lang.String tableName); 305 306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 307 public int getRowsCount(long companyId, long classNameId, 308 java.lang.String tableName); 309 310 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 311 public int getRowsCount(long tableId); 312 313 /** 314 * Sets the Spring bean ID for this bean. 315 * 316 * @param beanIdentifier the Spring bean ID for this bean 317 */ 318 public void setBeanIdentifier(java.lang.String beanIdentifier); 319 320 /** 321 * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 322 * 323 * @param expandoRow the expando row 324 * @return the expando row that was updated 325 */ 326 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 327 public com.liferay.portlet.expando.model.ExpandoRow updateExpandoRow( 328 com.liferay.portlet.expando.model.ExpandoRow expandoRow); 329 }