1
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.kernel.util.ReferenceRegistry;
21 import com.liferay.portal.model.ClassName;
22
23 import java.util.List;
24
25
38 public class ClassNameUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(ClassName className) {
50 getPersistence().clearCache(className);
51 }
52
53
56 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65 throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73 int start, int end) throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static ClassName remove(ClassName className)
81 throws SystemException {
82 return getPersistence().remove(className);
83 }
84
85
88 public static ClassName update(ClassName className, boolean merge)
89 throws SystemException {
90 return getPersistence().update(className, merge);
91 }
92
93 public static void cacheResult(com.liferay.portal.model.ClassName className) {
94 getPersistence().cacheResult(className);
95 }
96
97 public static void cacheResult(
98 java.util.List<com.liferay.portal.model.ClassName> classNames) {
99 getPersistence().cacheResult(classNames);
100 }
101
102 public static com.liferay.portal.model.ClassName create(long classNameId) {
103 return getPersistence().create(classNameId);
104 }
105
106 public static com.liferay.portal.model.ClassName remove(long classNameId)
107 throws com.liferay.portal.NoSuchClassNameException,
108 com.liferay.portal.SystemException {
109 return getPersistence().remove(classNameId);
110 }
111
112
115 public static com.liferay.portal.model.ClassName update(
116 com.liferay.portal.model.ClassName className)
117 throws com.liferay.portal.SystemException {
118 return getPersistence().update(className);
119 }
120
121 public static com.liferay.portal.model.ClassName updateImpl(
122 com.liferay.portal.model.ClassName className, boolean merge)
123 throws com.liferay.portal.SystemException {
124 return getPersistence().updateImpl(className, merge);
125 }
126
127 public static com.liferay.portal.model.ClassName findByPrimaryKey(
128 long classNameId)
129 throws com.liferay.portal.NoSuchClassNameException,
130 com.liferay.portal.SystemException {
131 return getPersistence().findByPrimaryKey(classNameId);
132 }
133
134 public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
135 long classNameId) throws com.liferay.portal.SystemException {
136 return getPersistence().fetchByPrimaryKey(classNameId);
137 }
138
139 public static com.liferay.portal.model.ClassName findByValue(
140 java.lang.String value)
141 throws com.liferay.portal.NoSuchClassNameException,
142 com.liferay.portal.SystemException {
143 return getPersistence().findByValue(value);
144 }
145
146 public static com.liferay.portal.model.ClassName fetchByValue(
147 java.lang.String value) throws com.liferay.portal.SystemException {
148 return getPersistence().fetchByValue(value);
149 }
150
151 public static com.liferay.portal.model.ClassName fetchByValue(
152 java.lang.String value, boolean retrieveFromCache)
153 throws com.liferay.portal.SystemException {
154 return getPersistence().fetchByValue(value, retrieveFromCache);
155 }
156
157 public static java.util.List<com.liferay.portal.model.ClassName> findAll()
158 throws com.liferay.portal.SystemException {
159 return getPersistence().findAll();
160 }
161
162 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
163 int start, int end) throws com.liferay.portal.SystemException {
164 return getPersistence().findAll(start, end);
165 }
166
167 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
168 int start, int end,
169 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170 throws com.liferay.portal.SystemException {
171 return getPersistence().findAll(start, end, orderByComparator);
172 }
173
174 public static void removeByValue(java.lang.String value)
175 throws com.liferay.portal.NoSuchClassNameException,
176 com.liferay.portal.SystemException {
177 getPersistence().removeByValue(value);
178 }
179
180 public static void removeAll() throws com.liferay.portal.SystemException {
181 getPersistence().removeAll();
182 }
183
184 public static int countByValue(java.lang.String value)
185 throws com.liferay.portal.SystemException {
186 return getPersistence().countByValue(value);
187 }
188
189 public static int countAll() throws com.liferay.portal.SystemException {
190 return getPersistence().countAll();
191 }
192
193 public static ClassNamePersistence getPersistence() {
194 if (_persistence == null) {
195 _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
196
197 ReferenceRegistry.registerReference(ClassNameUtil.class,
198 "_persistence");
199 }
200
201 return _persistence;
202 }
203
204 public void setPersistence(ClassNamePersistence persistence) {
205 _persistence = persistence;
206
207 ReferenceRegistry.registerReference(ClassNameUtil.class, "_persistence");
208 }
209
210 private static ClassNamePersistence _persistence;
211 }