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#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.kernel.exception.SystemException {
93          return getPersistence().remove(classNameId);
94      }
95  
96      public static com.liferay.portal.model.ClassName updateImpl(
97          com.liferay.portal.model.ClassName className, boolean merge)
98          throws com.liferay.portal.kernel.exception.SystemException {
99          return getPersistence().updateImpl(className, merge);
100     }
101 
102     public static com.liferay.portal.model.ClassName findByPrimaryKey(
103         long classNameId)
104         throws com.liferay.portal.NoSuchClassNameException,
105             com.liferay.portal.kernel.exception.SystemException {
106         return getPersistence().findByPrimaryKey(classNameId);
107     }
108 
109     public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
110         long classNameId)
111         throws com.liferay.portal.kernel.exception.SystemException {
112         return getPersistence().fetchByPrimaryKey(classNameId);
113     }
114 
115     public static com.liferay.portal.model.ClassName findByValue(
116         java.lang.String value)
117         throws com.liferay.portal.NoSuchClassNameException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getPersistence().findByValue(value);
120     }
121 
122     public static com.liferay.portal.model.ClassName fetchByValue(
123         java.lang.String value)
124         throws com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().fetchByValue(value);
126     }
127 
128     public static com.liferay.portal.model.ClassName fetchByValue(
129         java.lang.String value, boolean retrieveFromCache)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByValue(value, retrieveFromCache);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.ClassName> findAll()
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findAll();
137     }
138 
139     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
140         int start, int end)
141         throws com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findAll(start, end);
143     }
144 
145     public static java.util.List<com.liferay.portal.model.ClassName> findAll(
146         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.kernel.exception.SystemException {
148         return getPersistence().findAll(start, end, obc);
149     }
150 
151     public static void removeByValue(java.lang.String value)
152         throws com.liferay.portal.NoSuchClassNameException,
153             com.liferay.portal.kernel.exception.SystemException {
154         getPersistence().removeByValue(value);
155     }
156 
157     public static void removeAll()
158         throws com.liferay.portal.kernel.exception.SystemException {
159         getPersistence().removeAll();
160     }
161 
162     public static int countByValue(java.lang.String value)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence().countByValue(value);
165     }
166 
167     public static int countAll()
168         throws com.liferay.portal.kernel.exception.SystemException {
169         return getPersistence().countAll();
170     }
171 
172     public static ClassNamePersistence getPersistence() {
173         if (_persistence == null) {
174             _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
175         }
176 
177         return _persistence;
178     }
179 
180     public void setPersistence(ClassNamePersistence persistence) {
181         _persistence = persistence;
182     }
183 
184     private static ClassNamePersistence _persistence;
185 }