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.softwarecatalog.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.UserLocalService;
031: import com.liferay.portal.service.UserLocalServiceFactory;
032: import com.liferay.portal.service.UserService;
033: import com.liferay.portal.service.UserServiceFactory;
034: import com.liferay.portal.service.persistence.UserFinder;
035: import com.liferay.portal.service.persistence.UserFinderUtil;
036: import com.liferay.portal.service.persistence.UserPersistence;
037: import com.liferay.portal.service.persistence.UserUtil;
038:
039: import com.liferay.portlet.softwarecatalog.model.SCProductVersion;
040: import com.liferay.portlet.softwarecatalog.model.impl.SCProductVersionImpl;
041: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
042: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalServiceFactory;
043: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
044: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionServiceFactory;
045: import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
046: import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalServiceFactory;
047: import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
048: import com.liferay.portlet.softwarecatalog.service.SCLicenseServiceFactory;
049: import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
050: import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory;
051: import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
052: import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceFactory;
053: import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
054: import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalServiceFactory;
055: import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
056: import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
057: import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionUtil;
058: import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
059: import com.liferay.portlet.softwarecatalog.service.persistence.SCLicenseUtil;
060: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
061: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryUtil;
062: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
063: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotUtil;
064: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
065: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionUtil;
066:
067: import org.springframework.beans.factory.InitializingBean;
068:
069: import java.util.List;
070:
071: /**
072: * <a href="SCProductVersionLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: */
077: public abstract class SCProductVersionLocalServiceBaseImpl implements
078: SCProductVersionLocalService, InitializingBean {
079: public SCProductVersion addSCProductVersion(SCProductVersion model)
080: throws SystemException {
081: SCProductVersion scProductVersion = new SCProductVersionImpl();
082:
083: scProductVersion.setNew(true);
084:
085: scProductVersion.setProductVersionId(model
086: .getProductVersionId());
087: scProductVersion.setCompanyId(model.getCompanyId());
088: scProductVersion.setUserId(model.getUserId());
089: scProductVersion.setUserName(model.getUserName());
090: scProductVersion.setCreateDate(model.getCreateDate());
091: scProductVersion.setModifiedDate(model.getModifiedDate());
092: scProductVersion.setProductEntryId(model.getProductEntryId());
093: scProductVersion.setVersion(model.getVersion());
094: scProductVersion.setChangeLog(model.getChangeLog());
095: scProductVersion.setDownloadPageURL(model.getDownloadPageURL());
096: scProductVersion.setDirectDownloadURL(model
097: .getDirectDownloadURL());
098: scProductVersion.setRepoStoreArtifact(model
099: .getRepoStoreArtifact());
100:
101: return scProductVersionPersistence.update(scProductVersion);
102: }
103:
104: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
105: throws SystemException {
106: return scProductVersionPersistence
107: .findWithDynamicQuery(queryInitializer);
108: }
109:
110: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
111: int begin, int end) throws SystemException {
112: return scProductVersionPersistence.findWithDynamicQuery(
113: queryInitializer, begin, end);
114: }
115:
116: public SCProductVersion updateSCProductVersion(
117: SCProductVersion model) throws SystemException {
118: return scProductVersionPersistence.update(model, true);
119: }
120:
121: public SCLicenseLocalService getSCLicenseLocalService() {
122: return scLicenseLocalService;
123: }
124:
125: public void setSCLicenseLocalService(
126: SCLicenseLocalService scLicenseLocalService) {
127: this .scLicenseLocalService = scLicenseLocalService;
128: }
129:
130: public SCLicenseService getSCLicenseService() {
131: return scLicenseService;
132: }
133:
134: public void setSCLicenseService(SCLicenseService scLicenseService) {
135: this .scLicenseService = scLicenseService;
136: }
137:
138: public SCLicensePersistence getSCLicensePersistence() {
139: return scLicensePersistence;
140: }
141:
142: public void setSCLicensePersistence(
143: SCLicensePersistence scLicensePersistence) {
144: this .scLicensePersistence = scLicensePersistence;
145: }
146:
147: public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
148: return scFrameworkVersionLocalService;
149: }
150:
151: public void setSCFrameworkVersionLocalService(
152: SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
153: this .scFrameworkVersionLocalService = scFrameworkVersionLocalService;
154: }
155:
156: public SCFrameworkVersionService getSCFrameworkVersionService() {
157: return scFrameworkVersionService;
158: }
159:
160: public void setSCFrameworkVersionService(
161: SCFrameworkVersionService scFrameworkVersionService) {
162: this .scFrameworkVersionService = scFrameworkVersionService;
163: }
164:
165: public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
166: return scFrameworkVersionPersistence;
167: }
168:
169: public void setSCFrameworkVersionPersistence(
170: SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
171: this .scFrameworkVersionPersistence = scFrameworkVersionPersistence;
172: }
173:
174: public SCProductEntryLocalService getSCProductEntryLocalService() {
175: return scProductEntryLocalService;
176: }
177:
178: public void setSCProductEntryLocalService(
179: SCProductEntryLocalService scProductEntryLocalService) {
180: this .scProductEntryLocalService = scProductEntryLocalService;
181: }
182:
183: public SCProductEntryService getSCProductEntryService() {
184: return scProductEntryService;
185: }
186:
187: public void setSCProductEntryService(
188: SCProductEntryService scProductEntryService) {
189: this .scProductEntryService = scProductEntryService;
190: }
191:
192: public SCProductEntryPersistence getSCProductEntryPersistence() {
193: return scProductEntryPersistence;
194: }
195:
196: public void setSCProductEntryPersistence(
197: SCProductEntryPersistence scProductEntryPersistence) {
198: this .scProductEntryPersistence = scProductEntryPersistence;
199: }
200:
201: public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
202: return scProductScreenshotLocalService;
203: }
204:
205: public void setSCProductScreenshotLocalService(
206: SCProductScreenshotLocalService scProductScreenshotLocalService) {
207: this .scProductScreenshotLocalService = scProductScreenshotLocalService;
208: }
209:
210: public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
211: return scProductScreenshotPersistence;
212: }
213:
214: public void setSCProductScreenshotPersistence(
215: SCProductScreenshotPersistence scProductScreenshotPersistence) {
216: this .scProductScreenshotPersistence = scProductScreenshotPersistence;
217: }
218:
219: public SCProductVersionPersistence getSCProductVersionPersistence() {
220: return scProductVersionPersistence;
221: }
222:
223: public void setSCProductVersionPersistence(
224: SCProductVersionPersistence scProductVersionPersistence) {
225: this .scProductVersionPersistence = scProductVersionPersistence;
226: }
227:
228: public CounterLocalService getCounterLocalService() {
229: return counterLocalService;
230: }
231:
232: public void setCounterLocalService(
233: CounterLocalService counterLocalService) {
234: this .counterLocalService = counterLocalService;
235: }
236:
237: public CounterService getCounterService() {
238: return counterService;
239: }
240:
241: public void setCounterService(CounterService counterService) {
242: this .counterService = counterService;
243: }
244:
245: public UserLocalService getUserLocalService() {
246: return userLocalService;
247: }
248:
249: public void setUserLocalService(UserLocalService userLocalService) {
250: this .userLocalService = userLocalService;
251: }
252:
253: public UserService getUserService() {
254: return userService;
255: }
256:
257: public void setUserService(UserService userService) {
258: this .userService = userService;
259: }
260:
261: public UserPersistence getUserPersistence() {
262: return userPersistence;
263: }
264:
265: public void setUserPersistence(UserPersistence userPersistence) {
266: this .userPersistence = userPersistence;
267: }
268:
269: public UserFinder getUserFinder() {
270: return userFinder;
271: }
272:
273: public void setUserFinder(UserFinder userFinder) {
274: this .userFinder = userFinder;
275: }
276:
277: public void afterPropertiesSet() {
278: if (scLicenseLocalService == null) {
279: scLicenseLocalService = SCLicenseLocalServiceFactory
280: .getImpl();
281: }
282:
283: if (scLicenseService == null) {
284: scLicenseService = SCLicenseServiceFactory.getImpl();
285: }
286:
287: if (scLicensePersistence == null) {
288: scLicensePersistence = SCLicenseUtil.getPersistence();
289: }
290:
291: if (scFrameworkVersionLocalService == null) {
292: scFrameworkVersionLocalService = SCFrameworkVersionLocalServiceFactory
293: .getImpl();
294: }
295:
296: if (scFrameworkVersionService == null) {
297: scFrameworkVersionService = SCFrameworkVersionServiceFactory
298: .getImpl();
299: }
300:
301: if (scFrameworkVersionPersistence == null) {
302: scFrameworkVersionPersistence = SCFrameworkVersionUtil
303: .getPersistence();
304: }
305:
306: if (scProductEntryLocalService == null) {
307: scProductEntryLocalService = SCProductEntryLocalServiceFactory
308: .getImpl();
309: }
310:
311: if (scProductEntryService == null) {
312: scProductEntryService = SCProductEntryServiceFactory
313: .getImpl();
314: }
315:
316: if (scProductEntryPersistence == null) {
317: scProductEntryPersistence = SCProductEntryUtil
318: .getPersistence();
319: }
320:
321: if (scProductScreenshotLocalService == null) {
322: scProductScreenshotLocalService = SCProductScreenshotLocalServiceFactory
323: .getImpl();
324: }
325:
326: if (scProductScreenshotPersistence == null) {
327: scProductScreenshotPersistence = SCProductScreenshotUtil
328: .getPersistence();
329: }
330:
331: if (scProductVersionPersistence == null) {
332: scProductVersionPersistence = SCProductVersionUtil
333: .getPersistence();
334: }
335:
336: if (counterLocalService == null) {
337: counterLocalService = CounterLocalServiceFactory.getImpl();
338: }
339:
340: if (counterService == null) {
341: counterService = CounterServiceFactory.getImpl();
342: }
343:
344: if (userLocalService == null) {
345: userLocalService = UserLocalServiceFactory.getImpl();
346: }
347:
348: if (userService == null) {
349: userService = UserServiceFactory.getImpl();
350: }
351:
352: if (userPersistence == null) {
353: userPersistence = UserUtil.getPersistence();
354: }
355:
356: if (userFinder == null) {
357: userFinder = UserFinderUtil.getFinder();
358: }
359: }
360:
361: protected SCLicenseLocalService scLicenseLocalService;
362: protected SCLicenseService scLicenseService;
363: protected SCLicensePersistence scLicensePersistence;
364: protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
365: protected SCFrameworkVersionService scFrameworkVersionService;
366: protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
367: protected SCProductEntryLocalService scProductEntryLocalService;
368: protected SCProductEntryService scProductEntryService;
369: protected SCProductEntryPersistence scProductEntryPersistence;
370: protected SCProductScreenshotLocalService scProductScreenshotLocalService;
371: protected SCProductScreenshotPersistence scProductScreenshotPersistence;
372: protected SCProductVersionPersistence scProductVersionPersistence;
373: protected CounterLocalService counterLocalService;
374: protected CounterService counterService;
375: protected UserLocalService userLocalService;
376: protected UserService userService;
377: protected UserPersistence userPersistence;
378: protected UserFinder userFinder;
379: }
|