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.service.persistence.BasePersistence; 020 021 import com.liferay.portlet.dynamicdatamapping.model.DDMTemplateLink; 022 023 /** 024 * The persistence interface for the d d m template link service. 025 * 026 * <p> 027 * Caching information and settings can be found in <code>portal.properties</code> 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMTemplateLinkPersistenceImpl 032 * @see DDMTemplateLinkUtil 033 * @generated 034 */ 035 @ProviderType 036 public interface DDMTemplateLinkPersistence extends BasePersistence<DDMTemplateLink> { 037 /* 038 * NOTE FOR DEVELOPERS: 039 * 040 * Never modify or reference this interface directly. Always use {@link DDMTemplateLinkUtil} to access the d d m template link persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 041 */ 042 043 /** 044 * Returns all the d d m template links where classNameId = ?. 045 * 046 * @param classNameId the class name ID 047 * @return the matching d d m template links 048 */ 049 public java.util.List<DDMTemplateLink> findByClassNameId(long classNameId); 050 051 /** 052 * Returns a range of all the d d m template links where classNameId = ?. 053 * 054 * <p> 055 * 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 DDMTemplateLinkModelImpl}. 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. 056 * </p> 057 * 058 * @param classNameId the class name ID 059 * @param start the lower bound of the range of d d m template links 060 * @param end the upper bound of the range of d d m template links (not inclusive) 061 * @return the range of matching d d m template links 062 */ 063 public java.util.List<DDMTemplateLink> findByClassNameId(long classNameId, 064 int start, int end); 065 066 /** 067 * Returns an ordered range of all the d d m template links where classNameId = ?. 068 * 069 * <p> 070 * 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 DDMTemplateLinkModelImpl}. 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. 071 * </p> 072 * 073 * @param classNameId the class name ID 074 * @param start the lower bound of the range of d d m template links 075 * @param end the upper bound of the range of d d m template links (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching d d m template links 078 */ 079 public java.util.List<DDMTemplateLink> findByClassNameId(long classNameId, 080 int start, int end, 081 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 082 083 /** 084 * Returns the first d d m template link in the ordered set where classNameId = ?. 085 * 086 * @param classNameId the class name ID 087 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 088 * @return the first matching d d m template link 089 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 090 */ 091 public DDMTemplateLink findByClassNameId_First(long classNameId, 092 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 093 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 094 095 /** 096 * Returns the first d d m template link in the ordered set where classNameId = ?. 097 * 098 * @param classNameId the class name ID 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 101 */ 102 public DDMTemplateLink fetchByClassNameId_First(long classNameId, 103 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 104 105 /** 106 * Returns the last d d m template link in the ordered set where classNameId = ?. 107 * 108 * @param classNameId the class name ID 109 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 110 * @return the last matching d d m template link 111 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 112 */ 113 public DDMTemplateLink findByClassNameId_Last(long classNameId, 114 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 115 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 116 117 /** 118 * Returns the last d d m template link in the ordered set where classNameId = ?. 119 * 120 * @param classNameId the class name ID 121 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 122 * @return the last matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 123 */ 124 public DDMTemplateLink fetchByClassNameId_Last(long classNameId, 125 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 126 127 /** 128 * Returns the d d m template links before and after the current d d m template link in the ordered set where classNameId = ?. 129 * 130 * @param templateLinkId the primary key of the current d d m template link 131 * @param classNameId the class name ID 132 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 133 * @return the previous, current, and next d d m template link 134 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 135 */ 136 public DDMTemplateLink[] findByClassNameId_PrevAndNext( 137 long templateLinkId, long classNameId, 138 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 139 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 140 141 /** 142 * Removes all the d d m template links where classNameId = ? from the database. 143 * 144 * @param classNameId the class name ID 145 */ 146 public void removeByClassNameId(long classNameId); 147 148 /** 149 * Returns the number of d d m template links where classNameId = ?. 150 * 151 * @param classNameId the class name ID 152 * @return the number of matching d d m template links 153 */ 154 public int countByClassNameId(long classNameId); 155 156 /** 157 * Returns all the d d m template links where templateId = ?. 158 * 159 * @param templateId the template ID 160 * @return the matching d d m template links 161 */ 162 public java.util.List<DDMTemplateLink> findByTemplateId(long templateId); 163 164 /** 165 * Returns a range of all the d d m template links where templateId = ?. 166 * 167 * <p> 168 * 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 DDMTemplateLinkModelImpl}. 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. 169 * </p> 170 * 171 * @param templateId the template ID 172 * @param start the lower bound of the range of d d m template links 173 * @param end the upper bound of the range of d d m template links (not inclusive) 174 * @return the range of matching d d m template links 175 */ 176 public java.util.List<DDMTemplateLink> findByTemplateId(long templateId, 177 int start, int end); 178 179 /** 180 * Returns an ordered range of all the d d m template links where templateId = ?. 181 * 182 * <p> 183 * 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 DDMTemplateLinkModelImpl}. 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. 184 * </p> 185 * 186 * @param templateId the template ID 187 * @param start the lower bound of the range of d d m template links 188 * @param end the upper bound of the range of d d m template links (not inclusive) 189 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 190 * @return the ordered range of matching d d m template links 191 */ 192 public java.util.List<DDMTemplateLink> findByTemplateId(long templateId, 193 int start, int end, 194 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 195 196 /** 197 * Returns the first d d m template link in the ordered set where templateId = ?. 198 * 199 * @param templateId the template ID 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the first matching d d m template link 202 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 203 */ 204 public DDMTemplateLink findByTemplateId_First(long templateId, 205 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 206 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 207 208 /** 209 * Returns the first d d m template link in the ordered set where templateId = ?. 210 * 211 * @param templateId the template ID 212 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 213 * @return the first matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 214 */ 215 public DDMTemplateLink fetchByTemplateId_First(long templateId, 216 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 217 218 /** 219 * Returns the last d d m template link in the ordered set where templateId = ?. 220 * 221 * @param templateId the template ID 222 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 223 * @return the last matching d d m template link 224 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 225 */ 226 public DDMTemplateLink findByTemplateId_Last(long templateId, 227 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 228 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 229 230 /** 231 * Returns the last d d m template link in the ordered set where templateId = ?. 232 * 233 * @param templateId the template ID 234 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 235 * @return the last matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 236 */ 237 public DDMTemplateLink fetchByTemplateId_Last(long templateId, 238 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 239 240 /** 241 * Returns the d d m template links before and after the current d d m template link in the ordered set where templateId = ?. 242 * 243 * @param templateLinkId the primary key of the current d d m template link 244 * @param templateId the template ID 245 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 246 * @return the previous, current, and next d d m template link 247 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 248 */ 249 public DDMTemplateLink[] findByTemplateId_PrevAndNext(long templateLinkId, 250 long templateId, 251 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) 252 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 253 254 /** 255 * Removes all the d d m template links where templateId = ? from the database. 256 * 257 * @param templateId the template ID 258 */ 259 public void removeByTemplateId(long templateId); 260 261 /** 262 * Returns the number of d d m template links where templateId = ?. 263 * 264 * @param templateId the template ID 265 * @return the number of matching d d m template links 266 */ 267 public int countByTemplateId(long templateId); 268 269 /** 270 * Returns the d d m template link where classNameId = ? and classPK = ? or throws a {@link NoSuchTemplateLinkException} if it could not be found. 271 * 272 * @param classNameId the class name ID 273 * @param classPK the class p k 274 * @return the matching d d m template link 275 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 276 */ 277 public DDMTemplateLink findByC_C(long classNameId, long classPK) 278 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 279 280 /** 281 * Returns the d d m template link where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 282 * 283 * @param classNameId the class name ID 284 * @param classPK the class p k 285 * @return the matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 286 */ 287 public DDMTemplateLink fetchByC_C(long classNameId, long classPK); 288 289 /** 290 * Returns the d d m template link where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 291 * 292 * @param classNameId the class name ID 293 * @param classPK the class p k 294 * @param retrieveFromCache whether to use the finder cache 295 * @return the matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 296 */ 297 public DDMTemplateLink fetchByC_C(long classNameId, long classPK, 298 boolean retrieveFromCache); 299 300 /** 301 * Removes the d d m template link where classNameId = ? and classPK = ? from the database. 302 * 303 * @param classNameId the class name ID 304 * @param classPK the class p k 305 * @return the d d m template link that was removed 306 */ 307 public DDMTemplateLink removeByC_C(long classNameId, long classPK) 308 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 309 310 /** 311 * Returns the number of d d m template links where classNameId = ? and classPK = ?. 312 * 313 * @param classNameId the class name ID 314 * @param classPK the class p k 315 * @return the number of matching d d m template links 316 */ 317 public int countByC_C(long classNameId, long classPK); 318 319 /** 320 * Caches the d d m template link in the entity cache if it is enabled. 321 * 322 * @param ddmTemplateLink the d d m template link 323 */ 324 public void cacheResult(DDMTemplateLink ddmTemplateLink); 325 326 /** 327 * Caches the d d m template links in the entity cache if it is enabled. 328 * 329 * @param ddmTemplateLinks the d d m template links 330 */ 331 public void cacheResult(java.util.List<DDMTemplateLink> ddmTemplateLinks); 332 333 /** 334 * Creates a new d d m template link with the primary key. Does not add the d d m template link to the database. 335 * 336 * @param templateLinkId the primary key for the new d d m template link 337 * @return the new d d m template link 338 */ 339 public DDMTemplateLink create(long templateLinkId); 340 341 /** 342 * Removes the d d m template link with the primary key from the database. Also notifies the appropriate model listeners. 343 * 344 * @param templateLinkId the primary key of the d d m template link 345 * @return the d d m template link that was removed 346 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 347 */ 348 public DDMTemplateLink remove(long templateLinkId) 349 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 350 351 public DDMTemplateLink updateImpl(DDMTemplateLink ddmTemplateLink); 352 353 /** 354 * Returns the d d m template link with the primary key or throws a {@link NoSuchTemplateLinkException} if it could not be found. 355 * 356 * @param templateLinkId the primary key of the d d m template link 357 * @return the d d m template link 358 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 359 */ 360 public DDMTemplateLink findByPrimaryKey(long templateLinkId) 361 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException; 362 363 /** 364 * Returns the d d m template link with the primary key or returns <code>null</code> if it could not be found. 365 * 366 * @param templateLinkId the primary key of the d d m template link 367 * @return the d d m template link, or <code>null</code> if a d d m template link with the primary key could not be found 368 */ 369 public DDMTemplateLink fetchByPrimaryKey(long templateLinkId); 370 371 @Override 372 public java.util.Map<java.io.Serializable, DDMTemplateLink> fetchByPrimaryKeys( 373 java.util.Set<java.io.Serializable> primaryKeys); 374 375 /** 376 * Returns all the d d m template links. 377 * 378 * @return the d d m template links 379 */ 380 public java.util.List<DDMTemplateLink> findAll(); 381 382 /** 383 * Returns a range of all the d d m template links. 384 * 385 * <p> 386 * 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 DDMTemplateLinkModelImpl}. 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. 387 * </p> 388 * 389 * @param start the lower bound of the range of d d m template links 390 * @param end the upper bound of the range of d d m template links (not inclusive) 391 * @return the range of d d m template links 392 */ 393 public java.util.List<DDMTemplateLink> findAll(int start, int end); 394 395 /** 396 * Returns an ordered range of all the d d m template links. 397 * 398 * <p> 399 * 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 DDMTemplateLinkModelImpl}. 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. 400 * </p> 401 * 402 * @param start the lower bound of the range of d d m template links 403 * @param end the upper bound of the range of d d m template links (not inclusive) 404 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 405 * @return the ordered range of d d m template links 406 */ 407 public java.util.List<DDMTemplateLink> findAll(int start, int end, 408 com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator); 409 410 /** 411 * Removes all the d d m template links from the database. 412 */ 413 public void removeAll(); 414 415 /** 416 * Returns the number of d d m template links. 417 * 418 * @return the number of d d m template links 419 */ 420 public int countAll(); 421 }