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.Contact;
21
22 import java.util.List;
23
24
37 public class ContactUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(Contact contact) {
49 getPersistence().clearCache(contact);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<Contact> findWithDynamicQuery(DynamicQuery dynamicQuery)
64 throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<Contact> findWithDynamicQuery(
72 DynamicQuery dynamicQuery, int start, int end)
73 throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static Contact remove(Contact contact) throws SystemException {
81 return getPersistence().remove(contact);
82 }
83
84
87 public static Contact update(Contact contact, boolean merge)
88 throws SystemException {
89 return getPersistence().update(contact, merge);
90 }
91
92 public static void cacheResult(com.liferay.portal.model.Contact contact) {
93 getPersistence().cacheResult(contact);
94 }
95
96 public static void cacheResult(
97 java.util.List<com.liferay.portal.model.Contact> contacts) {
98 getPersistence().cacheResult(contacts);
99 }
100
101 public static com.liferay.portal.model.Contact create(long contactId) {
102 return getPersistence().create(contactId);
103 }
104
105 public static com.liferay.portal.model.Contact remove(long contactId)
106 throws com.liferay.portal.NoSuchContactException,
107 com.liferay.portal.kernel.exception.SystemException {
108 return getPersistence().remove(contactId);
109 }
110
111 public static com.liferay.portal.model.Contact updateImpl(
112 com.liferay.portal.model.Contact contact, boolean merge)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getPersistence().updateImpl(contact, merge);
115 }
116
117 public static com.liferay.portal.model.Contact findByPrimaryKey(
118 long contactId)
119 throws com.liferay.portal.NoSuchContactException,
120 com.liferay.portal.kernel.exception.SystemException {
121 return getPersistence().findByPrimaryKey(contactId);
122 }
123
124 public static com.liferay.portal.model.Contact fetchByPrimaryKey(
125 long contactId)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getPersistence().fetchByPrimaryKey(contactId);
128 }
129
130 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
131 long companyId)
132 throws com.liferay.portal.kernel.exception.SystemException {
133 return getPersistence().findByCompanyId(companyId);
134 }
135
136 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
137 long companyId, int start, int end)
138 throws com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence().findByCompanyId(companyId, start, end);
140 }
141
142 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
143 long companyId, int start, int end,
144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145 throws com.liferay.portal.kernel.exception.SystemException {
146 return getPersistence()
147 .findByCompanyId(companyId, start, end, orderByComparator);
148 }
149
150 public static com.liferay.portal.model.Contact findByCompanyId_First(
151 long companyId,
152 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153 throws com.liferay.portal.NoSuchContactException,
154 com.liferay.portal.kernel.exception.SystemException {
155 return getPersistence()
156 .findByCompanyId_First(companyId, orderByComparator);
157 }
158
159 public static com.liferay.portal.model.Contact findByCompanyId_Last(
160 long companyId,
161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162 throws com.liferay.portal.NoSuchContactException,
163 com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence()
165 .findByCompanyId_Last(companyId, orderByComparator);
166 }
167
168 public static com.liferay.portal.model.Contact[] findByCompanyId_PrevAndNext(
169 long contactId, long companyId,
170 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171 throws com.liferay.portal.NoSuchContactException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getPersistence()
174 .findByCompanyId_PrevAndNext(contactId, companyId,
175 orderByComparator);
176 }
177
178 public static java.util.List<com.liferay.portal.model.Contact> findAll()
179 throws com.liferay.portal.kernel.exception.SystemException {
180 return getPersistence().findAll();
181 }
182
183 public static java.util.List<com.liferay.portal.model.Contact> findAll(
184 int start, int end)
185 throws com.liferay.portal.kernel.exception.SystemException {
186 return getPersistence().findAll(start, end);
187 }
188
189 public static java.util.List<com.liferay.portal.model.Contact> findAll(
190 int start, int end,
191 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192 throws com.liferay.portal.kernel.exception.SystemException {
193 return getPersistence().findAll(start, end, orderByComparator);
194 }
195
196 public static void removeByCompanyId(long companyId)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 getPersistence().removeByCompanyId(companyId);
199 }
200
201 public static void removeAll()
202 throws com.liferay.portal.kernel.exception.SystemException {
203 getPersistence().removeAll();
204 }
205
206 public static int countByCompanyId(long companyId)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getPersistence().countByCompanyId(companyId);
209 }
210
211 public static int countAll()
212 throws com.liferay.portal.kernel.exception.SystemException {
213 return getPersistence().countAll();
214 }
215
216 public static ContactPersistence getPersistence() {
217 if (_persistence == null) {
218 _persistence = (ContactPersistence)PortalBeanLocatorUtil.locate(ContactPersistence.class.getName());
219 }
220
221 return _persistence;
222 }
223
224 public void setPersistence(ContactPersistence persistence) {
225 _persistence = persistence;
226 }
227
228 private static ContactPersistence _persistence;
229 }