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 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 com.liferay.portal.NoSuchClassNameException} if it could not be found.
043            *
044            * @param value the value
045            * @return the matching class name
046            * @throws com.liferay.portal.NoSuchClassNameException if a matching class name could not be found
047            */
048            public com.liferay.portal.model.ClassName findByValue(
049                    java.lang.String value)
050                    throws com.liferay.portal.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 com.liferay.portal.model.ClassName fetchByValue(
059                    java.lang.String value);
060    
061            /**
062            * Returns the class name where value = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
063            *
064            * @param value the value
065            * @param retrieveFromCache whether to use the finder cache
066            * @return the matching class name, or <code>null</code> if a matching class name could not be found
067            */
068            public com.liferay.portal.model.ClassName fetchByValue(
069                    java.lang.String value, boolean retrieveFromCache);
070    
071            /**
072            * Removes the class name where value = &#63; from the database.
073            *
074            * @param value the value
075            * @return the class name that was removed
076            */
077            public com.liferay.portal.model.ClassName removeByValue(
078                    java.lang.String value)
079                    throws com.liferay.portal.NoSuchClassNameException;
080    
081            /**
082            * Returns the number of class names where value = &#63;.
083            *
084            * @param value the value
085            * @return the number of matching class names
086            */
087            public int countByValue(java.lang.String value);
088    
089            /**
090            * Caches the class name in the entity cache if it is enabled.
091            *
092            * @param className the class name
093            */
094            public void cacheResult(com.liferay.portal.model.ClassName className);
095    
096            /**
097            * Caches the class names in the entity cache if it is enabled.
098            *
099            * @param classNames the class names
100            */
101            public void cacheResult(
102                    java.util.List<com.liferay.portal.model.ClassName> classNames);
103    
104            /**
105            * Creates a new class name with the primary key. Does not add the class name to the database.
106            *
107            * @param classNameId the primary key for the new class name
108            * @return the new class name
109            */
110            public com.liferay.portal.model.ClassName create(long classNameId);
111    
112            /**
113            * Removes the class name with the primary key from the database. Also notifies the appropriate model listeners.
114            *
115            * @param classNameId the primary key of the class name
116            * @return the class name that was removed
117            * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found
118            */
119            public com.liferay.portal.model.ClassName remove(long classNameId)
120                    throws com.liferay.portal.NoSuchClassNameException;
121    
122            public com.liferay.portal.model.ClassName updateImpl(
123                    com.liferay.portal.model.ClassName className);
124    
125            /**
126            * Returns the class name with the primary key or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found.
127            *
128            * @param classNameId the primary key of the class name
129            * @return the class name
130            * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found
131            */
132            public com.liferay.portal.model.ClassName findByPrimaryKey(long classNameId)
133                    throws com.liferay.portal.NoSuchClassNameException;
134    
135            /**
136            * Returns the class name with the primary key or returns <code>null</code> if it could not be found.
137            *
138            * @param classNameId the primary key of the class name
139            * @return the class name, or <code>null</code> if a class name with the primary key could not be found
140            */
141            public com.liferay.portal.model.ClassName fetchByPrimaryKey(
142                    long classNameId);
143    
144            @Override
145            public java.util.Map<java.io.Serializable, com.liferay.portal.model.ClassName> fetchByPrimaryKeys(
146                    java.util.Set<java.io.Serializable> primaryKeys);
147    
148            /**
149            * Returns all the class names.
150            *
151            * @return the class names
152            */
153            public java.util.List<com.liferay.portal.model.ClassName> findAll();
154    
155            /**
156            * Returns a range of all the class names.
157            *
158            * <p>
159            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
160            * </p>
161            *
162            * @param start the lower bound of the range of class names
163            * @param end the upper bound of the range of class names (not inclusive)
164            * @return the range of class names
165            */
166            public java.util.List<com.liferay.portal.model.ClassName> findAll(
167                    int start, int end);
168    
169            /**
170            * Returns an ordered range of all the class names.
171            *
172            * <p>
173            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
174            * </p>
175            *
176            * @param start the lower bound of the range of class names
177            * @param end the upper bound of the range of class names (not inclusive)
178            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
179            * @return the ordered range of class names
180            */
181            public java.util.List<com.liferay.portal.model.ClassName> findAll(
182                    int start, int end,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ClassName> orderByComparator);
184    
185            /**
186            * Removes all the class names from the database.
187            */
188            public void removeAll();
189    
190            /**
191            * Returns the number of class names.
192            *
193            * @return the number of class names
194            */
195            public int countAll();
196    }