1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.ClassName;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ClassNameUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       ClassNamePersistence
34   * @see       ClassNamePersistenceImpl
35   * @generated
36   */
37  public class ClassNameUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ClassName)
47       */
48      public static void clearCache(ClassName className) {
49          getPersistence().clearCache(className);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<ClassName> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<ClassName> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static ClassName remove(ClassName className)
81          throws SystemException {
82          return getPersistence().remove(className);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static ClassName update(ClassName className, boolean merge)
89          throws SystemException {
90          return getPersistence().update(className, merge);
91      }
92  
93      public static void cacheResult(com.liferay.portal.model.ClassName className) {
94          getPersistence().cacheResult(className);
95      }
96  
97      public static void cacheResult(
98          java.util.List<com.liferay.portal.model.ClassName> classNames) {
99          getPersistence().cacheResult(classNames);
100     }
101 
102     public static com.liferay.portal.model.ClassName create(long classNameId) {
103         return getPersistence().create(classNameId);
104     }
105 
106     public static com.liferay.portal.model.ClassName remove(long classNameId)
107         throws com.liferay.portal.NoSuchClassNameException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().remove(classNameId);
110     }
111 
112     public static com.liferay.portal.model.ClassName updateImpl(
113         com.liferay.portal.model.ClassName className, boolean merge)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().updateImpl(className, merge);
116     }
117 
118     public static com.liferay.portal.model.ClassName findByPrimaryKey(
119         long classNameId)
120         throws com.liferay.portal.NoSuchClassNameException,
121             com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findByPrimaryKey(classNameId);
123     }
124 
125     public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
126         long classNameId)
127         throws com.liferay.portal.kernel.exception.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.kernel.exception.SystemException {
135         return getPersistence().findByValue(value);
136     }
137 
138     public static com.liferay.portal.model.ClassName fetchByValue(
139         java.lang.String value)
140         throws com.liferay.portal.kernel.exception.SystemException {
141         return getPersistence().fetchByValue(value);
142     }
143 
144     public static com.liferay.portal.model.ClassName fetchByValue(
145         java.lang.String value, boolean retrieveFromCache)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getPersistence().fetchByValue(value, retrieveFromCache);
148     }
149 
150     public static java.util.List<com.liferay.portal.model.ClassName> findAll()
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence().findAll();
153     }
154 
155     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
156         int start, int end)
157         throws com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findAll(start, end);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
162         int start, int end,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.kernel.exception.SystemException {
165         return getPersistence().findAll(start, end, orderByComparator);
166     }
167 
168     public static void removeByValue(java.lang.String value)
169         throws com.liferay.portal.NoSuchClassNameException,
170             com.liferay.portal.kernel.exception.SystemException {
171         getPersistence().removeByValue(value);
172     }
173 
174     public static void removeAll()
175         throws com.liferay.portal.kernel.exception.SystemException {
176         getPersistence().removeAll();
177     }
178 
179     public static int countByValue(java.lang.String value)
180         throws com.liferay.portal.kernel.exception.SystemException {
181         return getPersistence().countByValue(value);
182     }
183 
184     public static int countAll()
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().countAll();
187     }
188 
189     public static ClassNamePersistence getPersistence() {
190         if (_persistence == null) {
191             _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
192         }
193 
194         return _persistence;
195     }
196 
197     public void setPersistence(ClassNamePersistence persistence) {
198         _persistence = persistence;
199     }
200 
201     private static ClassNamePersistence _persistence;
202 }