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 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 ClassName remove(ClassName className)
65 throws SystemException {
66 return getPersistence().remove(className);
67 }
68
69
72 public static ClassName update(ClassName className, boolean merge)
73 throws SystemException {
74 return getPersistence().update(className, merge);
75 }
76
77 public static void cacheResult(com.liferay.portal.model.ClassName className) {
78 getPersistence().cacheResult(className);
79 }
80
81 public static void cacheResult(
82 java.util.List<com.liferay.portal.model.ClassName> classNames) {
83 getPersistence().cacheResult(classNames);
84 }
85
86 public static com.liferay.portal.model.ClassName create(long classNameId) {
87 return getPersistence().create(classNameId);
88 }
89
90 public static com.liferay.portal.model.ClassName remove(long classNameId)
91 throws com.liferay.portal.NoSuchClassNameException,
92 com.liferay.portal.kernel.exception.SystemException {
93 return getPersistence().remove(classNameId);
94 }
95
96 public static com.liferay.portal.model.ClassName updateImpl(
97 com.liferay.portal.model.ClassName className, boolean merge)
98 throws com.liferay.portal.kernel.exception.SystemException {
99 return getPersistence().updateImpl(className, merge);
100 }
101
102 public static com.liferay.portal.model.ClassName findByPrimaryKey(
103 long classNameId)
104 throws com.liferay.portal.NoSuchClassNameException,
105 com.liferay.portal.kernel.exception.SystemException {
106 return getPersistence().findByPrimaryKey(classNameId);
107 }
108
109 public static com.liferay.portal.model.ClassName fetchByPrimaryKey(
110 long classNameId)
111 throws com.liferay.portal.kernel.exception.SystemException {
112 return getPersistence().fetchByPrimaryKey(classNameId);
113 }
114
115 public static com.liferay.portal.model.ClassName findByValue(
116 java.lang.String value)
117 throws com.liferay.portal.NoSuchClassNameException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getPersistence().findByValue(value);
120 }
121
122 public static com.liferay.portal.model.ClassName fetchByValue(
123 java.lang.String value)
124 throws com.liferay.portal.kernel.exception.SystemException {
125 return getPersistence().fetchByValue(value);
126 }
127
128 public static com.liferay.portal.model.ClassName fetchByValue(
129 java.lang.String value, boolean retrieveFromCache)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence().fetchByValue(value, retrieveFromCache);
132 }
133
134 public static java.util.List<com.liferay.portal.model.ClassName> findAll()
135 throws com.liferay.portal.kernel.exception.SystemException {
136 return getPersistence().findAll();
137 }
138
139 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
140 int start, int end)
141 throws com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findAll(start, end);
143 }
144
145 public static java.util.List<com.liferay.portal.model.ClassName> findAll(
146 int start, int end,
147 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148 throws com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence().findAll(start, end, orderByComparator);
150 }
151
152 public static void removeByValue(java.lang.String value)
153 throws com.liferay.portal.NoSuchClassNameException,
154 com.liferay.portal.kernel.exception.SystemException {
155 getPersistence().removeByValue(value);
156 }
157
158 public static void removeAll()
159 throws com.liferay.portal.kernel.exception.SystemException {
160 getPersistence().removeAll();
161 }
162
163 public static int countByValue(java.lang.String value)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence().countByValue(value);
166 }
167
168 public static int countAll()
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getPersistence().countAll();
171 }
172
173 public static ClassNamePersistence getPersistence() {
174 if (_persistence == null) {
175 _persistence = (ClassNamePersistence)PortalBeanLocatorUtil.locate(ClassNamePersistence.class.getName());
176 }
177
178 return _persistence;
179 }
180
181 public void setPersistence(ClassNamePersistence persistence) {
182 _persistence = persistence;
183 }
184
185 private static ClassNamePersistence _persistence;
186 }