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