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,
170         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171         throws com.liferay.portal.SystemException {
172         return getPersistence().findAll(start, end, orderByComparator);
173     }
174 
175     public static void removeByName(java.lang.String name)
176         throws com.liferay.portal.NoSuchShardException,
177             com.liferay.portal.SystemException {
178         getPersistence().removeByName(name);
179     }
180 
181     public static void removeByC_C(long classNameId, long classPK)
182         throws com.liferay.portal.NoSuchShardException,
183             com.liferay.portal.SystemException {
184         getPersistence().removeByC_C(classNameId, classPK);
185     }
186 
187     public static void removeAll() throws com.liferay.portal.SystemException {
188         getPersistence().removeAll();
189     }
190 
191     public static int countByName(java.lang.String name)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().countByName(name);
194     }
195 
196     public static int countByC_C(long classNameId, long classPK)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().countByC_C(classNameId, classPK);
199     }
200 
201     public static int countAll() throws com.liferay.portal.SystemException {
202         return getPersistence().countAll();
203     }
204 
205     public static ShardPersistence getPersistence() {
206         if (_persistence == null) {
207             _persistence = (ShardPersistence)PortalBeanLocatorUtil.locate(ShardPersistence.class.getName());
208         }
209 
210         return _persistence;
211     }
212 
213     public void setPersistence(ShardPersistence persistence) {
214         _persistence = persistence;
215     }
216 
217     private static ShardPersistence _persistence;
218 }