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.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the d d m structure link service. This utility wraps {@link DDMStructureLinkPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see DDMStructureLinkPersistence
037     * @see DDMStructureLinkPersistenceImpl
038     * @generated
039     */
040    public class DDMStructureLinkUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(DDMStructureLink ddmStructureLink) {
058                    getPersistence().clearCache(ddmStructureLink);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<DDMStructureLink> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<DDMStructureLink> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<DDMStructureLink> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static DDMStructureLink update(DDMStructureLink ddmStructureLink,
101                    boolean merge) throws SystemException {
102                    return getPersistence().update(ddmStructureLink, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static DDMStructureLink update(DDMStructureLink ddmStructureLink,
109                    boolean merge, ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(ddmStructureLink, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the d d m structure link in the entity cache if it is enabled.
115            *
116            * @param ddmStructureLink the d d m structure link
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
120                    getPersistence().cacheResult(ddmStructureLink);
121            }
122    
123            /**
124            * Caches the d d m structure links in the entity cache if it is enabled.
125            *
126            * @param ddmStructureLinks the d d m structure links
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> ddmStructureLinks) {
130                    getPersistence().cacheResult(ddmStructureLinks);
131            }
132    
133            /**
134            * Creates a new d d m structure link with the primary key. Does not add the d d m structure link to the database.
135            *
136            * @param structureLinkId the primary key for the new d d m structure link
137            * @return the new d d m structure link
138            */
139            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink create(
140                    long structureLinkId) {
141                    return getPersistence().create(structureLinkId);
142            }
143    
144            /**
145            * Removes the d d m structure link with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param structureLinkId the primary key of the d d m structure link
148            * @return the d d m structure link that was removed
149            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink remove(
153                    long structureLinkId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
156                    return getPersistence().remove(structureLinkId);
157            }
158    
159            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink updateImpl(
160                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(ddmStructureLink, merge);
164            }
165    
166            /**
167            * 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.
168            *
169            * @param structureLinkId the primary key of the d d m structure link
170            * @return the d d m structure link
171            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByPrimaryKey(
175                    long structureLinkId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
178                    return getPersistence().findByPrimaryKey(structureLinkId);
179            }
180    
181            /**
182            * Returns the d d m structure link with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param structureLinkId the primary key of the d d m structure link
185            * @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
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByPrimaryKey(
189                    long structureLinkId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(structureLinkId);
192            }
193    
194            /**
195            * Returns all the d d m structure links where classNameId = &#63;.
196            *
197            * @param classNameId the class name ID
198            * @return the matching d d m structure links
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
202                    long classNameId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByClassNameId(classNameId);
205            }
206    
207            /**
208            * Returns a range of all the d d m structure links where classNameId = &#63;.
209            *
210            * <p>
211            * 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.
212            * </p>
213            *
214            * @param classNameId the class name ID
215            * @param start the lower bound of the range of d d m structure links
216            * @param end the upper bound of the range of d d m structure links (not inclusive)
217            * @return the range of matching d d m structure links
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
221                    long classNameId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByClassNameId(classNameId, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the d d m structure links where classNameId = &#63;.
228            *
229            * <p>
230            * 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.
231            * </p>
232            *
233            * @param classNameId the class name ID
234            * @param start the lower bound of the range of d d m structure links
235            * @param end the upper bound of the range of d d m structure links (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching d d m structure links
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByClassNameId(
241                    long classNameId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByClassNameId(classNameId, start, end, orderByComparator);
246            }
247    
248            /**
249            * Returns the first d d m structure link in the ordered set where classNameId = &#63;.
250            *
251            * <p>
252            * 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.
253            * </p>
254            *
255            * @param classNameId the class name ID
256            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
257            * @return the first matching d d m structure link
258            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassNameId_First(
262                    long classNameId,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
266                    return getPersistence()
267                                       .findByClassNameId_First(classNameId, orderByComparator);
268            }
269    
270            /**
271            * Returns the last d d m structure link in the ordered set where classNameId = &#63;.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param classNameId the class name ID
278            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
279            * @return the last matching d d m structure link
280            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassNameId_Last(
284                    long classNameId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.kernel.exception.SystemException,
287                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
288                    return getPersistence()
289                                       .findByClassNameId_Last(classNameId, orderByComparator);
290            }
291    
292            /**
293            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = &#63;.
294            *
295            * <p>
296            * 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.
297            * </p>
298            *
299            * @param structureLinkId the primary key of the current d d m structure link
300            * @param classNameId the class name ID
301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
302            * @return the previous, current, and next d d m structure link
303            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
304            * @throws SystemException if a system exception occurred
305            */
306            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink[] findByClassNameId_PrevAndNext(
307                    long structureLinkId, long classNameId,
308                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
309                    throws com.liferay.portal.kernel.exception.SystemException,
310                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
311                    return getPersistence()
312                                       .findByClassNameId_PrevAndNext(structureLinkId, classNameId,
313                            orderByComparator);
314            }
315    
316            /**
317            * 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.
318            *
319            * @param classPK the class p k
320            * @return the matching d d m structure link
321            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
322            * @throws SystemException if a system exception occurred
323            */
324            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByClassPK(
325                    long classPK)
326                    throws com.liferay.portal.kernel.exception.SystemException,
327                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
328                    return getPersistence().findByClassPK(classPK);
329            }
330    
331            /**
332            * 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.
333            *
334            * @param classPK the class p k
335            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByClassPK(
339                    long classPK)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().fetchByClassPK(classPK);
342            }
343    
344            /**
345            * 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.
346            *
347            * @param classPK the class p k
348            * @param retrieveFromCache whether to use the finder cache
349            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
350            * @throws SystemException if a system exception occurred
351            */
352            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchByClassPK(
353                    long classPK, boolean retrieveFromCache)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return getPersistence().fetchByClassPK(classPK, retrieveFromCache);
356            }
357    
358            /**
359            * Returns all the d d m structure links where structureId = &#63;.
360            *
361            * @param structureId the structure ID
362            * @return the matching d d m structure links
363            * @throws SystemException if a system exception occurred
364            */
365            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
366                    long structureId)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence().findByStructureId(structureId);
369            }
370    
371            /**
372            * Returns a range of all the d d m structure links where structureId = &#63;.
373            *
374            * <p>
375            * 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.
376            * </p>
377            *
378            * @param structureId the structure ID
379            * @param start the lower bound of the range of d d m structure links
380            * @param end the upper bound of the range of d d m structure links (not inclusive)
381            * @return the range of matching d d m structure links
382            * @throws SystemException if a system exception occurred
383            */
384            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
385                    long structureId, int start, int end)
386                    throws com.liferay.portal.kernel.exception.SystemException {
387                    return getPersistence().findByStructureId(structureId, start, end);
388            }
389    
390            /**
391            * Returns an ordered range of all the d d m structure links where structureId = &#63;.
392            *
393            * <p>
394            * 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.
395            * </p>
396            *
397            * @param structureId the structure ID
398            * @param start the lower bound of the range of d d m structure links
399            * @param end the upper bound of the range of d d m structure links (not inclusive)
400            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
401            * @return the ordered range of matching d d m structure links
402            * @throws SystemException if a system exception occurred
403            */
404            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findByStructureId(
405                    long structureId, int start, int end,
406                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
407                    throws com.liferay.portal.kernel.exception.SystemException {
408                    return getPersistence()
409                                       .findByStructureId(structureId, start, end, orderByComparator);
410            }
411    
412            /**
413            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
417            * </p>
418            *
419            * @param structureId the structure ID
420            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
421            * @return the first matching d d m structure link
422            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
423            * @throws SystemException if a system exception occurred
424            */
425            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByStructureId_First(
426                    long structureId,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException,
429                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
430                    return getPersistence()
431                                       .findByStructureId_First(structureId, orderByComparator);
432            }
433    
434            /**
435            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
436            *
437            * <p>
438            * 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.
439            * </p>
440            *
441            * @param structureId the structure ID
442            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
443            * @return the last matching d d m structure link
444            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a matching d d m structure link could not be found
445            * @throws SystemException if a system exception occurred
446            */
447            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink findByStructureId_Last(
448                    long structureId,
449                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
450                    throws com.liferay.portal.kernel.exception.SystemException,
451                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
452                    return getPersistence()
453                                       .findByStructureId_Last(structureId, orderByComparator);
454            }
455    
456            /**
457            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where structureId = &#63;.
458            *
459            * <p>
460            * 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.
461            * </p>
462            *
463            * @param structureLinkId the primary key of the current d d m structure link
464            * @param structureId the structure ID
465            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
466            * @return the previous, current, and next d d m structure link
467            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
468            * @throws SystemException if a system exception occurred
469            */
470            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink[] findByStructureId_PrevAndNext(
471                    long structureLinkId, long structureId,
472                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
473                    throws com.liferay.portal.kernel.exception.SystemException,
474                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
475                    return getPersistence()
476                                       .findByStructureId_PrevAndNext(structureLinkId, structureId,
477                            orderByComparator);
478            }
479    
480            /**
481            * Returns all the d d m structure links.
482            *
483            * @return the d d m structure links
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll()
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    return getPersistence().findAll();
489            }
490    
491            /**
492            * Returns a range of all the d d m structure links.
493            *
494            * <p>
495            * 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.
496            * </p>
497            *
498            * @param start the lower bound of the range of d d m structure links
499            * @param end the upper bound of the range of d d m structure links (not inclusive)
500            * @return the range of d d m structure links
501            * @throws SystemException if a system exception occurred
502            */
503            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll(
504                    int start, int end)
505                    throws com.liferay.portal.kernel.exception.SystemException {
506                    return getPersistence().findAll(start, end);
507            }
508    
509            /**
510            * Returns an ordered range of all the d d m structure links.
511            *
512            * <p>
513            * 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.
514            * </p>
515            *
516            * @param start the lower bound of the range of d d m structure links
517            * @param end the upper bound of the range of d d m structure links (not inclusive)
518            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
519            * @return the ordered range of d d m structure links
520            * @throws SystemException if a system exception occurred
521            */
522            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> findAll(
523                    int start, int end,
524                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getPersistence().findAll(start, end, orderByComparator);
527            }
528    
529            /**
530            * Removes all the d d m structure links where classNameId = &#63; from the database.
531            *
532            * @param classNameId the class name ID
533            * @throws SystemException if a system exception occurred
534            */
535            public static void removeByClassNameId(long classNameId)
536                    throws com.liferay.portal.kernel.exception.SystemException {
537                    getPersistence().removeByClassNameId(classNameId);
538            }
539    
540            /**
541            * Removes the d d m structure link where classPK = &#63; from the database.
542            *
543            * @param classPK the class p k
544            * @throws SystemException if a system exception occurred
545            */
546            public static void removeByClassPK(long classPK)
547                    throws com.liferay.portal.kernel.exception.SystemException,
548                            com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
549                    getPersistence().removeByClassPK(classPK);
550            }
551    
552            /**
553            * Removes all the d d m structure links where structureId = &#63; from the database.
554            *
555            * @param structureId the structure ID
556            * @throws SystemException if a system exception occurred
557            */
558            public static void removeByStructureId(long structureId)
559                    throws com.liferay.portal.kernel.exception.SystemException {
560                    getPersistence().removeByStructureId(structureId);
561            }
562    
563            /**
564            * Removes all the d d m structure links from the database.
565            *
566            * @throws SystemException if a system exception occurred
567            */
568            public static void removeAll()
569                    throws com.liferay.portal.kernel.exception.SystemException {
570                    getPersistence().removeAll();
571            }
572    
573            /**
574            * Returns the number of d d m structure links where classNameId = &#63;.
575            *
576            * @param classNameId the class name ID
577            * @return the number of matching d d m structure links
578            * @throws SystemException if a system exception occurred
579            */
580            public static int countByClassNameId(long classNameId)
581                    throws com.liferay.portal.kernel.exception.SystemException {
582                    return getPersistence().countByClassNameId(classNameId);
583            }
584    
585            /**
586            * Returns the number of d d m structure links where classPK = &#63;.
587            *
588            * @param classPK the class p k
589            * @return the number of matching d d m structure links
590            * @throws SystemException if a system exception occurred
591            */
592            public static int countByClassPK(long classPK)
593                    throws com.liferay.portal.kernel.exception.SystemException {
594                    return getPersistence().countByClassPK(classPK);
595            }
596    
597            /**
598            * Returns the number of d d m structure links where structureId = &#63;.
599            *
600            * @param structureId the structure ID
601            * @return the number of matching d d m structure links
602            * @throws SystemException if a system exception occurred
603            */
604            public static int countByStructureId(long structureId)
605                    throws com.liferay.portal.kernel.exception.SystemException {
606                    return getPersistence().countByStructureId(structureId);
607            }
608    
609            /**
610            * Returns the number of d d m structure links.
611            *
612            * @return the number of d d m structure links
613            * @throws SystemException if a system exception occurred
614            */
615            public static int countAll()
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    return getPersistence().countAll();
618            }
619    
620            public static DDMStructureLinkPersistence getPersistence() {
621                    if (_persistence == null) {
622                            _persistence = (DDMStructureLinkPersistence)PortalBeanLocatorUtil.locate(DDMStructureLinkPersistence.class.getName());
623    
624                            ReferenceRegistry.registerReference(DDMStructureLinkUtil.class,
625                                    "_persistence");
626                    }
627    
628                    return _persistence;
629            }
630    
631            public void setPersistence(DDMStructureLinkPersistence persistence) {
632                    _persistence = persistence;
633    
634                    ReferenceRegistry.registerReference(DDMStructureLinkUtil.class,
635                            "_persistence");
636            }
637    
638            private static DDMStructureLinkPersistence _persistence;
639    }