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