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 obc)
129 throws com.liferay.portal.kernel.exception.SystemException {
130 return getPersistence().findByCompanyId(companyId, start, end, obc);
131 }
132
133 public static com.liferay.portal.model.Contact findByCompanyId_First(
134 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
135 throws com.liferay.portal.NoSuchContactException,
136 com.liferay.portal.kernel.exception.SystemException {
137 return getPersistence().findByCompanyId_First(companyId, obc);
138 }
139
140 public static com.liferay.portal.model.Contact findByCompanyId_Last(
141 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.NoSuchContactException,
143 com.liferay.portal.kernel.exception.SystemException {
144 return getPersistence().findByCompanyId_Last(companyId, obc);
145 }
146
147 public static com.liferay.portal.model.Contact[] findByCompanyId_PrevAndNext(
148 long contactId, long companyId,
149 com.liferay.portal.kernel.util.OrderByComparator obc)
150 throws com.liferay.portal.NoSuchContactException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getPersistence()
153 .findByCompanyId_PrevAndNext(contactId, companyId, obc);
154 }
155
156 public static java.util.List<com.liferay.portal.model.Contact> findAll()
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getPersistence().findAll();
159 }
160
161 public static java.util.List<com.liferay.portal.model.Contact> findAll(
162 int start, int end)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence().findAll(start, end);
165 }
166
167 public static java.util.List<com.liferay.portal.model.Contact> findAll(
168 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getPersistence().findAll(start, end, obc);
171 }
172
173 public static void removeByCompanyId(long companyId)
174 throws com.liferay.portal.kernel.exception.SystemException {
175 getPersistence().removeByCompanyId(companyId);
176 }
177
178 public static void removeAll()
179 throws com.liferay.portal.kernel.exception.SystemException {
180 getPersistence().removeAll();
181 }
182
183 public static int countByCompanyId(long companyId)
184 throws com.liferay.portal.kernel.exception.SystemException {
185 return getPersistence().countByCompanyId(companyId);
186 }
187
188 public static int countAll()
189 throws com.liferay.portal.kernel.exception.SystemException {
190 return getPersistence().countAll();
191 }
192
193 public static ContactPersistence getPersistence() {
194 if (_persistence == null) {
195 _persistence = (ContactPersistence)PortalBeanLocatorUtil.locate(ContactPersistence.class.getName());
196 }
197
198 return _persistence;
199 }
200
201 public void setPersistence(ContactPersistence persistence) {
202 _persistence = persistence;
203 }
204
205 private static ContactPersistence _persistence;
206 }