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