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.DDMStructureVersion;
022    
023    /**
024     * The persistence interface for the d d m structure 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 DDMStructureVersionPersistenceImpl
032     * @see DDMStructureVersionUtil
033     * @generated
034     */
035    @ProviderType
036    public interface DDMStructureVersionPersistence extends BasePersistence<DDMStructureVersion> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link DDMStructureVersionUtil} to access the d d m structure version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the d d m structure versions where structureId = &#63;.
045            *
046            * @param structureId the structure ID
047            * @return the matching d d m structure versions
048            */
049            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findByStructureId(
050                    long structureId);
051    
052            /**
053            * Returns a range of all the d d m structure versions where structureId = &#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.DDMStructureVersionModelImpl}. 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 structureId the structure ID
060            * @param start the lower bound of the range of d d m structure versions
061            * @param end the upper bound of the range of d d m structure versions (not inclusive)
062            * @return the range of matching d d m structure versions
063            */
064            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findByStructureId(
065                    long structureId, int start, int end);
066    
067            /**
068            * Returns an ordered range of all the d d m structure versions where structureId = &#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.DDMStructureVersionModelImpl}. 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 structureId the structure ID
075            * @param start the lower bound of the range of d d m structure versions
076            * @param end the upper bound of the range of d d m structure 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 structure versions
079            */
080            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findByStructureId(
081                    long structureId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator);
083    
084            /**
085            * Returns the first d d m structure version in the ordered set where structureId = &#63;.
086            *
087            * @param structureId the structure ID
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching d d m structure version
090            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a matching d d m structure version could not be found
091            */
092            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion findByStructureId_First(
093                    long structureId,
094                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator)
095                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
096    
097            /**
098            * Returns the first d d m structure version in the ordered set where structureId = &#63;.
099            *
100            * @param structureId the structure ID
101            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
102            * @return the first matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
103            */
104            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion fetchByStructureId_First(
105                    long structureId,
106                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator);
107    
108            /**
109            * Returns the last d d m structure version in the ordered set where structureId = &#63;.
110            *
111            * @param structureId the structure ID
112            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
113            * @return the last matching d d m structure version
114            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a matching d d m structure version could not be found
115            */
116            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion findByStructureId_Last(
117                    long structureId,
118                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator)
119                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
120    
121            /**
122            * Returns the last d d m structure version in the ordered set where structureId = &#63;.
123            *
124            * @param structureId the structure ID
125            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
126            * @return the last matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
127            */
128            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion fetchByStructureId_Last(
129                    long structureId,
130                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator);
131    
132            /**
133            * Returns the d d m structure versions before and after the current d d m structure version in the ordered set where structureId = &#63;.
134            *
135            * @param structureVersionId the primary key of the current d d m structure version
136            * @param structureId the structure 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 structure version
139            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
140            */
141            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion[] findByStructureId_PrevAndNext(
142                    long structureVersionId, long structureId,
143                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator)
144                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
145    
146            /**
147            * Removes all the d d m structure versions where structureId = &#63; from the database.
148            *
149            * @param structureId the structure ID
150            */
151            public void removeByStructureId(long structureId);
152    
153            /**
154            * Returns the number of d d m structure versions where structureId = &#63;.
155            *
156            * @param structureId the structure ID
157            * @return the number of matching d d m structure versions
158            */
159            public int countByStructureId(long structureId);
160    
161            /**
162            * Returns the d d m structure version where structureId = &#63; and version = &#63; or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException} if it could not be found.
163            *
164            * @param structureId the structure ID
165            * @param version the version
166            * @return the matching d d m structure version
167            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a matching d d m structure version could not be found
168            */
169            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion findByS_V(
170                    long structureId, java.lang.String version)
171                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
172    
173            /**
174            * Returns the d d m structure version where structureId = &#63; and version = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
175            *
176            * @param structureId the structure ID
177            * @param version the version
178            * @return the matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
179            */
180            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion fetchByS_V(
181                    long structureId, java.lang.String version);
182    
183            /**
184            * Returns the d d m structure version where structureId = &#63; and version = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
185            *
186            * @param structureId the structure ID
187            * @param version the version
188            * @param retrieveFromCache whether to use the finder cache
189            * @return the matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
190            */
191            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion fetchByS_V(
192                    long structureId, java.lang.String version, boolean retrieveFromCache);
193    
194            /**
195            * Removes the d d m structure version where structureId = &#63; and version = &#63; from the database.
196            *
197            * @param structureId the structure ID
198            * @param version the version
199            * @return the d d m structure version that was removed
200            */
201            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion removeByS_V(
202                    long structureId, java.lang.String version)
203                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
204    
205            /**
206            * Returns the number of d d m structure versions where structureId = &#63; and version = &#63;.
207            *
208            * @param structureId the structure ID
209            * @param version the version
210            * @return the number of matching d d m structure versions
211            */
212            public int countByS_V(long structureId, java.lang.String version);
213    
214            /**
215            * Caches the d d m structure version in the entity cache if it is enabled.
216            *
217            * @param ddmStructureVersion the d d m structure version
218            */
219            public void cacheResult(
220                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion ddmStructureVersion);
221    
222            /**
223            * Caches the d d m structure versions in the entity cache if it is enabled.
224            *
225            * @param ddmStructureVersions the d d m structure versions
226            */
227            public void cacheResult(
228                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> ddmStructureVersions);
229    
230            /**
231            * Creates a new d d m structure version with the primary key. Does not add the d d m structure version to the database.
232            *
233            * @param structureVersionId the primary key for the new d d m structure version
234            * @return the new d d m structure version
235            */
236            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion create(
237                    long structureVersionId);
238    
239            /**
240            * Removes the d d m structure version with the primary key from the database. Also notifies the appropriate model listeners.
241            *
242            * @param structureVersionId the primary key of the d d m structure version
243            * @return the d d m structure version that was removed
244            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
245            */
246            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion remove(
247                    long structureVersionId)
248                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
249    
250            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion updateImpl(
251                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion ddmStructureVersion);
252    
253            /**
254            * Returns the d d m structure version with the primary key or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException} if it could not be found.
255            *
256            * @param structureVersionId the primary key of the d d m structure version
257            * @return the d d m structure version
258            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
259            */
260            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion findByPrimaryKey(
261                    long structureVersionId)
262                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
263    
264            /**
265            * Returns the d d m structure version with the primary key or returns <code>null</code> if it could not be found.
266            *
267            * @param structureVersionId the primary key of the d d m structure version
268            * @return the d d m structure version, or <code>null</code> if a d d m structure version with the primary key could not be found
269            */
270            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion fetchByPrimaryKey(
271                    long structureVersionId);
272    
273            @Override
274            public java.util.Map<java.io.Serializable, com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> fetchByPrimaryKeys(
275                    java.util.Set<java.io.Serializable> primaryKeys);
276    
277            /**
278            * Returns all the d d m structure versions.
279            *
280            * @return the d d m structure versions
281            */
282            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findAll();
283    
284            /**
285            * Returns a range of all the d d m structure 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.DDMStructureVersionModelImpl}. 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 structure versions
292            * @param end the upper bound of the range of d d m structure versions (not inclusive)
293            * @return the range of d d m structure versions
294            */
295            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findAll(
296                    int start, int end);
297    
298            /**
299            * Returns an ordered range of all the d d m structure 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.DDMStructureVersionModelImpl}. 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 structure versions
306            * @param end the upper bound of the range of d d m structure 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 structure versions
309            */
310            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> findAll(
311                    int start, int end,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructureVersion> orderByComparator);
313    
314            /**
315            * Removes all the d d m structure versions from the database.
316            */
317            public void removeAll();
318    
319            /**
320            * Returns the number of d d m structure versions.
321            *
322            * @return the number of d d m structure versions
323            */
324            public int countAll();
325    }