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.model.ClassName;
020    
021    /**
022     * The persistence interface for the class name service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see com.liferay.portal.service.persistence.impl.ClassNamePersistenceImpl
030     * @see ClassNameUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ClassNamePersistence extends BasePersistence<ClassName> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040    
041            /**
042            * Returns the class name where value = &#63; or throws a {@link NoSuchClassNameException} if it could not be found.
043            *
044            * @param value the value
045            * @return the matching class name
046            * @throws NoSuchClassNameException if a matching class name could not be found
047            */
048            public ClassName findByValue(java.lang.String value)
049                    throws com.liferay.portal.exception.NoSuchClassNameException;
050    
051            /**
052            * Returns the class name where value = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
053            *
054            * @param value the value
055            * @return the matching class name, or <code>null</code> if a matching class name could not be found
056            */
057            public ClassName fetchByValue(java.lang.String value);
058    
059            /**
060            * Returns the class name where value = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
061            *
062            * @param value the value
063            * @param retrieveFromCache whether to retrieve from the finder cache
064            * @return the matching class name, or <code>null</code> if a matching class name could not be found
065            */
066            public ClassName fetchByValue(java.lang.String value,
067                    boolean retrieveFromCache);
068    
069            /**
070            * Removes the class name where value = &#63; from the database.
071            *
072            * @param value the value
073            * @return the class name that was removed
074            */
075            public ClassName removeByValue(java.lang.String value)
076                    throws com.liferay.portal.exception.NoSuchClassNameException;
077    
078            /**
079            * Returns the number of class names where value = &#63;.
080            *
081            * @param value the value
082            * @return the number of matching class names
083            */
084            public int countByValue(java.lang.String value);
085    
086            /**
087            * Caches the class name in the entity cache if it is enabled.
088            *
089            * @param className the class name
090            */
091            public void cacheResult(ClassName className);
092    
093            /**
094            * Caches the class names in the entity cache if it is enabled.
095            *
096            * @param classNames the class names
097            */
098            public void cacheResult(java.util.List<ClassName> classNames);
099    
100            /**
101            * Creates a new class name with the primary key. Does not add the class name to the database.
102            *
103            * @param classNameId the primary key for the new class name
104            * @return the new class name
105            */
106            public ClassName create(long classNameId);
107    
108            /**
109            * Removes the class name with the primary key from the database. Also notifies the appropriate model listeners.
110            *
111            * @param classNameId the primary key of the class name
112            * @return the class name that was removed
113            * @throws NoSuchClassNameException if a class name with the primary key could not be found
114            */
115            public ClassName remove(long classNameId)
116                    throws com.liferay.portal.exception.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 com.liferay.portal.exception.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    }