/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.portal.kernel.service.persistence; import aQute.bnd.annotation.ProviderType; import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.model.Contact; import com.liferay.portal.kernel.service.ServiceContext; import com.liferay.portal.kernel.util.OrderByComparator; import com.liferay.portal.kernel.util.ReferenceRegistry; import java.util.List; /** * The persistence utility for the contact service. This utility wraps {@link com.liferay.portal.service.persistence.impl.ContactPersistenceImpl} 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. * * <p> * Caching information and settings can be found in <code>portal.properties</code> * </p> * * @author Brian Wing Shun Chan * @see ContactPersistence * @see com.liferay.portal.service.persistence.impl.ContactPersistenceImpl * @generated */ @ProviderType public class ContactUtil { /* * NOTE FOR DEVELOPERS: * * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. */ /** * @see BasePersistence#clearCache() */ public static void clearCache() { getPersistence().clearCache(); } /** * @see BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) */ public static void clearCache(Contact contact) { getPersistence().clearCache(contact); } /** * @see BasePersistence#countWithDynamicQuery(DynamicQuery) */ public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { return getPersistence().countWithDynamicQuery(dynamicQuery); } /** * @see BasePersistence#findWithDynamicQuery(DynamicQuery) */ public static List<Contact> findWithDynamicQuery(DynamicQuery dynamicQuery) { return getPersistence().findWithDynamicQuery(dynamicQuery); } /** * @see BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) */ public static List<Contact> findWithDynamicQuery( DynamicQuery dynamicQuery, int start, int end) { return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); } /** * @see BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) */ public static List<Contact> findWithDynamicQuery( DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Contact> orderByComparator) { return getPersistence() .findWithDynamicQuery(dynamicQuery, start, end, orderByComparator); } /** * @see BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) */ public static Contact update(Contact contact) { return getPersistence().update(contact); } /** * @see BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) */ public static Contact update(Contact contact, ServiceContext serviceContext) { return getPersistence().update(contact, serviceContext); } /** * Returns all the contacts where companyId = ?. * * @param companyId the company ID * @return the matching contacts */ public static List<Contact> findByCompanyId(long companyId) { return getPersistence().findByCompanyId(companyId); } /** * Returns a range of all the contacts where companyId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param companyId the company ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @return the range of matching contacts */ public static List<Contact> findByCompanyId(long companyId, int start, int end) { return getPersistence().findByCompanyId(companyId, start, end); } /** * Returns an ordered range of all the contacts where companyId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param companyId the company ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching contacts */ public static List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator) { return getPersistence() .findByCompanyId(companyId, start, end, orderByComparator); } /** * Returns an ordered range of all the contacts where companyId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param companyId the company ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of matching contacts */ public static List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache) { return getPersistence() .findByCompanyId(companyId, start, end, orderByComparator, retrieveFromCache); } /** * Returns the first contact in the ordered set where companyId = ?. * * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByCompanyId_First(long companyId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByCompanyId_First(companyId, orderByComparator); } /** * Returns the first contact in the ordered set where companyId = ?. * * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByCompanyId_First(long companyId, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByCompanyId_First(companyId, orderByComparator); } /** * Returns the last contact in the ordered set where companyId = ?. * * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByCompanyId_Last(long companyId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByCompanyId_Last(companyId, orderByComparator); } /** * Returns the last contact in the ordered set where companyId = ?. * * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByCompanyId_Last(long companyId, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByCompanyId_Last(companyId, orderByComparator); } /** * Returns the contacts before and after the current contact in the ordered set where companyId = ?. * * @param contactId the primary key of the current contact * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next contact * @throws NoSuchContactException if a contact with the primary key could not be found */ public static Contact[] findByCompanyId_PrevAndNext(long contactId, long companyId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByCompanyId_PrevAndNext(contactId, companyId, orderByComparator); } /** * Removes all the contacts where companyId = ? from the database. * * @param companyId the company ID */ public static void removeByCompanyId(long companyId) { getPersistence().removeByCompanyId(companyId); } /** * Returns the number of contacts where companyId = ?. * * @param companyId the company ID * @return the number of matching contacts */ public static int countByCompanyId(long companyId) { return getPersistence().countByCompanyId(companyId); } /** * Returns all the contacts where accountId = ?. * * @param accountId the account ID * @return the matching contacts */ public static List<Contact> findByAccountId(long accountId) { return getPersistence().findByAccountId(accountId); } /** * Returns a range of all the contacts where accountId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param accountId the account ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @return the range of matching contacts */ public static List<Contact> findByAccountId(long accountId, int start, int end) { return getPersistence().findByAccountId(accountId, start, end); } /** * Returns an ordered range of all the contacts where accountId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param accountId the account ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching contacts */ public static List<Contact> findByAccountId(long accountId, int start, int end, OrderByComparator<Contact> orderByComparator) { return getPersistence() .findByAccountId(accountId, start, end, orderByComparator); } /** * Returns an ordered range of all the contacts where accountId = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param accountId the account ID * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of matching contacts */ public static List<Contact> findByAccountId(long accountId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache) { return getPersistence() .findByAccountId(accountId, start, end, orderByComparator, retrieveFromCache); } /** * Returns the first contact in the ordered set where accountId = ?. * * @param accountId the account ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByAccountId_First(long accountId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByAccountId_First(accountId, orderByComparator); } /** * Returns the first contact in the ordered set where accountId = ?. * * @param accountId the account ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByAccountId_First(long accountId, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByAccountId_First(accountId, orderByComparator); } /** * Returns the last contact in the ordered set where accountId = ?. * * @param accountId the account ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByAccountId_Last(long accountId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByAccountId_Last(accountId, orderByComparator); } /** * Returns the last contact in the ordered set where accountId = ?. * * @param accountId the account ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByAccountId_Last(long accountId, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByAccountId_Last(accountId, orderByComparator); } /** * Returns the contacts before and after the current contact in the ordered set where accountId = ?. * * @param contactId the primary key of the current contact * @param accountId the account ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next contact * @throws NoSuchContactException if a contact with the primary key could not be found */ public static Contact[] findByAccountId_PrevAndNext(long contactId, long accountId, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByAccountId_PrevAndNext(contactId, accountId, orderByComparator); } /** * Removes all the contacts where accountId = ? from the database. * * @param accountId the account ID */ public static void removeByAccountId(long accountId) { getPersistence().removeByAccountId(accountId); } /** * Returns the number of contacts where accountId = ?. * * @param accountId the account ID * @return the number of matching contacts */ public static int countByAccountId(long accountId) { return getPersistence().countByAccountId(accountId); } /** * Returns all the contacts where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @return the matching contacts */ public static List<Contact> findByC_C(long classNameId, long classPK) { return getPersistence().findByC_C(classNameId, classPK); } /** * Returns a range of all the contacts where classNameId = ? and classPK = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param classNameId the class name ID * @param classPK the class pk * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @return the range of matching contacts */ public static List<Contact> findByC_C(long classNameId, long classPK, int start, int end) { return getPersistence().findByC_C(classNameId, classPK, start, end); } /** * Returns an ordered range of all the contacts where classNameId = ? and classPK = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param classNameId the class name ID * @param classPK the class pk * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching contacts */ public static List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator) { return getPersistence() .findByC_C(classNameId, classPK, start, end, orderByComparator); } /** * Returns an ordered range of all the contacts where classNameId = ? and classPK = ?. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param classNameId the class name ID * @param classPK the class pk * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of matching contacts */ public static List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache) { return getPersistence() .findByC_C(classNameId, classPK, start, end, orderByComparator, retrieveFromCache); } /** * Returns the first contact in the ordered set where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByC_C_First(classNameId, classPK, orderByComparator); } /** * Returns the first contact in the ordered set where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByC_C_First(classNameId, classPK, orderByComparator); } /** * Returns the last contact in the ordered set where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact * @throws NoSuchContactException if a matching contact could not be found */ public static Contact findByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByC_C_Last(classNameId, classPK, orderByComparator); } /** * Returns the last contact in the ordered set where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching contact, or <code>null</code> if a matching contact could not be found */ public static Contact fetchByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) { return getPersistence() .fetchByC_C_Last(classNameId, classPK, orderByComparator); } /** * Returns the contacts before and after the current contact in the ordered set where classNameId = ? and classPK = ?. * * @param contactId the primary key of the current contact * @param classNameId the class name ID * @param classPK the class pk * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next contact * @throws NoSuchContactException if a contact with the primary key could not be found */ public static Contact[] findByC_C_PrevAndNext(long contactId, long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence() .findByC_C_PrevAndNext(contactId, classNameId, classPK, orderByComparator); } /** * Removes all the contacts where classNameId = ? and classPK = ? from the database. * * @param classNameId the class name ID * @param classPK the class pk */ public static void removeByC_C(long classNameId, long classPK) { getPersistence().removeByC_C(classNameId, classPK); } /** * Returns the number of contacts where classNameId = ? and classPK = ?. * * @param classNameId the class name ID * @param classPK the class pk * @return the number of matching contacts */ public static int countByC_C(long classNameId, long classPK) { return getPersistence().countByC_C(classNameId, classPK); } /** * Caches the contact in the entity cache if it is enabled. * * @param contact the contact */ public static void cacheResult(Contact contact) { getPersistence().cacheResult(contact); } /** * Caches the contacts in the entity cache if it is enabled. * * @param contacts the contacts */ public static void cacheResult(List<Contact> contacts) { getPersistence().cacheResult(contacts); } /** * Creates a new contact with the primary key. Does not add the contact to the database. * * @param contactId the primary key for the new contact * @return the new contact */ public static Contact create(long contactId) { return getPersistence().create(contactId); } /** * Removes the contact with the primary key from the database. Also notifies the appropriate model listeners. * * @param contactId the primary key of the contact * @return the contact that was removed * @throws NoSuchContactException if a contact with the primary key could not be found */ public static Contact remove(long contactId) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence().remove(contactId); } public static Contact updateImpl(Contact contact) { return getPersistence().updateImpl(contact); } /** * Returns the contact with the primary key or throws a {@link NoSuchContactException} if it could not be found. * * @param contactId the primary key of the contact * @return the contact * @throws NoSuchContactException if a contact with the primary key could not be found */ public static Contact findByPrimaryKey(long contactId) throws com.liferay.portal.kernel.exception.NoSuchContactException { return getPersistence().findByPrimaryKey(contactId); } /** * Returns the contact with the primary key or returns <code>null</code> if it could not be found. * * @param contactId the primary key of the contact * @return the contact, or <code>null</code> if a contact with the primary key could not be found */ public static Contact fetchByPrimaryKey(long contactId) { return getPersistence().fetchByPrimaryKey(contactId); } public static java.util.Map<java.io.Serializable, Contact> fetchByPrimaryKeys( java.util.Set<java.io.Serializable> primaryKeys) { return getPersistence().fetchByPrimaryKeys(primaryKeys); } /** * Returns all the contacts. * * @return the contacts */ public static List<Contact> findAll() { return getPersistence().findAll(); } /** * Returns a range of all the contacts. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @return the range of contacts */ public static List<Contact> findAll(int start, int end) { return getPersistence().findAll(start, end); } /** * Returns an ordered range of all the contacts. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of contacts */ public static List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator) { return getPersistence().findAll(start, end, orderByComparator); } /** * Returns an ordered range of all the contacts. * * <p> * 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 ContactModelImpl}. 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. * </p> * * @param start the lower bound of the range of contacts * @param end the upper bound of the range of contacts (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of contacts */ public static List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache) { return getPersistence() .findAll(start, end, orderByComparator, retrieveFromCache); } /** * Removes all the contacts from the database. */ public static void removeAll() { getPersistence().removeAll(); } /** * Returns the number of contacts. * * @return the number of contacts */ public static int countAll() { return getPersistence().countAll(); } public static ContactPersistence getPersistence() { if (_persistence == null) { _persistence = (ContactPersistence)PortalBeanLocatorUtil.locate(ContactPersistence.class.getName()); ReferenceRegistry.registerReference(ContactUtil.class, "_persistence"); } return _persistence; } private static ContactPersistence _persistence; }