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