1
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.Shard;
21
22 import java.util.List;
23
24
37 public class ShardUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(Shard shard) {
49 getPersistence().clearCache(shard);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<Shard> findWithDynamicQuery(DynamicQuery dynamicQuery)
64 throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<Shard> findWithDynamicQuery(DynamicQuery dynamicQuery,
72 int start, int end) throws SystemException {
73 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
74 }
75
76
79 public static Shard remove(Shard shard) throws SystemException {
80 return getPersistence().remove(shard);
81 }
82
83
86 public static Shard update(Shard shard, boolean merge)
87 throws SystemException {
88 return getPersistence().update(shard, merge);
89 }
90
91 public static void cacheResult(com.liferay.portal.model.Shard shard) {
92 getPersistence().cacheResult(shard);
93 }
94
95 public static void cacheResult(
96 java.util.List<com.liferay.portal.model.Shard> shards) {
97 getPersistence().cacheResult(shards);
98 }
99
100 public static com.liferay.portal.model.Shard create(long shardId) {
101 return getPersistence().create(shardId);
102 }
103
104 public static com.liferay.portal.model.Shard remove(long shardId)
105 throws com.liferay.portal.NoSuchShardException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getPersistence().remove(shardId);
108 }
109
110 public static com.liferay.portal.model.Shard updateImpl(
111 com.liferay.portal.model.Shard shard, boolean merge)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getPersistence().updateImpl(shard, merge);
114 }
115
116 public static com.liferay.portal.model.Shard findByPrimaryKey(long shardId)
117 throws com.liferay.portal.NoSuchShardException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getPersistence().findByPrimaryKey(shardId);
120 }
121
122 public static com.liferay.portal.model.Shard fetchByPrimaryKey(long shardId)
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getPersistence().fetchByPrimaryKey(shardId);
125 }
126
127 public static com.liferay.portal.model.Shard findByName(
128 java.lang.String name)
129 throws com.liferay.portal.NoSuchShardException,
130 com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence().findByName(name);
132 }
133
134 public static com.liferay.portal.model.Shard fetchByName(
135 java.lang.String name)
136 throws com.liferay.portal.kernel.exception.SystemException {
137 return getPersistence().fetchByName(name);
138 }
139
140 public static com.liferay.portal.model.Shard fetchByName(
141 java.lang.String name, boolean retrieveFromCache)
142 throws com.liferay.portal.kernel.exception.SystemException {
143 return getPersistence().fetchByName(name, retrieveFromCache);
144 }
145
146 public static com.liferay.portal.model.Shard findByC_C(long classNameId,
147 long classPK)
148 throws com.liferay.portal.NoSuchShardException,
149 com.liferay.portal.kernel.exception.SystemException {
150 return getPersistence().findByC_C(classNameId, classPK);
151 }
152
153 public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
154 long classPK)
155 throws com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence().fetchByC_C(classNameId, classPK);
157 }
158
159 public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
160 long classPK, boolean retrieveFromCache)
161 throws com.liferay.portal.kernel.exception.SystemException {
162 return getPersistence()
163 .fetchByC_C(classNameId, classPK, retrieveFromCache);
164 }
165
166 public static java.util.List<com.liferay.portal.model.Shard> findAll()
167 throws com.liferay.portal.kernel.exception.SystemException {
168 return getPersistence().findAll();
169 }
170
171 public static java.util.List<com.liferay.portal.model.Shard> findAll(
172 int start, int end)
173 throws com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence().findAll(start, end);
175 }
176
177 public static java.util.List<com.liferay.portal.model.Shard> findAll(
178 int start, int end,
179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180 throws com.liferay.portal.kernel.exception.SystemException {
181 return getPersistence().findAll(start, end, orderByComparator);
182 }
183
184 public static void removeByName(java.lang.String name)
185 throws com.liferay.portal.NoSuchShardException,
186 com.liferay.portal.kernel.exception.SystemException {
187 getPersistence().removeByName(name);
188 }
189
190 public static void removeByC_C(long classNameId, long classPK)
191 throws com.liferay.portal.NoSuchShardException,
192 com.liferay.portal.kernel.exception.SystemException {
193 getPersistence().removeByC_C(classNameId, classPK);
194 }
195
196 public static void removeAll()
197 throws com.liferay.portal.kernel.exception.SystemException {
198 getPersistence().removeAll();
199 }
200
201 public static int countByName(java.lang.String name)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence().countByName(name);
204 }
205
206 public static int countByC_C(long classNameId, long classPK)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getPersistence().countByC_C(classNameId, classPK);
209 }
210
211 public static int countAll()
212 throws com.liferay.portal.kernel.exception.SystemException {
213 return getPersistence().countAll();
214 }
215
216 public static ShardPersistence getPersistence() {
217 if (_persistence == null) {
218 _persistence = (ShardPersistence)PortalBeanLocatorUtil.locate(ShardPersistence.class.getName());
219 }
220
221 return _persistence;
222 }
223
224 public void setPersistence(ShardPersistence persistence) {
225 _persistence = persistence;
226 }
227
228 private static ShardPersistence _persistence;
229 }