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