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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.ClassName;
020    
021    /**
022     * The persistence interface for the class name 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 ClassNamePersistenceImpl
030     * @see ClassNameUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ClassNamePersistence extends BasePersistence<ClassName> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link ClassNameUtil} to access the class name persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns the class name where value = &#63; or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found.
043            *
044            * @param value the value
045            * @return the matching class name
046            * @throws com.liferay.portal.NoSuchClassNameException if a matching class name could not be found
047            * @throws SystemException if a system exception occurred
048            */
049            public com.liferay.portal.model.ClassName findByValue(
050                    java.lang.String value)
051                    throws com.liferay.portal.NoSuchClassNameException,
052                            com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Returns the class name where value = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
056            *
057            * @param value the value
058            * @return the matching class name, or <code>null</code> if a matching class name could not be found
059            * @throws SystemException if a system exception occurred
060            */
061            public com.liferay.portal.model.ClassName fetchByValue(
062                    java.lang.String value)
063                    throws com.liferay.portal.kernel.exception.SystemException;
064    
065            /**
066            * Returns the class name where value = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
067            *
068            * @param value the value
069            * @param retrieveFromCache whether to use the finder cache
070            * @return the matching class name, or <code>null</code> if a matching class name could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.ClassName fetchByValue(
074                    java.lang.String value, boolean retrieveFromCache)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Removes the class name where value = &#63; from the database.
079            *
080            * @param value the value
081            * @return the class name that was removed
082            * @throws SystemException if a system exception occurred
083            */
084            public com.liferay.portal.model.ClassName removeByValue(
085                    java.lang.String value)
086                    throws com.liferay.portal.NoSuchClassNameException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            /**
090            * Returns the number of class names where value = &#63;.
091            *
092            * @param value the value
093            * @return the number of matching class names
094            * @throws SystemException if a system exception occurred
095            */
096            public int countByValue(java.lang.String value)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Caches the class name in the entity cache if it is enabled.
101            *
102            * @param className the class name
103            */
104            public void cacheResult(com.liferay.portal.model.ClassName className);
105    
106            /**
107            * Caches the class names in the entity cache if it is enabled.
108            *
109            * @param classNames the class names
110            */
111            public void cacheResult(
112                    java.util.List<com.liferay.portal.model.ClassName> classNames);
113    
114            /**
115            * Creates a new class name with the primary key. Does not add the class name to the database.
116            *
117            * @param classNameId the primary key for the new class name
118            * @return the new class name
119            */
120            public com.liferay.portal.model.ClassName create(long classNameId);
121    
122            /**
123            * Removes the class name with the primary key from the database. Also notifies the appropriate model listeners.
124            *
125            * @param classNameId the primary key of the class name
126            * @return the class name that was removed
127            * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found
128            * @throws SystemException if a system exception occurred
129            */
130            public com.liferay.portal.model.ClassName remove(long classNameId)
131                    throws com.liferay.portal.NoSuchClassNameException,
132                            com.liferay.portal.kernel.exception.SystemException;
133    
134            public com.liferay.portal.model.ClassName updateImpl(
135                    com.liferay.portal.model.ClassName className)
136                    throws com.liferay.portal.kernel.exception.SystemException;
137    
138            /**
139            * Returns the class name with the primary key or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found.
140            *
141            * @param classNameId the primary key of the class name
142            * @return the class name
143            * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found
144            * @throws SystemException if a system exception occurred
145            */
146            public com.liferay.portal.model.ClassName findByPrimaryKey(long classNameId)
147                    throws com.liferay.portal.NoSuchClassNameException,
148                            com.liferay.portal.kernel.exception.SystemException;
149    
150            /**
151            * Returns the class name with the primary key or returns <code>null</code> if it could not be found.
152            *
153            * @param classNameId the primary key of the class name
154            * @return the class name, or <code>null</code> if a class name with the primary key could not be found
155            * @throws SystemException if a system exception occurred
156            */
157            public com.liferay.portal.model.ClassName fetchByPrimaryKey(
158                    long classNameId)
159                    throws com.liferay.portal.kernel.exception.SystemException;
160    
161            /**
162            * Returns all the class names.
163            *
164            * @return the class names
165            * @throws SystemException if a system exception occurred
166            */
167            public java.util.List<com.liferay.portal.model.ClassName> findAll()
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns a range of all the class names.
172            *
173            * <p>
174            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ClassNameModelImpl}. 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.
175            * </p>
176            *
177            * @param start the lower bound of the range of class names
178            * @param end the upper bound of the range of class names (not inclusive)
179            * @return the range of class names
180            * @throws SystemException if a system exception occurred
181            */
182            public java.util.List<com.liferay.portal.model.ClassName> findAll(
183                    int start, int end)
184                    throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns an ordered range of all the class names.
188            *
189            * <p>
190            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ClassNameModelImpl}. 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of class names
194            * @param end the upper bound of the range of class names (not inclusive)
195            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
196            * @return the ordered range of class names
197            * @throws SystemException if a system exception occurred
198            */
199            public java.util.List<com.liferay.portal.model.ClassName> findAll(
200                    int start, int end,
201                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Removes all the class names from the database.
206            *
207            * @throws SystemException if a system exception occurred
208            */
209            public void removeAll()
210                    throws com.liferay.portal.kernel.exception.SystemException;
211    
212            /**
213            * Returns the number of class names.
214            *
215            * @return the number of class names
216            * @throws SystemException if a system exception occurred
217            */
218            public int countAll()
219                    throws com.liferay.portal.kernel.exception.SystemException;
220    }