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