1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static ClassName remove(ClassName className)
65          throws SystemException {
66          return getPersistence().remove(className);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static ClassName update(ClassName className, boolean merge)
73          throws SystemException {
74          return getPersistence().update(className, merge);
75      }
76  
77      public static void cacheResult(com.liferay.portal.model.ClassName className) {
78          getPersistence().cacheResult(className);
79      }
80  
81      public static void cacheResult(
82          java.util.List<com.liferay.portal.model.ClassName> classNames) {
83          getPersistence().cacheResult(classNames);
84      }
85  
86      public static com.liferay.portal.model.ClassName create(long classNameId) {
87          return getPersistence().create(classNameId);
88      }
89  
90      public static com.liferay.portal.model.ClassName remove(long classNameId)
91          throws com.liferay.portal.NoSuchClassNameException,
92              com.liferay.portal.SystemException {
93          return getPersistence().remove(classNameId);
94      }
95  
96      /**
97       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
98       */
99      public static com.liferay.portal.model.ClassName update(
100         com.liferay.portal.model.ClassName className)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().update(className);
103     }
104 
105     public static com.liferay.portal.model.ClassName updateImpl(
106         com.liferay.portal.model.ClassName className, boolean merge)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().updateImpl(className, merge);
109     }
110 
111     public static com.liferay.portal.model.ClassName findByPrimaryKey(
112         long classNameId)
113         throws com.liferay.portal.NoSuchClassNameException,
114             com.liferay.portal.SystemException {
115         return getPersistence().findByPrimaryKey(classNameId);
116     }
117 
118     public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
119         long classNameId) throws com.liferay.portal.SystemException {
120         return getPersistence().fetchByPrimaryKey(classNameId);
121     }
122 
123     public static com.liferay.portal.model.ClassName findByValue(
124         java.lang.String value)
125         throws com.liferay.portal.NoSuchClassNameException,
126             com.liferay.portal.SystemException {
127         return getPersistence().findByValue(value);
128     }
129 
130     public static com.liferay.portal.model.ClassName fetchByValue(
131         java.lang.String value) throws com.liferay.portal.SystemException {
132         return getPersistence().fetchByValue(value);
133     }
134 
135     public static com.liferay.portal.model.ClassName fetchByValue(
136         java.lang.String value, boolean retrieveFromCache)
137         throws com.liferay.portal.SystemException {
138         return getPersistence().fetchByValue(value, retrieveFromCache);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.ClassName> findAll()
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findAll();
144     }
145 
146     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
147         int start, int end) throws com.liferay.portal.SystemException {
148         return getPersistence().findAll(start, end);
149     }
150 
151     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
152         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException {
154         return getPersistence().findAll(start, end, obc);
155     }
156 
157     public static void removeByValue(java.lang.String value)
158         throws com.liferay.portal.NoSuchClassNameException,
159             com.liferay.portal.SystemException {
160         getPersistence().removeByValue(value);
161     }
162 
163     public static void removeAll() throws com.liferay.portal.SystemException {
164         getPersistence().removeAll();
165     }
166 
167     public static int countByValue(java.lang.String value)
168         throws com.liferay.portal.SystemException {
169         return getPersistence().countByValue(value);
170     }
171 
172     public static int countAll() throws com.liferay.portal.SystemException {
173         return getPersistence().countAll();
174     }
175 
176     public static ClassNamePersistence getPersistence() {
177         if (_persistence == null) {
178             _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
179         }
180 
181         return _persistence;
182     }
183 
184     public void setPersistence(ClassNamePersistence persistence) {
185         _persistence = persistence;
186     }
187 
188     private static ClassNamePersistence _persistence;
189 }