001 /** 002 * Copyright (c) 2000-2010 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.ClusterGroup; 018 019 /** 020 * The persistence interface for the cluster group service. 021 * 022 * <p> 023 * Never modify or reference this interface directly. Always use {@link ClusterGroupUtil} to access the cluster group persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 024 * </p> 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 ClusterGroupPersistenceImpl 032 * @see ClusterGroupUtil 033 * @generated 034 */ 035 public interface ClusterGroupPersistence extends BasePersistence<ClusterGroup> { 036 /** 037 * Caches the cluster group in the entity cache if it is enabled. 038 * 039 * @param clusterGroup the cluster group to cache 040 */ 041 public void cacheResult(com.liferay.portal.model.ClusterGroup clusterGroup); 042 043 /** 044 * Caches the cluster groups in the entity cache if it is enabled. 045 * 046 * @param clusterGroups the cluster groups to cache 047 */ 048 public void cacheResult( 049 java.util.List<com.liferay.portal.model.ClusterGroup> clusterGroups); 050 051 /** 052 * Creates a new cluster group with the primary key. Does not add the cluster group to the database. 053 * 054 * @param clusterGroupId the primary key for the new cluster group 055 * @return the new cluster group 056 */ 057 public com.liferay.portal.model.ClusterGroup create(long clusterGroupId); 058 059 /** 060 * Removes the cluster group with the primary key from the database. Also notifies the appropriate model listeners. 061 * 062 * @param clusterGroupId the primary key of the cluster group to remove 063 * @return the cluster group that was removed 064 * @throws com.liferay.portal.NoSuchClusterGroupException if a cluster group with the primary key could not be found 065 * @throws SystemException if a system exception occurred 066 */ 067 public com.liferay.portal.model.ClusterGroup remove(long clusterGroupId) 068 throws com.liferay.portal.NoSuchClusterGroupException, 069 com.liferay.portal.kernel.exception.SystemException; 070 071 public com.liferay.portal.model.ClusterGroup updateImpl( 072 com.liferay.portal.model.ClusterGroup clusterGroup, boolean merge) 073 throws com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Finds the cluster group with the primary key or throws a {@link com.liferay.portal.NoSuchClusterGroupException} if it could not be found. 077 * 078 * @param clusterGroupId the primary key of the cluster group to find 079 * @return the cluster group 080 * @throws com.liferay.portal.NoSuchClusterGroupException if a cluster group with the primary key could not be found 081 * @throws SystemException if a system exception occurred 082 */ 083 public com.liferay.portal.model.ClusterGroup findByPrimaryKey( 084 long clusterGroupId) 085 throws com.liferay.portal.NoSuchClusterGroupException, 086 com.liferay.portal.kernel.exception.SystemException; 087 088 /** 089 * Finds the cluster group with the primary key or returns <code>null</code> if it could not be found. 090 * 091 * @param clusterGroupId the primary key of the cluster group to find 092 * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found 093 * @throws SystemException if a system exception occurred 094 */ 095 public com.liferay.portal.model.ClusterGroup fetchByPrimaryKey( 096 long clusterGroupId) 097 throws com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Finds all the cluster groups. 101 * 102 * @return the cluster groups 103 * @throws SystemException if a system exception occurred 104 */ 105 public java.util.List<com.liferay.portal.model.ClusterGroup> findAll() 106 throws com.liferay.portal.kernel.exception.SystemException; 107 108 /** 109 * Finds a range of all the cluster groups. 110 * 111 * <p> 112 * 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. 113 * </p> 114 * 115 * @param start the lower bound of the range of cluster groups to return 116 * @param end the upper bound of the range of cluster groups to return (not inclusive) 117 * @return the range of cluster groups 118 * @throws SystemException if a system exception occurred 119 */ 120 public java.util.List<com.liferay.portal.model.ClusterGroup> findAll( 121 int start, int end) 122 throws com.liferay.portal.kernel.exception.SystemException; 123 124 /** 125 * Finds an ordered range of all the cluster groups. 126 * 127 * <p> 128 * 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. 129 * </p> 130 * 131 * @param start the lower bound of the range of cluster groups to return 132 * @param end the upper bound of the range of cluster groups to return (not inclusive) 133 * @param orderByComparator the comparator to order the results by 134 * @return the ordered range of cluster groups 135 * @throws SystemException if a system exception occurred 136 */ 137 public java.util.List<com.liferay.portal.model.ClusterGroup> findAll( 138 int start, int end, 139 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 140 throws com.liferay.portal.kernel.exception.SystemException; 141 142 /** 143 * Removes all the cluster groups from the database. 144 * 145 * @throws SystemException if a system exception occurred 146 */ 147 public void removeAll() 148 throws com.liferay.portal.kernel.exception.SystemException; 149 150 /** 151 * Counts all the cluster groups. 152 * 153 * @return the number of cluster groups 154 * @throws SystemException if a system exception occurred 155 */ 156 public int countAll() 157 throws com.liferay.portal.kernel.exception.SystemException; 158 }