001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the d d m structure link service. This utility wraps {@link com.liferay.portlet.dynamicdatamapping.service.persistence.impl.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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see DDMStructureLinkPersistence
038     * @see com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMStructureLinkPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class DDMStructureLinkUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(DDMStructureLink ddmStructureLink) {
060                    getPersistence().clearCache(ddmStructureLink);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<DDMStructureLink> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<DDMStructureLink> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
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<DDMStructureLink> orderByComparator) {
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)
099             */
100            public static DDMStructureLink update(DDMStructureLink ddmStructureLink) {
101                    return getPersistence().update(ddmStructureLink);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static DDMStructureLink update(DDMStructureLink ddmStructureLink,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(ddmStructureLink, serviceContext);
110            }
111    
112            /**
113            * Returns all the d d m structure links where structureId = &#63;.
114            *
115            * @param structureId the structure ID
116            * @return the matching d d m structure links
117            */
118            public static List<DDMStructureLink> findByStructureId(long structureId) {
119                    return getPersistence().findByStructureId(structureId);
120            }
121    
122            /**
123            * Returns a range of all the d d m structure links where structureId = &#63;.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
127            * </p>
128            *
129            * @param structureId the structure ID
130            * @param start the lower bound of the range of d d m structure links
131            * @param end the upper bound of the range of d d m structure links (not inclusive)
132            * @return the range of matching d d m structure links
133            */
134            public static List<DDMStructureLink> findByStructureId(long structureId,
135                    int start, int end) {
136                    return getPersistence().findByStructureId(structureId, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the d d m structure links where structureId = &#63;.
141            *
142            * <p>
143            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
144            * </p>
145            *
146            * @param structureId the structure ID
147            * @param start the lower bound of the range of d d m structure links
148            * @param end the upper bound of the range of d d m structure links (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching d d m structure links
151            */
152            public static List<DDMStructureLink> findByStructureId(long structureId,
153                    int start, int end,
154                    OrderByComparator<DDMStructureLink> orderByComparator) {
155                    return getPersistence()
156                                       .findByStructureId(structureId, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
161            *
162            * @param structureId the structure ID
163            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
164            * @return the first matching d d m structure link
165            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
166            */
167            public static DDMStructureLink findByStructureId_First(long structureId,
168                    OrderByComparator<DDMStructureLink> orderByComparator)
169                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
170                    return getPersistence()
171                                       .findByStructureId_First(structureId, orderByComparator);
172            }
173    
174            /**
175            * Returns the first d d m structure link in the ordered set where structureId = &#63;.
176            *
177            * @param structureId the structure ID
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @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
180            */
181            public static DDMStructureLink fetchByStructureId_First(long structureId,
182                    OrderByComparator<DDMStructureLink> orderByComparator) {
183                    return getPersistence()
184                                       .fetchByStructureId_First(structureId, orderByComparator);
185            }
186    
187            /**
188            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
189            *
190            * @param structureId the structure ID
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the last matching d d m structure link
193            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
194            */
195            public static DDMStructureLink findByStructureId_Last(long structureId,
196                    OrderByComparator<DDMStructureLink> orderByComparator)
197                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
198                    return getPersistence()
199                                       .findByStructureId_Last(structureId, orderByComparator);
200            }
201    
202            /**
203            * Returns the last d d m structure link in the ordered set where structureId = &#63;.
204            *
205            * @param structureId the structure ID
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @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
208            */
209            public static DDMStructureLink fetchByStructureId_Last(long structureId,
210                    OrderByComparator<DDMStructureLink> orderByComparator) {
211                    return getPersistence()
212                                       .fetchByStructureId_Last(structureId, orderByComparator);
213            }
214    
215            /**
216            * Returns the d d m structure links before and after the current d d m structure link in the ordered set where structureId = &#63;.
217            *
218            * @param structureLinkId the primary key of the current d d m structure link
219            * @param structureId the structure ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next d d m structure link
222            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
223            */
224            public static DDMStructureLink[] findByStructureId_PrevAndNext(
225                    long structureLinkId, long structureId,
226                    OrderByComparator<DDMStructureLink> orderByComparator)
227                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
228                    return getPersistence()
229                                       .findByStructureId_PrevAndNext(structureLinkId, structureId,
230                            orderByComparator);
231            }
232    
233            /**
234            * Removes all the d d m structure links where structureId = &#63; from the database.
235            *
236            * @param structureId the structure ID
237            */
238            public static void removeByStructureId(long structureId) {
239                    getPersistence().removeByStructureId(structureId);
240            }
241    
242            /**
243            * Returns the number of d d m structure links where structureId = &#63;.
244            *
245            * @param structureId the structure ID
246            * @return the number of matching d d m structure links
247            */
248            public static int countByStructureId(long structureId) {
249                    return getPersistence().countByStructureId(structureId);
250            }
251    
252            /**
253            * Returns all the d d m structure links where classNameId = &#63; and classPK = &#63;.
254            *
255            * @param classNameId the class name ID
256            * @param classPK the class p k
257            * @return the matching d d m structure links
258            */
259            public static List<DDMStructureLink> findByC_C(long classNameId,
260                    long classPK) {
261                    return getPersistence().findByC_C(classNameId, classPK);
262            }
263    
264            /**
265            * Returns a range of all the d d m structure links where classNameId = &#63; and classPK = &#63;.
266            *
267            * <p>
268            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
269            * </p>
270            *
271            * @param classNameId the class name ID
272            * @param classPK the class p k
273            * @param start the lower bound of the range of d d m structure links
274            * @param end the upper bound of the range of d d m structure links (not inclusive)
275            * @return the range of matching d d m structure links
276            */
277            public static List<DDMStructureLink> findByC_C(long classNameId,
278                    long classPK, int start, int end) {
279                    return getPersistence().findByC_C(classNameId, classPK, start, end);
280            }
281    
282            /**
283            * Returns an ordered range of all the d d m structure links where classNameId = &#63; and classPK = &#63;.
284            *
285            * <p>
286            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
287            * </p>
288            *
289            * @param classNameId the class name ID
290            * @param classPK the class p k
291            * @param start the lower bound of the range of d d m structure links
292            * @param end the upper bound of the range of d d m structure links (not inclusive)
293            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
294            * @return the ordered range of matching d d m structure links
295            */
296            public static List<DDMStructureLink> findByC_C(long classNameId,
297                    long classPK, int start, int end,
298                    OrderByComparator<DDMStructureLink> orderByComparator) {
299                    return getPersistence()
300                                       .findByC_C(classNameId, classPK, start, end,
301                            orderByComparator);
302            }
303    
304            /**
305            * Returns the first d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
306            *
307            * @param classNameId the class name ID
308            * @param classPK the class p k
309            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
310            * @return the first matching d d m structure link
311            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
312            */
313            public static DDMStructureLink findByC_C_First(long classNameId,
314                    long classPK, OrderByComparator<DDMStructureLink> orderByComparator)
315                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
316                    return getPersistence()
317                                       .findByC_C_First(classNameId, classPK, orderByComparator);
318            }
319    
320            /**
321            * Returns the first d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
322            *
323            * @param classNameId the class name ID
324            * @param classPK the class p k
325            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
326            * @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
327            */
328            public static DDMStructureLink fetchByC_C_First(long classNameId,
329                    long classPK, OrderByComparator<DDMStructureLink> orderByComparator) {
330                    return getPersistence()
331                                       .fetchByC_C_First(classNameId, classPK, orderByComparator);
332            }
333    
334            /**
335            * Returns the last d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
336            *
337            * @param classNameId the class name ID
338            * @param classPK the class p k
339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
340            * @return the last matching d d m structure link
341            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
342            */
343            public static DDMStructureLink findByC_C_Last(long classNameId,
344                    long classPK, OrderByComparator<DDMStructureLink> orderByComparator)
345                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
346                    return getPersistence()
347                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
348            }
349    
350            /**
351            * Returns the last d d m structure link in the ordered set where classNameId = &#63; and classPK = &#63;.
352            *
353            * @param classNameId the class name ID
354            * @param classPK the class p k
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            */
358            public static DDMStructureLink fetchByC_C_Last(long classNameId,
359                    long classPK, OrderByComparator<DDMStructureLink> orderByComparator) {
360                    return getPersistence()
361                                       .fetchByC_C_Last(classNameId, classPK, orderByComparator);
362            }
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 classNameId = &#63; and classPK = &#63;.
366            *
367            * @param structureLinkId the primary key of the current d d m structure link
368            * @param classNameId the class name ID
369            * @param classPK the class p k
370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
371            * @return the previous, current, and next d d m structure link
372            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
373            */
374            public static DDMStructureLink[] findByC_C_PrevAndNext(
375                    long structureLinkId, long classNameId, long classPK,
376                    OrderByComparator<DDMStructureLink> orderByComparator)
377                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
378                    return getPersistence()
379                                       .findByC_C_PrevAndNext(structureLinkId, classNameId,
380                            classPK, orderByComparator);
381            }
382    
383            /**
384            * Removes all the d d m structure links where classNameId = &#63; and classPK = &#63; from the database.
385            *
386            * @param classNameId the class name ID
387            * @param classPK the class p k
388            */
389            public static void removeByC_C(long classNameId, long classPK) {
390                    getPersistence().removeByC_C(classNameId, classPK);
391            }
392    
393            /**
394            * Returns the number of d d m structure links where classNameId = &#63; and classPK = &#63;.
395            *
396            * @param classNameId the class name ID
397            * @param classPK the class p k
398            * @return the number of matching d d m structure links
399            */
400            public static int countByC_C(long classNameId, long classPK) {
401                    return getPersistence().countByC_C(classNameId, classPK);
402            }
403    
404            /**
405            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or throws a {@link NoSuchStructureLinkException} if it could not be found.
406            *
407            * @param classNameId the class name ID
408            * @param classPK the class p k
409            * @param structureId the structure ID
410            * @return the matching d d m structure link
411            * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found
412            */
413            public static DDMStructureLink findByC_C_S(long classNameId, long classPK,
414                    long structureId)
415                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
416                    return getPersistence().findByC_C_S(classNameId, classPK, structureId);
417            }
418    
419            /**
420            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
421            *
422            * @param classNameId the class name ID
423            * @param classPK the class p k
424            * @param structureId the structure ID
425            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
426            */
427            public static DDMStructureLink fetchByC_C_S(long classNameId, long classPK,
428                    long structureId) {
429                    return getPersistence().fetchByC_C_S(classNameId, classPK, structureId);
430            }
431    
432            /**
433            * Returns the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
434            *
435            * @param classNameId the class name ID
436            * @param classPK the class p k
437            * @param structureId the structure ID
438            * @param retrieveFromCache whether to use the finder cache
439            * @return the matching d d m structure link, or <code>null</code> if a matching d d m structure link could not be found
440            */
441            public static DDMStructureLink fetchByC_C_S(long classNameId, long classPK,
442                    long structureId, boolean retrieveFromCache) {
443                    return getPersistence()
444                                       .fetchByC_C_S(classNameId, classPK, structureId,
445                            retrieveFromCache);
446            }
447    
448            /**
449            * Removes the d d m structure link where classNameId = &#63; and classPK = &#63; and structureId = &#63; from the database.
450            *
451            * @param classNameId the class name ID
452            * @param classPK the class p k
453            * @param structureId the structure ID
454            * @return the d d m structure link that was removed
455            */
456            public static DDMStructureLink removeByC_C_S(long classNameId,
457                    long classPK, long structureId)
458                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
459                    return getPersistence().removeByC_C_S(classNameId, classPK, structureId);
460            }
461    
462            /**
463            * Returns the number of d d m structure links where classNameId = &#63; and classPK = &#63; and structureId = &#63;.
464            *
465            * @param classNameId the class name ID
466            * @param classPK the class p k
467            * @param structureId the structure ID
468            * @return the number of matching d d m structure links
469            */
470            public static int countByC_C_S(long classNameId, long classPK,
471                    long structureId) {
472                    return getPersistence().countByC_C_S(classNameId, classPK, structureId);
473            }
474    
475            /**
476            * Caches the d d m structure link in the entity cache if it is enabled.
477            *
478            * @param ddmStructureLink the d d m structure link
479            */
480            public static void cacheResult(DDMStructureLink ddmStructureLink) {
481                    getPersistence().cacheResult(ddmStructureLink);
482            }
483    
484            /**
485            * Caches the d d m structure links in the entity cache if it is enabled.
486            *
487            * @param ddmStructureLinks the d d m structure links
488            */
489            public static void cacheResult(List<DDMStructureLink> ddmStructureLinks) {
490                    getPersistence().cacheResult(ddmStructureLinks);
491            }
492    
493            /**
494            * Creates a new d d m structure link with the primary key. Does not add the d d m structure link to the database.
495            *
496            * @param structureLinkId the primary key for the new d d m structure link
497            * @return the new d d m structure link
498            */
499            public static DDMStructureLink create(long structureLinkId) {
500                    return getPersistence().create(structureLinkId);
501            }
502    
503            /**
504            * Removes the d d m structure link with the primary key from the database. Also notifies the appropriate model listeners.
505            *
506            * @param structureLinkId the primary key of the d d m structure link
507            * @return the d d m structure link that was removed
508            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
509            */
510            public static DDMStructureLink remove(long structureLinkId)
511                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
512                    return getPersistence().remove(structureLinkId);
513            }
514    
515            public static DDMStructureLink updateImpl(DDMStructureLink ddmStructureLink) {
516                    return getPersistence().updateImpl(ddmStructureLink);
517            }
518    
519            /**
520            * Returns the d d m structure link with the primary key or throws a {@link NoSuchStructureLinkException} if it could not be found.
521            *
522            * @param structureLinkId the primary key of the d d m structure link
523            * @return the d d m structure link
524            * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found
525            */
526            public static DDMStructureLink findByPrimaryKey(long structureLinkId)
527                    throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException {
528                    return getPersistence().findByPrimaryKey(structureLinkId);
529            }
530    
531            /**
532            * Returns the d d m structure link with the primary key or returns <code>null</code> if it could not be found.
533            *
534            * @param structureLinkId the primary key of the d d m structure link
535            * @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
536            */
537            public static DDMStructureLink fetchByPrimaryKey(long structureLinkId) {
538                    return getPersistence().fetchByPrimaryKey(structureLinkId);
539            }
540    
541            public static java.util.Map<java.io.Serializable, DDMStructureLink> fetchByPrimaryKeys(
542                    java.util.Set<java.io.Serializable> primaryKeys) {
543                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
544            }
545    
546            /**
547            * Returns all the d d m structure links.
548            *
549            * @return the d d m structure links
550            */
551            public static List<DDMStructureLink> findAll() {
552                    return getPersistence().findAll();
553            }
554    
555            /**
556            * Returns a range of all the d d m structure links.
557            *
558            * <p>
559            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
560            * </p>
561            *
562            * @param start the lower bound of the range of d d m structure links
563            * @param end the upper bound of the range of d d m structure links (not inclusive)
564            * @return the range of d d m structure links
565            */
566            public static List<DDMStructureLink> findAll(int start, int end) {
567                    return getPersistence().findAll(start, end);
568            }
569    
570            /**
571            * Returns an ordered range of all the d d m structure links.
572            *
573            * <p>
574            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
575            * </p>
576            *
577            * @param start the lower bound of the range of d d m structure links
578            * @param end the upper bound of the range of d d m structure links (not inclusive)
579            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
580            * @return the ordered range of d d m structure links
581            */
582            public static List<DDMStructureLink> findAll(int start, int end,
583                    OrderByComparator<DDMStructureLink> orderByComparator) {
584                    return getPersistence().findAll(start, end, orderByComparator);
585            }
586    
587            /**
588            * Removes all the d d m structure links from the database.
589            */
590            public static void removeAll() {
591                    getPersistence().removeAll();
592            }
593    
594            /**
595            * Returns the number of d d m structure links.
596            *
597            * @return the number of d d m structure links
598            */
599            public static int countAll() {
600                    return getPersistence().countAll();
601            }
602    
603            public static DDMStructureLinkPersistence getPersistence() {
604                    if (_persistence == null) {
605                            _persistence = (DDMStructureLinkPersistence)PortalBeanLocatorUtil.locate(DDMStructureLinkPersistence.class.getName());
606    
607                            ReferenceRegistry.registerReference(DDMStructureLinkUtil.class,
608                                    "_persistence");
609                    }
610    
611                    return _persistence;
612            }
613    
614            /**
615             * @deprecated As of 6.2.0
616             */
617            @Deprecated
618            public void setPersistence(DDMStructureLinkPersistence persistence) {
619            }
620    
621            private static DDMStructureLinkPersistence _persistence;
622    }