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 com.liferay.portlet.dynamicdatamapping.service.persistence.impl.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<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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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<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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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<DDMStructureVersion> findByStructureId(
081                    long structureId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<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 NoSuchStructureVersionException if a matching d d m structure version could not be found
091            */
092            public DDMStructureVersion findByStructureId_First(long structureId,
093                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
094                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
095    
096            /**
097            * Returns the first d d m structure version in the ordered set where structureId = &#63;.
098            *
099            * @param structureId the structure ID
100            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
101            * @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
102            */
103            public DDMStructureVersion fetchByStructureId_First(long structureId,
104                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
105    
106            /**
107            * Returns the last d d m structure version in the ordered set where structureId = &#63;.
108            *
109            * @param structureId the structure ID
110            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
111            * @return the last matching d d m structure version
112            * @throws NoSuchStructureVersionException if a matching d d m structure version could not be found
113            */
114            public DDMStructureVersion findByStructureId_Last(long structureId,
115                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
116                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
117    
118            /**
119            * Returns the last d d m structure version in the ordered set where structureId = &#63;.
120            *
121            * @param structureId the structure ID
122            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
123            * @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
124            */
125            public DDMStructureVersion fetchByStructureId_Last(long structureId,
126                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
127    
128            /**
129            * Returns the d d m structure versions before and after the current d d m structure version in the ordered set where structureId = &#63;.
130            *
131            * @param structureVersionId the primary key of the current d d m structure version
132            * @param structureId the structure ID
133            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
134            * @return the previous, current, and next d d m structure version
135            * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
136            */
137            public DDMStructureVersion[] findByStructureId_PrevAndNext(
138                    long structureVersionId, long structureId,
139                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
140                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
141    
142            /**
143            * Removes all the d d m structure versions where structureId = &#63; from the database.
144            *
145            * @param structureId the structure ID
146            */
147            public void removeByStructureId(long structureId);
148    
149            /**
150            * Returns the number of d d m structure versions where structureId = &#63;.
151            *
152            * @param structureId the structure ID
153            * @return the number of matching d d m structure versions
154            */
155            public int countByStructureId(long structureId);
156    
157            /**
158            * Returns the d d m structure version where structureId = &#63; and version = &#63; or throws a {@link NoSuchStructureVersionException} if it could not be found.
159            *
160            * @param structureId the structure ID
161            * @param version the version
162            * @return the matching d d m structure version
163            * @throws NoSuchStructureVersionException if a matching d d m structure version could not be found
164            */
165            public DDMStructureVersion findByS_V(long structureId,
166                    java.lang.String version)
167                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
168    
169            /**
170            * 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.
171            *
172            * @param structureId the structure ID
173            * @param version the version
174            * @return the matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
175            */
176            public DDMStructureVersion fetchByS_V(long structureId,
177                    java.lang.String version);
178    
179            /**
180            * 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.
181            *
182            * @param structureId the structure ID
183            * @param version the version
184            * @param retrieveFromCache whether to use the finder cache
185            * @return the matching d d m structure version, or <code>null</code> if a matching d d m structure version could not be found
186            */
187            public DDMStructureVersion fetchByS_V(long structureId,
188                    java.lang.String version, boolean retrieveFromCache);
189    
190            /**
191            * Removes the d d m structure version where structureId = &#63; and version = &#63; from the database.
192            *
193            * @param structureId the structure ID
194            * @param version the version
195            * @return the d d m structure version that was removed
196            */
197            public DDMStructureVersion removeByS_V(long structureId,
198                    java.lang.String version)
199                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
200    
201            /**
202            * Returns the number of d d m structure versions where structureId = &#63; and version = &#63;.
203            *
204            * @param structureId the structure ID
205            * @param version the version
206            * @return the number of matching d d m structure versions
207            */
208            public int countByS_V(long structureId, java.lang.String version);
209    
210            /**
211            * Returns all the d d m structure versions where structureId = &#63; and status = &#63;.
212            *
213            * @param structureId the structure ID
214            * @param status the status
215            * @return the matching d d m structure versions
216            */
217            public java.util.List<DDMStructureVersion> findByS_S(long structureId,
218                    int status);
219    
220            /**
221            * Returns a range of all the d d m structure versions where structureId = &#63; and status = &#63;.
222            *
223            * <p>
224            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
225            * </p>
226            *
227            * @param structureId the structure ID
228            * @param status the status
229            * @param start the lower bound of the range of d d m structure versions
230            * @param end the upper bound of the range of d d m structure versions (not inclusive)
231            * @return the range of matching d d m structure versions
232            */
233            public java.util.List<DDMStructureVersion> findByS_S(long structureId,
234                    int status, int start, int end);
235    
236            /**
237            * Returns an ordered range of all the d d m structure versions where structureId = &#63; and status = &#63;.
238            *
239            * <p>
240            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
241            * </p>
242            *
243            * @param structureId the structure ID
244            * @param status the status
245            * @param start the lower bound of the range of d d m structure versions
246            * @param end the upper bound of the range of d d m structure versions (not inclusive)
247            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
248            * @return the ordered range of matching d d m structure versions
249            */
250            public java.util.List<DDMStructureVersion> findByS_S(long structureId,
251                    int status, int start, int end,
252                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
253    
254            /**
255            * Returns the first d d m structure version in the ordered set where structureId = &#63; and status = &#63;.
256            *
257            * @param structureId the structure ID
258            * @param status the status
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the first matching d d m structure version
261            * @throws NoSuchStructureVersionException if a matching d d m structure version could not be found
262            */
263            public DDMStructureVersion findByS_S_First(long structureId, int status,
264                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
265                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
266    
267            /**
268            * Returns the first d d m structure version in the ordered set where structureId = &#63; and status = &#63;.
269            *
270            * @param structureId the structure ID
271            * @param status the status
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @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
274            */
275            public DDMStructureVersion fetchByS_S_First(long structureId, int status,
276                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
277    
278            /**
279            * Returns the last d d m structure version in the ordered set where structureId = &#63; and status = &#63;.
280            *
281            * @param structureId the structure ID
282            * @param status the status
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the last matching d d m structure version
285            * @throws NoSuchStructureVersionException if a matching d d m structure version could not be found
286            */
287            public DDMStructureVersion findByS_S_Last(long structureId, int status,
288                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
289                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
290    
291            /**
292            * Returns the last d d m structure version in the ordered set where structureId = &#63; and status = &#63;.
293            *
294            * @param structureId the structure ID
295            * @param status the status
296            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
297            * @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
298            */
299            public DDMStructureVersion fetchByS_S_Last(long structureId, int status,
300                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
301    
302            /**
303            * Returns the d d m structure versions before and after the current d d m structure version in the ordered set where structureId = &#63; and status = &#63;.
304            *
305            * @param structureVersionId the primary key of the current d d m structure version
306            * @param structureId the structure ID
307            * @param status the status
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next d d m structure version
310            * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
311            */
312            public DDMStructureVersion[] findByS_S_PrevAndNext(
313                    long structureVersionId, long structureId, int status,
314                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator)
315                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
316    
317            /**
318            * Removes all the d d m structure versions where structureId = &#63; and status = &#63; from the database.
319            *
320            * @param structureId the structure ID
321            * @param status the status
322            */
323            public void removeByS_S(long structureId, int status);
324    
325            /**
326            * Returns the number of d d m structure versions where structureId = &#63; and status = &#63;.
327            *
328            * @param structureId the structure ID
329            * @param status the status
330            * @return the number of matching d d m structure versions
331            */
332            public int countByS_S(long structureId, int status);
333    
334            /**
335            * Caches the d d m structure version in the entity cache if it is enabled.
336            *
337            * @param ddmStructureVersion the d d m structure version
338            */
339            public void cacheResult(DDMStructureVersion ddmStructureVersion);
340    
341            /**
342            * Caches the d d m structure versions in the entity cache if it is enabled.
343            *
344            * @param ddmStructureVersions the d d m structure versions
345            */
346            public void cacheResult(
347                    java.util.List<DDMStructureVersion> ddmStructureVersions);
348    
349            /**
350            * Creates a new d d m structure version with the primary key. Does not add the d d m structure version to the database.
351            *
352            * @param structureVersionId the primary key for the new d d m structure version
353            * @return the new d d m structure version
354            */
355            public DDMStructureVersion create(long structureVersionId);
356    
357            /**
358            * Removes the d d m structure version with the primary key from the database. Also notifies the appropriate model listeners.
359            *
360            * @param structureVersionId the primary key of the d d m structure version
361            * @return the d d m structure version that was removed
362            * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
363            */
364            public DDMStructureVersion remove(long structureVersionId)
365                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
366    
367            public DDMStructureVersion updateImpl(
368                    DDMStructureVersion ddmStructureVersion);
369    
370            /**
371            * Returns the d d m structure version with the primary key or throws a {@link NoSuchStructureVersionException} if it could not be found.
372            *
373            * @param structureVersionId the primary key of the d d m structure version
374            * @return the d d m structure version
375            * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could not be found
376            */
377            public DDMStructureVersion findByPrimaryKey(long structureVersionId)
378                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureVersionException;
379    
380            /**
381            * Returns the d d m structure version with the primary key or returns <code>null</code> if it could not be found.
382            *
383            * @param structureVersionId the primary key of the d d m structure version
384            * @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
385            */
386            public DDMStructureVersion fetchByPrimaryKey(long structureVersionId);
387    
388            @Override
389            public java.util.Map<java.io.Serializable, DDMStructureVersion> fetchByPrimaryKeys(
390                    java.util.Set<java.io.Serializable> primaryKeys);
391    
392            /**
393            * Returns all the d d m structure versions.
394            *
395            * @return the d d m structure versions
396            */
397            public java.util.List<DDMStructureVersion> findAll();
398    
399            /**
400            * Returns a range of all the d d m structure versions.
401            *
402            * <p>
403            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
404            * </p>
405            *
406            * @param start the lower bound of the range of d d m structure versions
407            * @param end the upper bound of the range of d d m structure versions (not inclusive)
408            * @return the range of d d m structure versions
409            */
410            public java.util.List<DDMStructureVersion> findAll(int start, int end);
411    
412            /**
413            * Returns an ordered range of all the d d m structure versions.
414            *
415            * <p>
416            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
417            * </p>
418            *
419            * @param start the lower bound of the range of d d m structure versions
420            * @param end the upper bound of the range of d d m structure versions (not inclusive)
421            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
422            * @return the ordered range of d d m structure versions
423            */
424            public java.util.List<DDMStructureVersion> findAll(int start, int end,
425                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureVersion> orderByComparator);
426    
427            /**
428            * Removes all the d d m structure versions from the database.
429            */
430            public void removeAll();
431    
432            /**
433            * Returns the number of d d m structure versions.
434            *
435            * @return the number of d d m structure versions
436            */
437            public int countAll();
438    }