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