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