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