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