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