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.ClassName;
21
22 import java.util.List;
23
24
37 public class ClassNameUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(ClassName className) {
49 getPersistence().clearCache(className);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<ClassName> findWithDynamicQuery(
64 DynamicQuery dynamicQuery) throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<ClassName> findWithDynamicQuery(
72 DynamicQuery dynamicQuery, int start, int end)
73 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.kernel.exception.SystemException {
109 return getPersistence().remove(classNameId);
110 }
111
112 public static com.liferay.portal.model.ClassName updateImpl(
113 com.liferay.portal.model.ClassName className, boolean merge)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getPersistence().updateImpl(className, merge);
116 }
117
118 public static com.liferay.portal.model.ClassName findByPrimaryKey(
119 long classNameId)
120 throws com.liferay.portal.NoSuchClassNameException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().findByPrimaryKey(classNameId);
123 }
124
125 public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
126 long classNameId)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().fetchByPrimaryKey(classNameId);
129 }
130
131 public static com.liferay.portal.model.ClassName findByValue(
132 java.lang.String value)
133 throws com.liferay.portal.NoSuchClassNameException,
134 com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByValue(value);
136 }
137
138 public static com.liferay.portal.model.ClassName fetchByValue(
139 java.lang.String value)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getPersistence().fetchByValue(value);
142 }
143
144 public static com.liferay.portal.model.ClassName fetchByValue(
145 java.lang.String value, boolean retrieveFromCache)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence().fetchByValue(value, retrieveFromCache);
148 }
149
150 public static java.util.List<com.liferay.portal.model.ClassName> findAll()
151 throws com.liferay.portal.kernel.exception.SystemException {
152 return getPersistence().findAll();
153 }
154
155 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
156 int start, int end)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getPersistence().findAll(start, end);
159 }
160
161 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
162 int start, int end,
163 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence().findAll(start, end, orderByComparator);
166 }
167
168 public static void removeByValue(java.lang.String value)
169 throws com.liferay.portal.NoSuchClassNameException,
170 com.liferay.portal.kernel.exception.SystemException {
171 getPersistence().removeByValue(value);
172 }
173
174 public static void removeAll()
175 throws com.liferay.portal.kernel.exception.SystemException {
176 getPersistence().removeAll();
177 }
178
179 public static int countByValue(java.lang.String value)
180 throws com.liferay.portal.kernel.exception.SystemException {
181 return getPersistence().countByValue(value);
182 }
183
184 public static int countAll()
185 throws com.liferay.portal.kernel.exception.SystemException {
186 return getPersistence().countAll();
187 }
188
189 public static ClassNamePersistence getPersistence() {
190 if (_persistence == null) {
191 _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
192 }
193
194 return _persistence;
195 }
196
197 public void setPersistence(ClassNamePersistence persistence) {
198 _persistence = persistence;
199 }
200
201 private static ClassNamePersistence _persistence;
202 }