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