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