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