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.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.OrgLabor; 020 021 /** 022 * The persistence interface for the org labor service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.OrgLaborPersistenceImpl 030 * @see OrgLaborUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface OrgLaborPersistence extends BasePersistence<OrgLabor> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link OrgLaborUtil} to access the org labor persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the org labors where organizationId = ?. 043 * 044 * @param organizationId the organization ID 045 * @return the matching org labors 046 */ 047 public java.util.List<OrgLabor> findByOrganizationId(long organizationId); 048 049 /** 050 * Returns a range of all the org labors where organizationId = ?. 051 * 052 * <p> 053 * 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 OrgLaborModelImpl}. 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. 054 * </p> 055 * 056 * @param organizationId the organization ID 057 * @param start the lower bound of the range of org labors 058 * @param end the upper bound of the range of org labors (not inclusive) 059 * @return the range of matching org labors 060 */ 061 public java.util.List<OrgLabor> findByOrganizationId(long organizationId, 062 int start, int end); 063 064 /** 065 * Returns an ordered range of all the org labors where organizationId = ?. 066 * 067 * <p> 068 * 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 OrgLaborModelImpl}. 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. 069 * </p> 070 * 071 * @param organizationId the organization ID 072 * @param start the lower bound of the range of org labors 073 * @param end the upper bound of the range of org labors (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching org labors 076 */ 077 public java.util.List<OrgLabor> findByOrganizationId(long organizationId, 078 int start, int end, 079 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator); 080 081 /** 082 * Returns the first org labor in the ordered set where organizationId = ?. 083 * 084 * @param organizationId the organization ID 085 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 086 * @return the first matching org labor 087 * @throws NoSuchOrgLaborException if a matching org labor could not be found 088 */ 089 public OrgLabor findByOrganizationId_First(long organizationId, 090 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator) 091 throws com.liferay.portal.NoSuchOrgLaborException; 092 093 /** 094 * Returns the first org labor in the ordered set where organizationId = ?. 095 * 096 * @param organizationId the organization ID 097 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 098 * @return the first matching org labor, or <code>null</code> if a matching org labor could not be found 099 */ 100 public OrgLabor fetchByOrganizationId_First(long organizationId, 101 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator); 102 103 /** 104 * Returns the last org labor in the ordered set where organizationId = ?. 105 * 106 * @param organizationId the organization ID 107 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 108 * @return the last matching org labor 109 * @throws NoSuchOrgLaborException if a matching org labor could not be found 110 */ 111 public OrgLabor findByOrganizationId_Last(long organizationId, 112 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator) 113 throws com.liferay.portal.NoSuchOrgLaborException; 114 115 /** 116 * Returns the last org labor in the ordered set where organizationId = ?. 117 * 118 * @param organizationId the organization ID 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the last matching org labor, or <code>null</code> if a matching org labor could not be found 121 */ 122 public OrgLabor fetchByOrganizationId_Last(long organizationId, 123 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator); 124 125 /** 126 * Returns the org labors before and after the current org labor in the ordered set where organizationId = ?. 127 * 128 * @param orgLaborId the primary key of the current org labor 129 * @param organizationId the organization ID 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the previous, current, and next org labor 132 * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found 133 */ 134 public OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId, 135 long organizationId, 136 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator) 137 throws com.liferay.portal.NoSuchOrgLaborException; 138 139 /** 140 * Removes all the org labors where organizationId = ? from the database. 141 * 142 * @param organizationId the organization ID 143 */ 144 public void removeByOrganizationId(long organizationId); 145 146 /** 147 * Returns the number of org labors where organizationId = ?. 148 * 149 * @param organizationId the organization ID 150 * @return the number of matching org labors 151 */ 152 public int countByOrganizationId(long organizationId); 153 154 /** 155 * Caches the org labor in the entity cache if it is enabled. 156 * 157 * @param orgLabor the org labor 158 */ 159 public void cacheResult(OrgLabor orgLabor); 160 161 /** 162 * Caches the org labors in the entity cache if it is enabled. 163 * 164 * @param orgLabors the org labors 165 */ 166 public void cacheResult(java.util.List<OrgLabor> orgLabors); 167 168 /** 169 * Creates a new org labor with the primary key. Does not add the org labor to the database. 170 * 171 * @param orgLaborId the primary key for the new org labor 172 * @return the new org labor 173 */ 174 public OrgLabor create(long orgLaborId); 175 176 /** 177 * Removes the org labor with the primary key from the database. Also notifies the appropriate model listeners. 178 * 179 * @param orgLaborId the primary key of the org labor 180 * @return the org labor that was removed 181 * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found 182 */ 183 public OrgLabor remove(long orgLaborId) 184 throws com.liferay.portal.NoSuchOrgLaborException; 185 186 public OrgLabor updateImpl(OrgLabor orgLabor); 187 188 /** 189 * Returns the org labor with the primary key or throws a {@link NoSuchOrgLaborException} if it could not be found. 190 * 191 * @param orgLaborId the primary key of the org labor 192 * @return the org labor 193 * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found 194 */ 195 public OrgLabor findByPrimaryKey(long orgLaborId) 196 throws com.liferay.portal.NoSuchOrgLaborException; 197 198 /** 199 * Returns the org labor with the primary key or returns <code>null</code> if it could not be found. 200 * 201 * @param orgLaborId the primary key of the org labor 202 * @return the org labor, or <code>null</code> if a org labor with the primary key could not be found 203 */ 204 public OrgLabor fetchByPrimaryKey(long orgLaborId); 205 206 @Override 207 public java.util.Map<java.io.Serializable, OrgLabor> fetchByPrimaryKeys( 208 java.util.Set<java.io.Serializable> primaryKeys); 209 210 /** 211 * Returns all the org labors. 212 * 213 * @return the org labors 214 */ 215 public java.util.List<OrgLabor> findAll(); 216 217 /** 218 * Returns a range of all the org labors. 219 * 220 * <p> 221 * 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 OrgLaborModelImpl}. 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. 222 * </p> 223 * 224 * @param start the lower bound of the range of org labors 225 * @param end the upper bound of the range of org labors (not inclusive) 226 * @return the range of org labors 227 */ 228 public java.util.List<OrgLabor> findAll(int start, int end); 229 230 /** 231 * Returns an ordered range of all the org labors. 232 * 233 * <p> 234 * 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 OrgLaborModelImpl}. 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. 235 * </p> 236 * 237 * @param start the lower bound of the range of org labors 238 * @param end the upper bound of the range of org labors (not inclusive) 239 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 240 * @return the ordered range of org labors 241 */ 242 public java.util.List<OrgLabor> findAll(int start, int end, 243 com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator); 244 245 /** 246 * Removes all the org labors from the database. 247 */ 248 public void removeAll(); 249 250 /** 251 * Returns the number of org labors. 252 * 253 * @return the number of org labors 254 */ 255 public int countAll(); 256 }