1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.SystemException {
92 return getPersistence().remove(contactId);
93 }
94
95
98 public static com.liferay.portal.model.Contact update(
99 com.liferay.portal.model.Contact contact)
100 throws com.liferay.portal.SystemException {
101 return getPersistence().update(contact);
102 }
103
104 public static com.liferay.portal.model.Contact updateImpl(
105 com.liferay.portal.model.Contact contact, boolean merge)
106 throws com.liferay.portal.SystemException {
107 return getPersistence().updateImpl(contact, merge);
108 }
109
110 public static com.liferay.portal.model.Contact findByPrimaryKey(
111 long contactId)
112 throws com.liferay.portal.NoSuchContactException,
113 com.liferay.portal.SystemException {
114 return getPersistence().findByPrimaryKey(contactId);
115 }
116
117 public static com.liferay.portal.model.Contact fetchByPrimaryKey(
118 long contactId) throws com.liferay.portal.SystemException {
119 return getPersistence().fetchByPrimaryKey(contactId);
120 }
121
122 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
123 long companyId) throws com.liferay.portal.SystemException {
124 return getPersistence().findByCompanyId(companyId);
125 }
126
127 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
128 long companyId, int start, int end)
129 throws com.liferay.portal.SystemException {
130 return getPersistence().findByCompanyId(companyId, start, end);
131 }
132
133 public static java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
134 long companyId, int start, int end,
135 com.liferay.portal.kernel.util.OrderByComparator obc)
136 throws com.liferay.portal.SystemException {
137 return getPersistence().findByCompanyId(companyId, start, end, obc);
138 }
139
140 public static com.liferay.portal.model.Contact findByCompanyId_First(
141 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.NoSuchContactException,
143 com.liferay.portal.SystemException {
144 return getPersistence().findByCompanyId_First(companyId, obc);
145 }
146
147 public static com.liferay.portal.model.Contact findByCompanyId_Last(
148 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.NoSuchContactException,
150 com.liferay.portal.SystemException {
151 return getPersistence().findByCompanyId_Last(companyId, obc);
152 }
153
154 public static com.liferay.portal.model.Contact[] findByCompanyId_PrevAndNext(
155 long contactId, long companyId,
156 com.liferay.portal.kernel.util.OrderByComparator obc)
157 throws com.liferay.portal.NoSuchContactException,
158 com.liferay.portal.SystemException {
159 return getPersistence()
160 .findByCompanyId_PrevAndNext(contactId, companyId, obc);
161 }
162
163 public static java.util.List<com.liferay.portal.model.Contact> findAll()
164 throws com.liferay.portal.SystemException {
165 return getPersistence().findAll();
166 }
167
168 public static java.util.List<com.liferay.portal.model.Contact> findAll(
169 int start, int end) throws com.liferay.portal.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, com.liferay.portal.kernel.util.OrderByComparator obc)
175 throws com.liferay.portal.SystemException {
176 return getPersistence().findAll(start, end, obc);
177 }
178
179 public static void removeByCompanyId(long companyId)
180 throws com.liferay.portal.SystemException {
181 getPersistence().removeByCompanyId(companyId);
182 }
183
184 public static void removeAll() throws com.liferay.portal.SystemException {
185 getPersistence().removeAll();
186 }
187
188 public static int countByCompanyId(long companyId)
189 throws com.liferay.portal.SystemException {
190 return getPersistence().countByCompanyId(companyId);
191 }
192
193 public static int countAll() throws com.liferay.portal.SystemException {
194 return getPersistence().countAll();
195 }
196
197 public static ContactPersistence getPersistence() {
198 if (_persistence == null) {
199 _persistence = (ContactPersistence)PortalBeanLocatorUtil.locate(ContactPersistence.class.getName());
200 }
201
202 return _persistence;
203 }
204
205 public void setPersistence(ContactPersistence persistence) {
206 _persistence = persistence;
207 }
208
209 private static ContactPersistence _persistence;
210 }