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