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