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