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.Shard;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ShardUtil.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       ShardPersistence
34   * @see       ShardPersistenceImpl
35   * @generated
36   */
37  public class ShardUtil {
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 Shard remove(Shard shard) throws SystemException {
65          return getPersistence().remove(shard);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Shard update(Shard shard, boolean merge)
72          throws SystemException {
73          return getPersistence().update(shard, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Shard shard) {
77          getPersistence().cacheResult(shard);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Shard> shards) {
82          getPersistence().cacheResult(shards);
83      }
84  
85      public static com.liferay.portal.model.Shard create(long shardId) {
86          return getPersistence().create(shardId);
87      }
88  
89      public static com.liferay.portal.model.Shard remove(long shardId)
90          throws com.liferay.portal.NoSuchShardException,
91              com.liferay.portal.SystemException {
92          return getPersistence().remove(shardId);
93      }
94  
95      /**
96       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
97       */
98      public static com.liferay.portal.model.Shard update(
99          com.liferay.portal.model.Shard shard)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().update(shard);
102     }
103 
104     public static com.liferay.portal.model.Shard updateImpl(
105         com.liferay.portal.model.Shard shard, boolean merge)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().updateImpl(shard, merge);
108     }
109 
110     public static com.liferay.portal.model.Shard findByPrimaryKey(long shardId)
111         throws com.liferay.portal.NoSuchShardException,
112             com.liferay.portal.SystemException {
113         return getPersistence().findByPrimaryKey(shardId);
114     }
115 
116     public static com.liferay.portal.model.Shard fetchByPrimaryKey(long shardId)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().fetchByPrimaryKey(shardId);
119     }
120 
121     public static com.liferay.portal.model.Shard findByName(
122         java.lang.String name)
123         throws com.liferay.portal.NoSuchShardException,
124             com.liferay.portal.SystemException {
125         return getPersistence().findByName(name);
126     }
127 
128     public static com.liferay.portal.model.Shard fetchByName(
129         java.lang.String name) throws com.liferay.portal.SystemException {
130         return getPersistence().fetchByName(name);
131     }
132 
133     public static com.liferay.portal.model.Shard fetchByName(
134         java.lang.String name, boolean retrieveFromCache)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().fetchByName(name, retrieveFromCache);
137     }
138 
139     public static com.liferay.portal.model.Shard findByC_C(long classNameId,
140         long classPK)
141         throws com.liferay.portal.NoSuchShardException,
142             com.liferay.portal.SystemException {
143         return getPersistence().findByC_C(classNameId, classPK);
144     }
145 
146     public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
147         long classPK) throws com.liferay.portal.SystemException {
148         return getPersistence().fetchByC_C(classNameId, classPK);
149     }
150 
151     public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
152         long classPK, boolean retrieveFromCache)
153         throws com.liferay.portal.SystemException {
154         return getPersistence()
155                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.Shard> findAll()
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findAll();
161     }
162 
163     public static java.util.List<com.liferay.portal.model.Shard> findAll(
164         int start, int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findAll(start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.Shard> findAll(
169         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findAll(start, end, obc);
172     }
173 
174     public static void removeByName(java.lang.String name)
175         throws com.liferay.portal.NoSuchShardException,
176             com.liferay.portal.SystemException {
177         getPersistence().removeByName(name);
178     }
179 
180     public static void removeByC_C(long classNameId, long classPK)
181         throws com.liferay.portal.NoSuchShardException,
182             com.liferay.portal.SystemException {
183         getPersistence().removeByC_C(classNameId, classPK);
184     }
185 
186     public static void removeAll() throws com.liferay.portal.SystemException {
187         getPersistence().removeAll();
188     }
189 
190     public static int countByName(java.lang.String name)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().countByName(name);
193     }
194 
195     public static int countByC_C(long classNameId, long classPK)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().countByC_C(classNameId, classPK);
198     }
199 
200     public static int countAll() throws com.liferay.portal.SystemException {
201         return getPersistence().countAll();
202     }
203 
204     public static ShardPersistence getPersistence() {
205         if (_persistence == null) {
206             _persistence = (ShardPersistence)PortalBeanLocatorUtil.locate(ShardPersistence.class.getName());
207         }
208 
209         return _persistence;
210     }
211 
212     public void setPersistence(ShardPersistence persistence) {
213         _persistence = persistence;
214     }
215 
216     private static ShardPersistence _persistence;
217 }