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 List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
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
64 public static Shard remove(Shard shard) throws SystemException {
65 return getPersistence().remove(shard);
66 }
67
68
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.kernel.exception.SystemException {
92 return getPersistence().remove(shardId);
93 }
94
95 public static com.liferay.portal.model.Shard updateImpl(
96 com.liferay.portal.model.Shard shard, boolean merge)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getPersistence().updateImpl(shard, merge);
99 }
100
101 public static com.liferay.portal.model.Shard findByPrimaryKey(long shardId)
102 throws com.liferay.portal.NoSuchShardException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().findByPrimaryKey(shardId);
105 }
106
107 public static com.liferay.portal.model.Shard fetchByPrimaryKey(long shardId)
108 throws com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().fetchByPrimaryKey(shardId);
110 }
111
112 public static com.liferay.portal.model.Shard findByName(
113 java.lang.String name)
114 throws com.liferay.portal.NoSuchShardException,
115 com.liferay.portal.kernel.exception.SystemException {
116 return getPersistence().findByName(name);
117 }
118
119 public static com.liferay.portal.model.Shard fetchByName(
120 java.lang.String name)
121 throws com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().fetchByName(name);
123 }
124
125 public static com.liferay.portal.model.Shard fetchByName(
126 java.lang.String name, boolean retrieveFromCache)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().fetchByName(name, retrieveFromCache);
129 }
130
131 public static com.liferay.portal.model.Shard findByC_C(long classNameId,
132 long classPK)
133 throws com.liferay.portal.NoSuchShardException,
134 com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByC_C(classNameId, classPK);
136 }
137
138 public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
139 long classPK)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getPersistence().fetchByC_C(classNameId, classPK);
142 }
143
144 public static com.liferay.portal.model.Shard fetchByC_C(long classNameId,
145 long classPK, boolean retrieveFromCache)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence()
148 .fetchByC_C(classNameId, classPK, retrieveFromCache);
149 }
150
151 public static java.util.List<com.liferay.portal.model.Shard> findAll()
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findAll();
154 }
155
156 public static java.util.List<com.liferay.portal.model.Shard> findAll(
157 int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findAll(start, end);
160 }
161
162 public static java.util.List<com.liferay.portal.model.Shard> findAll(
163 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence().findAll(start, end, obc);
166 }
167
168 public static void removeByName(java.lang.String name)
169 throws com.liferay.portal.NoSuchShardException,
170 com.liferay.portal.kernel.exception.SystemException {
171 getPersistence().removeByName(name);
172 }
173
174 public static void removeByC_C(long classNameId, long classPK)
175 throws com.liferay.portal.NoSuchShardException,
176 com.liferay.portal.kernel.exception.SystemException {
177 getPersistence().removeByC_C(classNameId, classPK);
178 }
179
180 public static void removeAll()
181 throws com.liferay.portal.kernel.exception.SystemException {
182 getPersistence().removeAll();
183 }
184
185 public static int countByName(java.lang.String name)
186 throws com.liferay.portal.kernel.exception.SystemException {
187 return getPersistence().countByName(name);
188 }
189
190 public static int countByC_C(long classNameId, long classPK)
191 throws com.liferay.portal.kernel.exception.SystemException {
192 return getPersistence().countByC_C(classNameId, classPK);
193 }
194
195 public static int countAll()
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getPersistence().countAll();
198 }
199
200 public static ShardPersistence getPersistence() {
201 if (_persistence == null) {
202 _persistence = (ShardPersistence)PortalBeanLocatorUtil.locate(ShardPersistence.class.getName());
203 }
204
205 return _persistence;
206 }
207
208 public void setPersistence(ShardPersistence persistence) {
209 _persistence = persistence;
210 }
211
212 private static ShardPersistence _persistence;
213 }