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