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