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