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.kernel.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.NoSuchClusterGroupException; 020 import com.liferay.portal.kernel.model.ClusterGroup; 021 022 /** 023 * The persistence interface for the cluster group service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.ClusterGroupPersistenceImpl 031 * @see ClusterGroupUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface ClusterGroupPersistence extends BasePersistence<ClusterGroup> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * 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. 040 */ 041 042 /** 043 * Caches the cluster group in the entity cache if it is enabled. 044 * 045 * @param clusterGroup the cluster group 046 */ 047 public void cacheResult(ClusterGroup clusterGroup); 048 049 /** 050 * Caches the cluster groups in the entity cache if it is enabled. 051 * 052 * @param clusterGroups the cluster groups 053 */ 054 public void cacheResult(java.util.List<ClusterGroup> clusterGroups); 055 056 /** 057 * Creates a new cluster group with the primary key. Does not add the cluster group to the database. 058 * 059 * @param clusterGroupId the primary key for the new cluster group 060 * @return the new cluster group 061 */ 062 public ClusterGroup create(long clusterGroupId); 063 064 /** 065 * Removes the cluster group with the primary key from the database. Also notifies the appropriate model listeners. 066 * 067 * @param clusterGroupId the primary key of the cluster group 068 * @return the cluster group that was removed 069 * @throws NoSuchClusterGroupException if a cluster group with the primary key could not be found 070 */ 071 public ClusterGroup remove(long clusterGroupId) 072 throws NoSuchClusterGroupException; 073 074 public ClusterGroup updateImpl(ClusterGroup clusterGroup); 075 076 /** 077 * Returns the cluster group with the primary key or throws a {@link NoSuchClusterGroupException} if it could not be found. 078 * 079 * @param clusterGroupId the primary key of the cluster group 080 * @return the cluster group 081 * @throws NoSuchClusterGroupException if a cluster group with the primary key could not be found 082 */ 083 public ClusterGroup findByPrimaryKey(long clusterGroupId) 084 throws NoSuchClusterGroupException; 085 086 /** 087 * Returns the cluster group with the primary key or returns <code>null</code> if it could not be found. 088 * 089 * @param clusterGroupId the primary key of the cluster group 090 * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found 091 */ 092 public ClusterGroup fetchByPrimaryKey(long clusterGroupId); 093 094 @Override 095 public java.util.Map<java.io.Serializable, ClusterGroup> fetchByPrimaryKeys( 096 java.util.Set<java.io.Serializable> primaryKeys); 097 098 /** 099 * Returns all the cluster groups. 100 * 101 * @return the cluster groups 102 */ 103 public java.util.List<ClusterGroup> findAll(); 104 105 /** 106 * Returns a range of all the cluster groups. 107 * 108 * <p> 109 * 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 ClusterGroupModelImpl}. 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. 110 * </p> 111 * 112 * @param start the lower bound of the range of cluster groups 113 * @param end the upper bound of the range of cluster groups (not inclusive) 114 * @return the range of cluster groups 115 */ 116 public java.util.List<ClusterGroup> findAll(int start, int end); 117 118 /** 119 * Returns an ordered range of all the cluster groups. 120 * 121 * <p> 122 * 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 ClusterGroupModelImpl}. 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. 123 * </p> 124 * 125 * @param start the lower bound of the range of cluster groups 126 * @param end the upper bound of the range of cluster groups (not inclusive) 127 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 128 * @return the ordered range of cluster groups 129 */ 130 public java.util.List<ClusterGroup> findAll(int start, int end, 131 com.liferay.portal.kernel.util.OrderByComparator<ClusterGroup> orderByComparator); 132 133 /** 134 * Returns an ordered range of all the cluster groups. 135 * 136 * <p> 137 * 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 ClusterGroupModelImpl}. 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. 138 * </p> 139 * 140 * @param start the lower bound of the range of cluster groups 141 * @param end the upper bound of the range of cluster groups (not inclusive) 142 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 143 * @param retrieveFromCache whether to retrieve from the finder cache 144 * @return the ordered range of cluster groups 145 */ 146 public java.util.List<ClusterGroup> findAll(int start, int end, 147 com.liferay.portal.kernel.util.OrderByComparator<ClusterGroup> orderByComparator, 148 boolean retrieveFromCache); 149 150 /** 151 * Removes all the cluster groups from the database. 152 */ 153 public void removeAll(); 154 155 /** 156 * Returns the number of cluster groups. 157 * 158 * @return the number of cluster groups 159 */ 160 public int countAll(); 161 }