1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.ClassName;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="ClassNameUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       ClassNamePersistence
42   * @see       ClassNamePersistenceImpl
43   * @generated
44   */
45  public class ClassNameUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static ClassName remove(ClassName className)
73          throws SystemException {
74          return getPersistence().remove(className);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
79       */
80      public static ClassName update(ClassName className, boolean merge)
81          throws SystemException {
82          return getPersistence().update(className, merge);
83      }
84  
85      public static void cacheResult(com.liferay.portal.model.ClassName className) {
86          getPersistence().cacheResult(className);
87      }
88  
89      public static void cacheResult(
90          java.util.List<com.liferay.portal.model.ClassName> classNames) {
91          getPersistence().cacheResult(classNames);
92      }
93  
94      public static com.liferay.portal.model.ClassName create(long classNameId) {
95          return getPersistence().create(classNameId);
96      }
97  
98      public static com.liferay.portal.model.ClassName remove(long classNameId)
99          throws com.liferay.portal.NoSuchClassNameException,
100             com.liferay.portal.SystemException {
101         return getPersistence().remove(classNameId);
102     }
103 
104     /**
105      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
106      */
107     public static com.liferay.portal.model.ClassName update(
108         com.liferay.portal.model.ClassName className)
109         throws com.liferay.portal.SystemException {
110         return getPersistence().update(className);
111     }
112 
113     public static com.liferay.portal.model.ClassName updateImpl(
114         com.liferay.portal.model.ClassName className, boolean merge)
115         throws com.liferay.portal.SystemException {
116         return getPersistence().updateImpl(className, merge);
117     }
118 
119     public static com.liferay.portal.model.ClassName findByPrimaryKey(
120         long classNameId)
121         throws com.liferay.portal.NoSuchClassNameException,
122             com.liferay.portal.SystemException {
123         return getPersistence().findByPrimaryKey(classNameId);
124     }
125 
126     public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
127         long classNameId) throws com.liferay.portal.SystemException {
128         return getPersistence().fetchByPrimaryKey(classNameId);
129     }
130 
131     public static com.liferay.portal.model.ClassName findByValue(
132         java.lang.String value)
133         throws com.liferay.portal.NoSuchClassNameException,
134             com.liferay.portal.SystemException {
135         return getPersistence().findByValue(value);
136     }
137 
138     public static com.liferay.portal.model.ClassName fetchByValue(
139         java.lang.String value) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByValue(value);
141     }
142 
143     public static com.liferay.portal.model.ClassName fetchByValue(
144         java.lang.String value, boolean retrieveFromCache)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().fetchByValue(value, retrieveFromCache);
147     }
148 
149     public static java.util.List<com.liferay.portal.model.ClassName> findAll()
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findAll();
152     }
153 
154     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
155         int start, int end) throws com.liferay.portal.SystemException {
156         return getPersistence().findAll(start, end);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
160         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findAll(start, end, obc);
163     }
164 
165     public static void removeByValue(java.lang.String value)
166         throws com.liferay.portal.NoSuchClassNameException,
167             com.liferay.portal.SystemException {
168         getPersistence().removeByValue(value);
169     }
170 
171     public static void removeAll() throws com.liferay.portal.SystemException {
172         getPersistence().removeAll();
173     }
174 
175     public static int countByValue(java.lang.String value)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().countByValue(value);
178     }
179 
180     public static int countAll() throws com.liferay.portal.SystemException {
181         return getPersistence().countAll();
182     }
183 
184     public static ClassNamePersistence getPersistence() {
185         if (_persistence == null) {
186             _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
187         }
188 
189         return _persistence;
190     }
191 
192     public void setPersistence(ClassNamePersistence persistence) {
193         _persistence = persistence;
194     }
195 
196     private static ClassNamePersistence _persistence;
197 }