001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.ClassName;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class ClassNameUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(ClassName className) {
044 getPersistence().clearCache(className);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<ClassName> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<ClassName> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<ClassName> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static ClassName remove(ClassName className)
087 throws SystemException {
088 return getPersistence().remove(className);
089 }
090
091
094 public static ClassName update(ClassName className, boolean merge)
095 throws SystemException {
096 return getPersistence().update(className, merge);
097 }
098
099
102 public static ClassName update(ClassName className, boolean merge,
103 ServiceContext serviceContext) throws SystemException {
104 return getPersistence().update(className, merge, serviceContext);
105 }
106
107 public static void cacheResult(com.liferay.portal.model.ClassName className) {
108 getPersistence().cacheResult(className);
109 }
110
111 public static void cacheResult(
112 java.util.List<com.liferay.portal.model.ClassName> classNames) {
113 getPersistence().cacheResult(classNames);
114 }
115
116 public static com.liferay.portal.model.ClassName create(long classNameId) {
117 return getPersistence().create(classNameId);
118 }
119
120 public static com.liferay.portal.model.ClassName remove(long classNameId)
121 throws com.liferay.portal.NoSuchClassNameException,
122 com.liferay.portal.kernel.exception.SystemException {
123 return getPersistence().remove(classNameId);
124 }
125
126 public static com.liferay.portal.model.ClassName updateImpl(
127 com.liferay.portal.model.ClassName className, boolean merge)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().updateImpl(className, merge);
130 }
131
132 public static com.liferay.portal.model.ClassName findByPrimaryKey(
133 long classNameId)
134 throws com.liferay.portal.NoSuchClassNameException,
135 com.liferay.portal.kernel.exception.SystemException {
136 return getPersistence().findByPrimaryKey(classNameId);
137 }
138
139 public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
140 long classNameId)
141 throws com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().fetchByPrimaryKey(classNameId);
143 }
144
145 public static com.liferay.portal.model.ClassName findByValue(
146 java.lang.String value)
147 throws com.liferay.portal.NoSuchClassNameException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence().findByValue(value);
150 }
151
152 public static com.liferay.portal.model.ClassName fetchByValue(
153 java.lang.String value)
154 throws com.liferay.portal.kernel.exception.SystemException {
155 return getPersistence().fetchByValue(value);
156 }
157
158 public static com.liferay.portal.model.ClassName fetchByValue(
159 java.lang.String value, boolean retrieveFromCache)
160 throws com.liferay.portal.kernel.exception.SystemException {
161 return getPersistence().fetchByValue(value, retrieveFromCache);
162 }
163
164 public static java.util.List<com.liferay.portal.model.ClassName> findAll()
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence().findAll();
167 }
168
169 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
170 int start, int end)
171 throws com.liferay.portal.kernel.exception.SystemException {
172 return getPersistence().findAll(start, end);
173 }
174
175 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
176 int start, int end,
177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178 throws com.liferay.portal.kernel.exception.SystemException {
179 return getPersistence().findAll(start, end, orderByComparator);
180 }
181
182 public static void removeByValue(java.lang.String value)
183 throws com.liferay.portal.NoSuchClassNameException,
184 com.liferay.portal.kernel.exception.SystemException {
185 getPersistence().removeByValue(value);
186 }
187
188 public static void removeAll()
189 throws com.liferay.portal.kernel.exception.SystemException {
190 getPersistence().removeAll();
191 }
192
193 public static int countByValue(java.lang.String value)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getPersistence().countByValue(value);
196 }
197
198 public static int countAll()
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence().countAll();
201 }
202
203 public static ClassNamePersistence getPersistence() {
204 if (_persistence == null) {
205 _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
206 }
207
208 return _persistence;
209 }
210
211 public void setPersistence(ClassNamePersistence persistence) {
212 _persistence = persistence;
213 }
214
215 private static ClassNamePersistence _persistence;
216 }