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.dynamicdatamapping.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion;
022    
023    /**
024     * The persistence interface for the d d m template version service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDMTemplateVersionPersistenceImpl
032     * @see DDMTemplateVersionUtil
033     * @generated
034     */
035    @ProviderType
036    public interface DDMTemplateVersionPersistence extends BasePersistence<DDMTemplateVersion> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link DDMTemplateVersionUtil} to access the d d m template version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the d d m template versions where templateId = &#63;.
045            *
046            * @param templateId the template ID
047            * @return the matching d d m template versions
048            */
049            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findByTemplateId(
050                    long templateId);
051    
052            /**
053            * Returns a range of all the d d m template versions where templateId = &#63;.
054            *
055            * <p>
056            * 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.dynamicdatamapping.model.impl.DDMTemplateVersionModelImpl}. 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.
057            * </p>
058            *
059            * @param templateId the template ID
060            * @param start the lower bound of the range of d d m template versions
061            * @param end the upper bound of the range of d d m template versions (not inclusive)
062            * @return the range of matching d d m template versions
063            */
064            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findByTemplateId(
065                    long templateId, int start, int end);
066    
067            /**
068            * Returns an ordered range of all the d d m template versions where templateId = &#63;.
069            *
070            * <p>
071            * 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.dynamicdatamapping.model.impl.DDMTemplateVersionModelImpl}. 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.
072            * </p>
073            *
074            * @param templateId the template ID
075            * @param start the lower bound of the range of d d m template versions
076            * @param end the upper bound of the range of d d m template versions (not inclusive)
077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
078            * @return the ordered range of matching d d m template versions
079            */
080            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findByTemplateId(
081                    long templateId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator);
083    
084            /**
085            * Returns the first d d m template version in the ordered set where templateId = &#63;.
086            *
087            * @param templateId the template ID
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching d d m template version
090            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a matching d d m template version could not be found
091            */
092            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion findByTemplateId_First(
093                    long templateId,
094                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator)
095                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
096    
097            /**
098            * Returns the first d d m template version in the ordered set where templateId = &#63;.
099            *
100            * @param templateId the template ID
101            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
102            * @return the first matching d d m template version, or <code>null</code> if a matching d d m template version could not be found
103            */
104            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion fetchByTemplateId_First(
105                    long templateId,
106                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator);
107    
108            /**
109            * Returns the last d d m template version in the ordered set where templateId = &#63;.
110            *
111            * @param templateId the template ID
112            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
113            * @return the last matching d d m template version
114            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a matching d d m template version could not be found
115            */
116            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion findByTemplateId_Last(
117                    long templateId,
118                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator)
119                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
120    
121            /**
122            * Returns the last d d m template version in the ordered set where templateId = &#63;.
123            *
124            * @param templateId the template ID
125            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
126            * @return the last matching d d m template version, or <code>null</code> if a matching d d m template version could not be found
127            */
128            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion fetchByTemplateId_Last(
129                    long templateId,
130                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator);
131    
132            /**
133            * Returns the d d m template versions before and after the current d d m template version in the ordered set where templateId = &#63;.
134            *
135            * @param templateVersionId the primary key of the current d d m template version
136            * @param templateId the template ID
137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
138            * @return the previous, current, and next d d m template version
139            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a d d m template version with the primary key could not be found
140            */
141            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion[] findByTemplateId_PrevAndNext(
142                    long templateVersionId, long templateId,
143                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator)
144                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
145    
146            /**
147            * Removes all the d d m template versions where templateId = &#63; from the database.
148            *
149            * @param templateId the template ID
150            */
151            public void removeByTemplateId(long templateId);
152    
153            /**
154            * Returns the number of d d m template versions where templateId = &#63;.
155            *
156            * @param templateId the template ID
157            * @return the number of matching d d m template versions
158            */
159            public int countByTemplateId(long templateId);
160    
161            /**
162            * Returns the d d m template version where templateId = &#63; and version = &#63; or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException} if it could not be found.
163            *
164            * @param templateId the template ID
165            * @param version the version
166            * @return the matching d d m template version
167            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a matching d d m template version could not be found
168            */
169            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion findByT_V(
170                    long templateId, java.lang.String version)
171                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
172    
173            /**
174            * Returns the d d m template version where templateId = &#63; and version = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
175            *
176            * @param templateId the template ID
177            * @param version the version
178            * @return the matching d d m template version, or <code>null</code> if a matching d d m template version could not be found
179            */
180            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion fetchByT_V(
181                    long templateId, java.lang.String version);
182    
183            /**
184            * Returns the d d m template version where templateId = &#63; and version = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
185            *
186            * @param templateId the template ID
187            * @param version the version
188            * @param retrieveFromCache whether to use the finder cache
189            * @return the matching d d m template version, or <code>null</code> if a matching d d m template version could not be found
190            */
191            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion fetchByT_V(
192                    long templateId, java.lang.String version, boolean retrieveFromCache);
193    
194            /**
195            * Removes the d d m template version where templateId = &#63; and version = &#63; from the database.
196            *
197            * @param templateId the template ID
198            * @param version the version
199            * @return the d d m template version that was removed
200            */
201            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion removeByT_V(
202                    long templateId, java.lang.String version)
203                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
204    
205            /**
206            * Returns the number of d d m template versions where templateId = &#63; and version = &#63;.
207            *
208            * @param templateId the template ID
209            * @param version the version
210            * @return the number of matching d d m template versions
211            */
212            public int countByT_V(long templateId, java.lang.String version);
213    
214            /**
215            * Caches the d d m template version in the entity cache if it is enabled.
216            *
217            * @param ddmTemplateVersion the d d m template version
218            */
219            public void cacheResult(
220                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion ddmTemplateVersion);
221    
222            /**
223            * Caches the d d m template versions in the entity cache if it is enabled.
224            *
225            * @param ddmTemplateVersions the d d m template versions
226            */
227            public void cacheResult(
228                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> ddmTemplateVersions);
229    
230            /**
231            * Creates a new d d m template version with the primary key. Does not add the d d m template version to the database.
232            *
233            * @param templateVersionId the primary key for the new d d m template version
234            * @return the new d d m template version
235            */
236            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion create(
237                    long templateVersionId);
238    
239            /**
240            * Removes the d d m template version with the primary key from the database. Also notifies the appropriate model listeners.
241            *
242            * @param templateVersionId the primary key of the d d m template version
243            * @return the d d m template version that was removed
244            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a d d m template version with the primary key could not be found
245            */
246            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion remove(
247                    long templateVersionId)
248                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
249    
250            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion updateImpl(
251                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion ddmTemplateVersion);
252    
253            /**
254            * Returns the d d m template version with the primary key or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException} if it could not be found.
255            *
256            * @param templateVersionId the primary key of the d d m template version
257            * @return the d d m template version
258            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException if a d d m template version with the primary key could not be found
259            */
260            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion findByPrimaryKey(
261                    long templateVersionId)
262                    throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException;
263    
264            /**
265            * Returns the d d m template version with the primary key or returns <code>null</code> if it could not be found.
266            *
267            * @param templateVersionId the primary key of the d d m template version
268            * @return the d d m template version, or <code>null</code> if a d d m template version with the primary key could not be found
269            */
270            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion fetchByPrimaryKey(
271                    long templateVersionId);
272    
273            @Override
274            public java.util.Map<java.io.Serializable, com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> fetchByPrimaryKeys(
275                    java.util.Set<java.io.Serializable> primaryKeys);
276    
277            /**
278            * Returns all the d d m template versions.
279            *
280            * @return the d d m template versions
281            */
282            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findAll();
283    
284            /**
285            * Returns a range of all the d d m template versions.
286            *
287            * <p>
288            * 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.dynamicdatamapping.model.impl.DDMTemplateVersionModelImpl}. 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.
289            * </p>
290            *
291            * @param start the lower bound of the range of d d m template versions
292            * @param end the upper bound of the range of d d m template versions (not inclusive)
293            * @return the range of d d m template versions
294            */
295            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findAll(
296                    int start, int end);
297    
298            /**
299            * Returns an ordered range of all the d d m template versions.
300            *
301            * <p>
302            * 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.dynamicdatamapping.model.impl.DDMTemplateVersionModelImpl}. 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.
303            * </p>
304            *
305            * @param start the lower bound of the range of d d m template versions
306            * @param end the upper bound of the range of d d m template versions (not inclusive)
307            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
308            * @return the ordered range of d d m template versions
309            */
310            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> findAll(
311                    int start, int end,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion> orderByComparator);
313    
314            /**
315            * Removes all the d d m template versions from the database.
316            */
317            public void removeAll();
318    
319            /**
320            * Returns the number of d d m template versions.
321            *
322            * @return the number of d d m template versions
323            */
324            public int countAll();
325    }