001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.imagegallery.service.base;
022:
023: import com.liferay.counter.service.CounterLocalService;
024: import com.liferay.counter.service.CounterLocalServiceFactory;
025: import com.liferay.counter.service.CounterService;
026: import com.liferay.counter.service.CounterServiceFactory;
027:
028: import com.liferay.portal.SystemException;
029: import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
030: import com.liferay.portal.service.ResourceLocalService;
031: import com.liferay.portal.service.ResourceLocalServiceFactory;
032: import com.liferay.portal.service.ResourceService;
033: import com.liferay.portal.service.ResourceServiceFactory;
034: import com.liferay.portal.service.UserLocalService;
035: import com.liferay.portal.service.UserLocalServiceFactory;
036: import com.liferay.portal.service.UserService;
037: import com.liferay.portal.service.UserServiceFactory;
038: import com.liferay.portal.service.persistence.ResourceFinder;
039: import com.liferay.portal.service.persistence.ResourceFinderUtil;
040: import com.liferay.portal.service.persistence.ResourcePersistence;
041: import com.liferay.portal.service.persistence.ResourceUtil;
042: import com.liferay.portal.service.persistence.UserFinder;
043: import com.liferay.portal.service.persistence.UserFinderUtil;
044: import com.liferay.portal.service.persistence.UserPersistence;
045: import com.liferay.portal.service.persistence.UserUtil;
046:
047: import com.liferay.portlet.imagegallery.model.IGImage;
048: import com.liferay.portlet.imagegallery.model.impl.IGImageImpl;
049: import com.liferay.portlet.imagegallery.service.IGFolderLocalService;
050: import com.liferay.portlet.imagegallery.service.IGFolderLocalServiceFactory;
051: import com.liferay.portlet.imagegallery.service.IGFolderService;
052: import com.liferay.portlet.imagegallery.service.IGFolderServiceFactory;
053: import com.liferay.portlet.imagegallery.service.IGImageLocalService;
054: import com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence;
055: import com.liferay.portlet.imagegallery.service.persistence.IGFolderUtil;
056: import com.liferay.portlet.imagegallery.service.persistence.IGImageFinder;
057: import com.liferay.portlet.imagegallery.service.persistence.IGImageFinderUtil;
058: import com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence;
059: import com.liferay.portlet.imagegallery.service.persistence.IGImageUtil;
060: import com.liferay.portlet.tags.service.TagsAssetLocalService;
061: import com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory;
062: import com.liferay.portlet.tags.service.TagsAssetService;
063: import com.liferay.portlet.tags.service.TagsAssetServiceFactory;
064: import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
065: import com.liferay.portlet.tags.service.persistence.TagsAssetFinderUtil;
066: import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
067: import com.liferay.portlet.tags.service.persistence.TagsAssetUtil;
068:
069: import org.springframework.beans.factory.InitializingBean;
070:
071: import java.util.List;
072:
073: /**
074: * <a href="IGImageLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
075: *
076: * @author Brian Wing Shun Chan
077: *
078: */
079: public abstract class IGImageLocalServiceBaseImpl implements
080: IGImageLocalService, InitializingBean {
081: public IGImage addIGImage(IGImage model) throws SystemException {
082: IGImage igImage = new IGImageImpl();
083:
084: igImage.setNew(true);
085:
086: igImage.setUuid(model.getUuid());
087: igImage.setImageId(model.getImageId());
088: igImage.setCompanyId(model.getCompanyId());
089: igImage.setUserId(model.getUserId());
090: igImage.setCreateDate(model.getCreateDate());
091: igImage.setModifiedDate(model.getModifiedDate());
092: igImage.setFolderId(model.getFolderId());
093: igImage.setDescription(model.getDescription());
094: igImage.setSmallImageId(model.getSmallImageId());
095: igImage.setLargeImageId(model.getLargeImageId());
096:
097: return igImagePersistence.update(igImage);
098: }
099:
100: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
101: throws SystemException {
102: return igImagePersistence
103: .findWithDynamicQuery(queryInitializer);
104: }
105:
106: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
107: int begin, int end) throws SystemException {
108: return igImagePersistence.findWithDynamicQuery(
109: queryInitializer, begin, end);
110: }
111:
112: public IGImage updateIGImage(IGImage model) throws SystemException {
113: return igImagePersistence.update(model, true);
114: }
115:
116: public IGFolderLocalService getIGFolderLocalService() {
117: return igFolderLocalService;
118: }
119:
120: public void setIGFolderLocalService(
121: IGFolderLocalService igFolderLocalService) {
122: this .igFolderLocalService = igFolderLocalService;
123: }
124:
125: public IGFolderService getIGFolderService() {
126: return igFolderService;
127: }
128:
129: public void setIGFolderService(IGFolderService igFolderService) {
130: this .igFolderService = igFolderService;
131: }
132:
133: public IGFolderPersistence getIGFolderPersistence() {
134: return igFolderPersistence;
135: }
136:
137: public void setIGFolderPersistence(
138: IGFolderPersistence igFolderPersistence) {
139: this .igFolderPersistence = igFolderPersistence;
140: }
141:
142: public IGImagePersistence getIGImagePersistence() {
143: return igImagePersistence;
144: }
145:
146: public void setIGImagePersistence(
147: IGImagePersistence igImagePersistence) {
148: this .igImagePersistence = igImagePersistence;
149: }
150:
151: public IGImageFinder getIGImageFinder() {
152: return igImageFinder;
153: }
154:
155: public void setIGImageFinder(IGImageFinder igImageFinder) {
156: this .igImageFinder = igImageFinder;
157: }
158:
159: public CounterLocalService getCounterLocalService() {
160: return counterLocalService;
161: }
162:
163: public void setCounterLocalService(
164: CounterLocalService counterLocalService) {
165: this .counterLocalService = counterLocalService;
166: }
167:
168: public CounterService getCounterService() {
169: return counterService;
170: }
171:
172: public void setCounterService(CounterService counterService) {
173: this .counterService = counterService;
174: }
175:
176: public ResourceLocalService getResourceLocalService() {
177: return resourceLocalService;
178: }
179:
180: public void setResourceLocalService(
181: ResourceLocalService resourceLocalService) {
182: this .resourceLocalService = resourceLocalService;
183: }
184:
185: public ResourceService getResourceService() {
186: return resourceService;
187: }
188:
189: public void setResourceService(ResourceService resourceService) {
190: this .resourceService = resourceService;
191: }
192:
193: public ResourcePersistence getResourcePersistence() {
194: return resourcePersistence;
195: }
196:
197: public void setResourcePersistence(
198: ResourcePersistence resourcePersistence) {
199: this .resourcePersistence = resourcePersistence;
200: }
201:
202: public ResourceFinder getResourceFinder() {
203: return resourceFinder;
204: }
205:
206: public void setResourceFinder(ResourceFinder resourceFinder) {
207: this .resourceFinder = resourceFinder;
208: }
209:
210: public UserLocalService getUserLocalService() {
211: return userLocalService;
212: }
213:
214: public void setUserLocalService(UserLocalService userLocalService) {
215: this .userLocalService = userLocalService;
216: }
217:
218: public UserService getUserService() {
219: return userService;
220: }
221:
222: public void setUserService(UserService userService) {
223: this .userService = userService;
224: }
225:
226: public UserPersistence getUserPersistence() {
227: return userPersistence;
228: }
229:
230: public void setUserPersistence(UserPersistence userPersistence) {
231: this .userPersistence = userPersistence;
232: }
233:
234: public UserFinder getUserFinder() {
235: return userFinder;
236: }
237:
238: public void setUserFinder(UserFinder userFinder) {
239: this .userFinder = userFinder;
240: }
241:
242: public TagsAssetLocalService getTagsAssetLocalService() {
243: return tagsAssetLocalService;
244: }
245:
246: public void setTagsAssetLocalService(
247: TagsAssetLocalService tagsAssetLocalService) {
248: this .tagsAssetLocalService = tagsAssetLocalService;
249: }
250:
251: public TagsAssetService getTagsAssetService() {
252: return tagsAssetService;
253: }
254:
255: public void setTagsAssetService(TagsAssetService tagsAssetService) {
256: this .tagsAssetService = tagsAssetService;
257: }
258:
259: public TagsAssetPersistence getTagsAssetPersistence() {
260: return tagsAssetPersistence;
261: }
262:
263: public void setTagsAssetPersistence(
264: TagsAssetPersistence tagsAssetPersistence) {
265: this .tagsAssetPersistence = tagsAssetPersistence;
266: }
267:
268: public TagsAssetFinder getTagsAssetFinder() {
269: return tagsAssetFinder;
270: }
271:
272: public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
273: this .tagsAssetFinder = tagsAssetFinder;
274: }
275:
276: public void afterPropertiesSet() {
277: if (igFolderLocalService == null) {
278: igFolderLocalService = IGFolderLocalServiceFactory
279: .getImpl();
280: }
281:
282: if (igFolderService == null) {
283: igFolderService = IGFolderServiceFactory.getImpl();
284: }
285:
286: if (igFolderPersistence == null) {
287: igFolderPersistence = IGFolderUtil.getPersistence();
288: }
289:
290: if (igImagePersistence == null) {
291: igImagePersistence = IGImageUtil.getPersistence();
292: }
293:
294: if (igImageFinder == null) {
295: igImageFinder = IGImageFinderUtil.getFinder();
296: }
297:
298: if (counterLocalService == null) {
299: counterLocalService = CounterLocalServiceFactory.getImpl();
300: }
301:
302: if (counterService == null) {
303: counterService = CounterServiceFactory.getImpl();
304: }
305:
306: if (resourceLocalService == null) {
307: resourceLocalService = ResourceLocalServiceFactory
308: .getImpl();
309: }
310:
311: if (resourceService == null) {
312: resourceService = ResourceServiceFactory.getImpl();
313: }
314:
315: if (resourcePersistence == null) {
316: resourcePersistence = ResourceUtil.getPersistence();
317: }
318:
319: if (resourceFinder == null) {
320: resourceFinder = ResourceFinderUtil.getFinder();
321: }
322:
323: if (userLocalService == null) {
324: userLocalService = UserLocalServiceFactory.getImpl();
325: }
326:
327: if (userService == null) {
328: userService = UserServiceFactory.getImpl();
329: }
330:
331: if (userPersistence == null) {
332: userPersistence = UserUtil.getPersistence();
333: }
334:
335: if (userFinder == null) {
336: userFinder = UserFinderUtil.getFinder();
337: }
338:
339: if (tagsAssetLocalService == null) {
340: tagsAssetLocalService = TagsAssetLocalServiceFactory
341: .getImpl();
342: }
343:
344: if (tagsAssetService == null) {
345: tagsAssetService = TagsAssetServiceFactory.getImpl();
346: }
347:
348: if (tagsAssetPersistence == null) {
349: tagsAssetPersistence = TagsAssetUtil.getPersistence();
350: }
351:
352: if (tagsAssetFinder == null) {
353: tagsAssetFinder = TagsAssetFinderUtil.getFinder();
354: }
355: }
356:
357: protected IGFolderLocalService igFolderLocalService;
358: protected IGFolderService igFolderService;
359: protected IGFolderPersistence igFolderPersistence;
360: protected IGImagePersistence igImagePersistence;
361: protected IGImageFinder igImageFinder;
362: protected CounterLocalService counterLocalService;
363: protected CounterService counterService;
364: protected ResourceLocalService resourceLocalService;
365: protected ResourceService resourceService;
366: protected ResourcePersistence resourcePersistence;
367: protected ResourceFinder resourceFinder;
368: protected UserLocalService userLocalService;
369: protected UserService userService;
370: protected UserPersistence userPersistence;
371: protected UserFinder userFinder;
372: protected TagsAssetLocalService tagsAssetLocalService;
373: protected TagsAssetService tagsAssetService;
374: protected TagsAssetPersistence tagsAssetPersistence;
375: protected TagsAssetFinder tagsAssetFinder;
376: }
|