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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portlet.expando.model.ExpandoColumn getColumn(
203                    long columnId) throws PortalException;
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public com.liferay.portlet.expando.model.ExpandoColumn getColumn(
207                    long companyId, java.lang.String className, java.lang.String tableName,
208                    java.lang.String name);
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public com.liferay.portlet.expando.model.ExpandoColumn getColumn(
212                    long companyId, long classNameId, java.lang.String tableName,
213                    java.lang.String name);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portlet.expando.model.ExpandoColumn getColumn(
217                    long tableId, java.lang.String name);
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
221                    long companyId, java.lang.String className, java.lang.String tableName);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
225                    long companyId, java.lang.String className, java.lang.String tableName,
226                    java.util.Collection<java.lang.String> columnNames);
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
230                    long companyId, long classNameId, java.lang.String tableName);
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
234                    long companyId, long classNameId, java.lang.String tableName,
235                    java.util.Collection<java.lang.String> names);
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
239                    long tableId);
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
243                    long tableId, java.util.Collection<java.lang.String> names);
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public int getColumnsCount(long companyId, java.lang.String className,
247                    java.lang.String tableName);
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public int getColumnsCount(long companyId, long classNameId,
251                    java.lang.String tableName);
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public int getColumnsCount(long tableId);
255    
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
258                    long companyId, java.lang.String className, java.lang.String name);
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
262                    long companyId, long classNameId, java.lang.String name);
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
266                    long companyId, java.lang.String className);
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
270                    long companyId, long classNameId);
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public int getDefaultTableColumnsCount(long companyId,
274                    java.lang.String className);
275    
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public int getDefaultTableColumnsCount(long companyId, long classNameId);
278    
279            /**
280            * Returns the expando column with the primary key.
281            *
282            * @param columnId the primary key of the expando column
283            * @return the expando column
284            * @throws PortalException if a expando column with the primary key could not be found
285            */
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public com.liferay.portlet.expando.model.ExpandoColumn getExpandoColumn(
288                    long columnId) throws PortalException;
289    
290            /**
291            * Returns a range of all the expando columns.
292            *
293            * <p>
294            * 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.
295            * </p>
296            *
297            * @param start the lower bound of the range of expando columns
298            * @param end the upper bound of the range of expando columns (not inclusive)
299            * @return the range of expando columns
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getExpandoColumns(
303                    int start, int end);
304    
305            /**
306            * Returns the number of expando columns.
307            *
308            * @return the number of expando columns
309            */
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public int getExpandoColumnsCount();
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
315    
316            /**
317            * Returns the OSGi service identifier.
318            *
319            * @return the OSGi service identifier
320            */
321            public java.lang.String getOSGiServiceIdentifier();
322    
323            @Override
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public com.liferay.portal.model.PersistedModel getPersistedModel(
326                    java.io.Serializable primaryKeyObj) throws PortalException;
327    
328            public com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
329                    long columnId, java.lang.String name, int type)
330                    throws PortalException;
331    
332            public com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
333                    long columnId, java.lang.String name, int type,
334                    java.lang.Object defaultData) throws PortalException;
335    
336            /**
337            * Updates the expando column in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
338            *
339            * @param expandoColumn the expando column
340            * @return the expando column that was updated
341            */
342            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
343            public com.liferay.portlet.expando.model.ExpandoColumn updateExpandoColumn(
344                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn);
345    
346            public com.liferay.portlet.expando.model.ExpandoColumn updateTypeSettings(
347                    long columnId, java.lang.String typeSettings) throws PortalException;
348    }