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                    boolean merge)
081                    throws com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * 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.
085            *
086            * @param structureLinkId the primary key of the d d m structure link
087            * @return the d d m structure link
088            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByPrimaryKey(
092                    long structureLinkId)
093                    throws com.liferay.portal.kernel.exception.SystemException,
094                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
095    
096            /**
097            * Returns the d d m structure link with the primary key or returns <code>null</code> if it could not be found.
098            *
099            * @param structureLinkId the primary key of the d d m structure link
100            * @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
101            * @throws SystemException if a system exception occurred
102            */
103            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByPrimaryKey(
104                    long structureLinkId)
105                    throws com.liferay.portal.kernel.exception.SystemException;
106    
107            /**
108            * Returns all the d d m structure links where classNameId = &#63;.
109            *
110            * @param classNameId the class name ID
111            * @return the matching d d m structure links
112            * @throws SystemException if a system exception occurred
113            */
114            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
115                    long classNameId)
116                    throws com.liferay.portal.kernel.exception.SystemException;
117    
118            /**
119            * Returns a range of all the d d m structure links where classNameId = &#63;.
120            *
121            * <p>
122            * 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.
123            * </p>
124            *
125            * @param classNameId the class name ID
126            * @param start the lower bound of the range of d d m structure links
127            * @param end the upper bound of the range of d d m structure links (not inclusive)
128            * @return the range of matching d d m structure links
129            * @throws SystemException if a system exception occurred
130            */
131            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
132                    long classNameId, int start, int end)
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Returns an ordered range of all the d d m structure links where classNameId = &#63;.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param classNameId the class name ID
143            * @param start the lower bound of the range of d d m structure links
144            * @param end the upper bound of the range of d d m structure links (not inclusive)
145            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
146            * @return the ordered range of matching d d m structure links
147            * @throws SystemException if a system exception occurred
148            */
149            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
150                    long classNameId, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Returns the first d d m structure link in the ordered set where classNameId = &#63;.
156            *
157            * <p>
158            * 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.
159            * </p>
160            *
161            * @param classNameId the class name ID
162            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
163            * @return the first matching d d m structure link
164            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
165            * @throws SystemException if a system exception occurred
166            */
167            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassNameId_First(
168                    long classNameId,
169                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170                    throws com.liferay.portal.kernel.exception.SystemException,
171                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
172    
173            /**
174            * Returns the last d d m structure link in the ordered set where classNameId = &#63;.
175            *
176            * <p>
177            * 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.
178            * </p>
179            *
180            * @param classNameId the class name ID
181            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
182            * @return the last matching d d m structure link
183            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassNameId_Last(
187                    long classNameId,
188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189                    throws com.liferay.portal.kernel.exception.SystemException,
190                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
191    
192            /**
193            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = &#63;.
194            *
195            * <p>
196            * 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.
197            * </p>
198            *
199            * @param structureLinkId the primary key of the current d d m structure link
200            * @param classNameId the class name ID
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
202            * @return the previous, current, and next d d m structure link
203            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
204            * @throws SystemException if a system exception occurred
205            */
206            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink[] findByClassNameId_PrevAndNext(
207                    long structureLinkId, long classNameId,
208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209                    throws com.liferay.portal.kernel.exception.SystemException,
210                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
211    
212            /**
213            * 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.
214            *
215            * @param classPK the class p k
216            * @return the matching d d m structure link
217            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassPK(
221                    long classPK)
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 returns <code>null</code> if it could not be found. Uses the finder cache.
227            *
228            * @param classPK the class p k
229            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
230            * @throws SystemException if a system exception occurred
231            */
232            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByClassPK(
233                    long classPK)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * 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.
238            *
239            * @param classPK the class p k
240            * @param retrieveFromCache whether to use the finder cache
241            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByClassPK(
245                    long classPK, boolean retrieveFromCache)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Returns all the d d m structure links where structureId = &#63;.
250            *
251            * @param structureId the structure ID
252            * @return the matching d d m structure links
253            * @throws SystemException if a system exception occurred
254            */
255            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
256                    long structureId)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns a range of all the d d m structure links where structureId = &#63;.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param structureId the structure ID
267            * @param start the lower bound of the range of d d m structure links
268            * @param end the upper bound of the range of d d m structure links (not inclusive)
269            * @return the range of matching d d m structure links
270            * @throws SystemException if a system exception occurred
271            */
272            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
273                    long structureId, int start, int end)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Returns an ordered range of all the d d m structure links where structureId = &#63;.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param structureId the structure ID
284            * @param start the lower bound of the range of d d m structure links
285            * @param end the upper bound of the range of d d m structure links (not inclusive)
286            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
287            * @return the ordered range of matching d d m structure links
288            * @throws SystemException if a system exception occurred
289            */
290            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
291                    long structureId, int start, int end,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
297            *
298            * <p>
299            * 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.
300            * </p>
301            *
302            * @param structureId the structure ID
303            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
304            * @return the first matching d d m structure link
305            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
306            * @throws SystemException if a system exception occurred
307            */
308            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByStructureId_First(
309                    long structureId,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.kernel.exception.SystemException,
312                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
313    
314            /**
315            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
316            *
317            * <p>
318            * 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.
319            * </p>
320            *
321            * @param structureId the structure ID
322            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
323            * @return the last matching d d m structure link
324            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
325            * @throws SystemException if a system exception occurred
326            */
327            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByStructureId_Last(
328                    long structureId,
329                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
330                    throws com.liferay.portal.kernel.exception.SystemException,
331                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
332    
333            /**
334            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where structureId = &#63;.
335            *
336            * <p>
337            * 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.
338            * </p>
339            *
340            * @param structureLinkId the primary key of the current d d m structure link
341            * @param structureId the structure ID
342            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
343            * @return the previous, current, and next d d m structure link
344            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
345            * @throws SystemException if a system exception occurred
346            */
347            public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink[] findByStructureId_PrevAndNext(
348                    long structureLinkId, long structureId,
349                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
350                    throws com.liferay.portal.kernel.exception.SystemException,
351                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
352    
353            /**
354            * Returns all the d d m structure links.
355            *
356            * @return the d d m structure links
357            * @throws SystemException if a system exception occurred
358            */
359            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll()
360                    throws com.liferay.portal.kernel.exception.SystemException;
361    
362            /**
363            * Returns a range of all the d d m structure links.
364            *
365            * <p>
366            * 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.
367            * </p>
368            *
369            * @param start the lower bound of the range of d d m structure links
370            * @param end the upper bound of the range of d d m structure links (not inclusive)
371            * @return the range of d d m structure links
372            * @throws SystemException if a system exception occurred
373            */
374            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll(
375                    int start, int end)
376                    throws com.liferay.portal.kernel.exception.SystemException;
377    
378            /**
379            * Returns an ordered range of all the d d m structure links.
380            *
381            * <p>
382            * 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.
383            * </p>
384            *
385            * @param start the lower bound of the range of d d m structure links
386            * @param end the upper bound of the range of d d m structure links (not inclusive)
387            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
388            * @return the ordered range of d d m structure links
389            * @throws SystemException if a system exception occurred
390            */
391            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll(
392                    int start, int end,
393                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
394                    throws com.liferay.portal.kernel.exception.SystemException;
395    
396            /**
397            * Removes all the d d m structure links where classNameId = &#63; from the database.
398            *
399            * @param classNameId the class name ID
400            * @throws SystemException if a system exception occurred
401            */
402            public void removeByClassNameId(long classNameId)
403                    throws com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Removes the d d m structure link where classPK = &#63; from the database.
407            *
408            * @param classPK the class p k
409            * @throws SystemException if a system exception occurred
410            */
411            public void removeByClassPK(long classPK)
412                    throws com.liferay.portal.kernel.exception.SystemException,
413                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException;
414    
415            /**
416            * Removes all the d d m structure links where structureId = &#63; from the database.
417            *
418            * @param structureId the structure ID
419            * @throws SystemException if a system exception occurred
420            */
421            public void removeByStructureId(long structureId)
422                    throws com.liferay.portal.kernel.exception.SystemException;
423    
424            /**
425            * Removes all the d d m structure links from the database.
426            *
427            * @throws SystemException if a system exception occurred
428            */
429            public void removeAll()
430                    throws com.liferay.portal.kernel.exception.SystemException;
431    
432            /**
433            * Returns the number of d d m structure links where classNameId = &#63;.
434            *
435            * @param classNameId the class name ID
436            * @return the number of matching d d m structure links
437            * @throws SystemException if a system exception occurred
438            */
439            public int countByClassNameId(long classNameId)
440                    throws com.liferay.portal.kernel.exception.SystemException;
441    
442            /**
443            * Returns the number of d d m structure links where classPK = &#63;.
444            *
445            * @param classPK the class p k
446            * @return the number of matching d d m structure links
447            * @throws SystemException if a system exception occurred
448            */
449            public int countByClassPK(long classPK)
450                    throws com.liferay.portal.kernel.exception.SystemException;
451    
452            /**
453            * Returns the number of d d m structure links where structureId = &#63;.
454            *
455            * @param structureId the structure ID
456            * @return the number of matching d d m structure links
457            * @throws SystemException if a system exception occurred
458            */
459            public int countByStructureId(long structureId)
460                    throws com.liferay.portal.kernel.exception.SystemException;
461    
462            /**
463            * Returns the number of d d m structure links.
464            *
465            * @return the number of d d m structure links
466            * @throws SystemException if a system exception occurred
467            */
468            public int countAll()
469                    throws com.liferay.portal.kernel.exception.SystemException;
470    }