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.DDMStructureLink;
022    
023    /**
024     * The persistence interface for the d d m structure link 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.DDMStructureLinkPersistenceImpl
032     * @see DDMStructureLinkUtil
033     * @generated
034     */
035    @ProviderType
036    public interface DDMStructureLinkPersistence extends BasePersistence<DDMStructureLink> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link DDMStructureLinkUtil} to access the d d m structure link persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the d d m structure links where structureId = &#63;.
045            *
046            * @param structureId the structure ID
047            * @return the matching d d m structure links
048            */
049            public java.util.List<DDMStructureLink> findByStructureId(long structureId);
050    
051            /**
052            * Returns a range of all the d d m structure links where structureId = &#63;.
053            *
054            * <p>
055            * 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 DDMStructureLinkModelImpl}. 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.
056            * </p>
057            *
058            * @param structureId the structure ID
059            * @param start the lower bound of the range of d d m structure links
060            * @param end the upper bound of the range of d d m structure links (not inclusive)
061            * @return the range of matching d d m structure links
062            */
063            public java.util.List<DDMStructureLink> findByStructureId(
064                    long structureId, int start, int end);
065    
066            /**
067            * Returns an ordered range of all the d d m structure links where structureId = &#63;.
068            *
069            * <p>
070            * 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 DDMStructureLinkModelImpl}. 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.
071            * </p>
072            *
073            * @param structureId the structure ID
074            * @param start the lower bound of the range of d d m structure links
075            * @param end the upper bound of the range of d d m structure links (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching d d m structure links
078            */
079            public java.util.List<DDMStructureLink> findByStructureId(
080                    long structureId, int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
082    
083            /**
084            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
085            *
086            * @param structureId the structure ID
087            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
088            * @return the first matching d d m structure link
089            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
090            */
091            public DDMStructureLink findByStructureId_First(long structureId,
092                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
093                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
094    
095            /**
096            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
097            *
098            * @param structureId the structure ID
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
101            */
102            public DDMStructureLink fetchByStructureId_First(long structureId,
103                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
104    
105            /**
106            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
107            *
108            * @param structureId the structure ID
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the last matching d d m structure link
111            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
112            */
113            public DDMStructureLink findByStructureId_Last(long structureId,
114                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
115                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
116    
117            /**
118            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
119            *
120            * @param structureId the structure ID
121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
122            * @return the last matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
123            */
124            public DDMStructureLink fetchByStructureId_Last(long structureId,
125                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
126    
127            /**
128            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where structureId = &#63;.
129            *
130            * @param structureLinkId the primary key of the current d d m structure link
131            * @param structureId the structure ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the previous, current, and next d d m structure link
134            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
135            */
136            public DDMStructureLink[] findByStructureId_PrevAndNext(
137                    long structureLinkId, long structureId,
138                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
139                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
140    
141            /**
142            * Removes all the d d m structure links where structureId = &#63; from the database.
143            *
144            * @param structureId the structure ID
145            */
146            public void removeByStructureId(long structureId);
147    
148            /**
149            * Returns the number of d d m structure links where structureId = &#63;.
150            *
151            * @param structureId the structure ID
152            * @return the number of matching d d m structure links
153            */
154            public int countByStructureId(long structureId);
155    
156            /**
157            * Returns all the d d m structure links where classNameId = &#63; and classPK = &#63;.
158            *
159            * @param classNameId the class name ID
160            * @param classPK the class p k
161            * @return the matching d d m structure links
162            */
163            public java.util.List<DDMStructureLink> findByC_C(long classNameId,
164                    long classPK);
165    
166            /**
167            * Returns a range of all the d d m structure links where classNameId = &#63; and classPK = &#63;.
168            *
169            * <p>
170            * 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 DDMStructureLinkModelImpl}. 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.
171            * </p>
172            *
173            * @param classNameId the class name ID
174            * @param classPK the class p k
175            * @param start the lower bound of the range of d d m structure links
176            * @param end the upper bound of the range of d d m structure links (not inclusive)
177            * @return the range of matching d d m structure links
178            */
179            public java.util.List<DDMStructureLink> findByC_C(long classNameId,
180                    long classPK, int start, int end);
181    
182            /**
183            * Returns an ordered range of all the d d m structure links where classNameId = &#63; and classPK = &#63;.
184            *
185            * <p>
186            * 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 DDMStructureLinkModelImpl}. 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.
187            * </p>
188            *
189            * @param classNameId the class name ID
190            * @param classPK the class p k
191            * @param start the lower bound of the range of d d m structure links
192            * @param end the upper bound of the range of d d m structure links (not inclusive)
193            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
194            * @return the ordered range of matching d d m structure links
195            */
196            public java.util.List<DDMStructureLink> findByC_C(long classNameId,
197                    long classPK, int start, int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
199    
200            /**
201            * Returns the first d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
202            *
203            * @param classNameId the class name ID
204            * @param classPK the class p k
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the first matching d d m structure link
207            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
208            */
209            public DDMStructureLink findByC_C_First(long classNameId, long classPK,
210                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
211                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
212    
213            /**
214            * Returns the first d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
215            *
216            * @param classNameId the class name ID
217            * @param classPK the class p k
218            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
219            * @return the first matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
220            */
221            public DDMStructureLink fetchByC_C_First(long classNameId, long classPK,
222                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
223    
224            /**
225            * Returns the last d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
226            *
227            * @param classNameId the class name ID
228            * @param classPK the class p k
229            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
230            * @return the last matching d d m structure link
231            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
232            */
233            public DDMStructureLink findByC_C_Last(long classNameId, long classPK,
234                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
235                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
236    
237            /**
238            * Returns the last d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
239            *
240            * @param classNameId the class name ID
241            * @param classPK the class p k
242            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
243            * @return the last matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
244            */
245            public DDMStructureLink fetchByC_C_Last(long classNameId, long classPK,
246                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
247    
248            /**
249            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
250            *
251            * @param structureLinkId the primary key of the current d d m structure link
252            * @param classNameId the class name ID
253            * @param classPK the class p k
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the previous, current, and next d d m structure link
256            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
257            */
258            public DDMStructureLink[] findByC_C_PrevAndNext(long structureLinkId,
259                    long classNameId, long classPK,
260                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator)
261                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
262    
263            /**
264            * Removes all the d d m structure links where classNameId = &#63; and classPK = &#63; from the database.
265            *
266            * @param classNameId the class name ID
267            * @param classPK the class p k
268            */
269            public void removeByC_C(long classNameId, long classPK);
270    
271            /**
272            * Returns the number of d d m structure links where classNameId = &#63; and classPK = &#63;.
273            *
274            * @param classNameId the class name ID
275            * @param classPK the class p k
276            * @return the number of matching d d m structure links
277            */
278            public int countByC_C(long classNameId, long classPK);
279    
280            /**
281            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or throws a {@link NoSuchStructureLinkException} if it could not be found.
282            *
283            * @param classNameId the class name ID
284            * @param classPK the class p k
285            * @param structureId the structure ID
286            * @return the matching d d m structure link
287            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
288            */
289            public DDMStructureLink findByC_C_S(long classNameId, long classPK,
290                    long structureId)
291                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
292    
293            /**
294            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
295            *
296            * @param classNameId the class name ID
297            * @param classPK the class p k
298            * @param structureId the structure ID
299            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
300            */
301            public DDMStructureLink fetchByC_C_S(long classNameId, long classPK,
302                    long structureId);
303    
304            /**
305            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
306            *
307            * @param classNameId the class name ID
308            * @param classPK the class p k
309            * @param structureId the structure ID
310            * @param retrieveFromCache whether to use the finder cache
311            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
312            */
313            public DDMStructureLink fetchByC_C_S(long classNameId, long classPK,
314                    long structureId, boolean retrieveFromCache);
315    
316            /**
317            * Removes the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; from the database.
318            *
319            * @param classNameId the class name ID
320            * @param classPK the class p k
321            * @param structureId the structure ID
322            * @return the d d m structure link that was removed
323            */
324            public DDMStructureLink removeByC_C_S(long classNameId, long classPK,
325                    long structureId)
326                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
327    
328            /**
329            * Returns the number of d d m structure links where classNameId = &#63; and classPK = &#63; and structureId = &#63;.
330            *
331            * @param classNameId the class name ID
332            * @param classPK the class p k
333            * @param structureId the structure ID
334            * @return the number of matching d d m structure links
335            */
336            public int countByC_C_S(long classNameId, long classPK, long structureId);
337    
338            /**
339            * Caches the d d m structure link in the entity cache if it is enabled.
340            *
341            * @param ddmStructureLink the d d m structure link
342            */
343            public void cacheResult(DDMStructureLink ddmStructureLink);
344    
345            /**
346            * Caches the d d m structure links in the entity cache if it is enabled.
347            *
348            * @param ddmStructureLinks the d d m structure links
349            */
350            public void cacheResult(java.util.List<DDMStructureLink> ddmStructureLinks);
351    
352            /**
353            * Creates a new d d m structure link with the primary key. Does not add the d d m structure link to the database.
354            *
355            * @param structureLinkId the primary key for the new d d m structure link
356            * @return the new d d m structure link
357            */
358            public DDMStructureLink create(long structureLinkId);
359    
360            /**
361            * Removes the d d m structure link with the primary key from the database. Also notifies the appropriate model listeners.
362            *
363            * @param structureLinkId the primary key of the d d m structure link
364            * @return the d d m structure link that was removed
365            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
366            */
367            public DDMStructureLink remove(long structureLinkId)
368                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
369    
370            public DDMStructureLink updateImpl(DDMStructureLink ddmStructureLink);
371    
372            /**
373            * Returns the d d m structure link with the primary key or throws a {@link NoSuchStructureLinkException} if it could not be found.
374            *
375            * @param structureLinkId the primary key of the d d m structure link
376            * @return the d d m structure link
377            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
378            */
379            public DDMStructureLink findByPrimaryKey(long structureLinkId)
380                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
381    
382            /**
383            * Returns the d d m structure link with the primary key or returns <code>null</code> if it could not be found.
384            *
385            * @param structureLinkId the primary key of the d d m structure link
386            * @return the d d m structure link, or <code>null</code> if a d d m structure link with the primary key could not be found
387            */
388            public DDMStructureLink fetchByPrimaryKey(long structureLinkId);
389    
390            @Override
391            public java.util.Map<java.io.Serializable, DDMStructureLink> fetchByPrimaryKeys(
392                    java.util.Set<java.io.Serializable> primaryKeys);
393    
394            /**
395            * Returns all the d d m structure links.
396            *
397            * @return the d d m structure links
398            */
399            public java.util.List<DDMStructureLink> findAll();
400    
401            /**
402            * Returns a range of all the d d m structure links.
403            *
404            * <p>
405            * 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 DDMStructureLinkModelImpl}. 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.
406            * </p>
407            *
408            * @param start the lower bound of the range of d d m structure links
409            * @param end the upper bound of the range of d d m structure links (not inclusive)
410            * @return the range of d d m structure links
411            */
412            public java.util.List<DDMStructureLink> findAll(int start, int end);
413    
414            /**
415            * Returns an ordered range of all the d d m structure links.
416            *
417            * <p>
418            * 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 DDMStructureLinkModelImpl}. 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.
419            * </p>
420            *
421            * @param start the lower bound of the range of d d m structure links
422            * @param end the upper bound of the range of d d m structure links (not inclusive)
423            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
424            * @return the ordered range of d d m structure links
425            */
426            public java.util.List<DDMStructureLink> findAll(int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator<DDMStructureLink> orderByComparator);
428    
429            /**
430            * Removes all the d d m structure links from the database.
431            */
432            public void removeAll();
433    
434            /**
435            * Returns the number of d d m structure links.
436            *
437            * @return the number of d d m structure links
438            */
439            public int countAll();
440    }