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:
031: import com.liferay.portlet.softwarecatalog.model.SCLicense;
032: import com.liferay.portlet.softwarecatalog.model.impl.SCLicenseImpl;
033: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
034: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalServiceFactory;
035: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
036: import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionServiceFactory;
037: import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
038: import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
039: import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory;
040: import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
041: import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceFactory;
042: import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
043: import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalServiceFactory;
044: import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
045: import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalServiceFactory;
046: import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
047: import com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceFactory;
048: import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
049: import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionUtil;
050: import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
051: import com.liferay.portlet.softwarecatalog.service.persistence.SCLicenseUtil;
052: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
053: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryUtil;
054: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
055: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotUtil;
056: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
057: import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionUtil;
058:
059: import org.springframework.beans.factory.InitializingBean;
060:
061: import java.util.List;
062:
063: /**
064: * <a href="SCLicenseLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
065: *
066: * @author Brian Wing Shun Chan
067: *
068: */
069: public abstract class SCLicenseLocalServiceBaseImpl implements
070: SCLicenseLocalService, InitializingBean {
071: public SCLicense addSCLicense(SCLicense model)
072: throws SystemException {
073: SCLicense scLicense = new SCLicenseImpl();
074:
075: scLicense.setNew(true);
076:
077: scLicense.setLicenseId(model.getLicenseId());
078: scLicense.setName(model.getName());
079: scLicense.setUrl(model.getUrl());
080: scLicense.setOpenSource(model.getOpenSource());
081: scLicense.setActive(model.getActive());
082: scLicense.setRecommended(model.getRecommended());
083:
084: return scLicensePersistence.update(scLicense);
085: }
086:
087: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
088: throws SystemException {
089: return scLicensePersistence
090: .findWithDynamicQuery(queryInitializer);
091: }
092:
093: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
094: int begin, int end) throws SystemException {
095: return scLicensePersistence.findWithDynamicQuery(
096: queryInitializer, begin, end);
097: }
098:
099: public SCLicense updateSCLicense(SCLicense model)
100: throws SystemException {
101: return scLicensePersistence.update(model, true);
102: }
103:
104: public SCLicensePersistence getSCLicensePersistence() {
105: return scLicensePersistence;
106: }
107:
108: public void setSCLicensePersistence(
109: SCLicensePersistence scLicensePersistence) {
110: this .scLicensePersistence = scLicensePersistence;
111: }
112:
113: public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
114: return scFrameworkVersionLocalService;
115: }
116:
117: public void setSCFrameworkVersionLocalService(
118: SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
119: this .scFrameworkVersionLocalService = scFrameworkVersionLocalService;
120: }
121:
122: public SCFrameworkVersionService getSCFrameworkVersionService() {
123: return scFrameworkVersionService;
124: }
125:
126: public void setSCFrameworkVersionService(
127: SCFrameworkVersionService scFrameworkVersionService) {
128: this .scFrameworkVersionService = scFrameworkVersionService;
129: }
130:
131: public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
132: return scFrameworkVersionPersistence;
133: }
134:
135: public void setSCFrameworkVersionPersistence(
136: SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
137: this .scFrameworkVersionPersistence = scFrameworkVersionPersistence;
138: }
139:
140: public SCProductEntryLocalService getSCProductEntryLocalService() {
141: return scProductEntryLocalService;
142: }
143:
144: public void setSCProductEntryLocalService(
145: SCProductEntryLocalService scProductEntryLocalService) {
146: this .scProductEntryLocalService = scProductEntryLocalService;
147: }
148:
149: public SCProductEntryService getSCProductEntryService() {
150: return scProductEntryService;
151: }
152:
153: public void setSCProductEntryService(
154: SCProductEntryService scProductEntryService) {
155: this .scProductEntryService = scProductEntryService;
156: }
157:
158: public SCProductEntryPersistence getSCProductEntryPersistence() {
159: return scProductEntryPersistence;
160: }
161:
162: public void setSCProductEntryPersistence(
163: SCProductEntryPersistence scProductEntryPersistence) {
164: this .scProductEntryPersistence = scProductEntryPersistence;
165: }
166:
167: public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
168: return scProductScreenshotLocalService;
169: }
170:
171: public void setSCProductScreenshotLocalService(
172: SCProductScreenshotLocalService scProductScreenshotLocalService) {
173: this .scProductScreenshotLocalService = scProductScreenshotLocalService;
174: }
175:
176: public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
177: return scProductScreenshotPersistence;
178: }
179:
180: public void setSCProductScreenshotPersistence(
181: SCProductScreenshotPersistence scProductScreenshotPersistence) {
182: this .scProductScreenshotPersistence = scProductScreenshotPersistence;
183: }
184:
185: public SCProductVersionLocalService getSCProductVersionLocalService() {
186: return scProductVersionLocalService;
187: }
188:
189: public void setSCProductVersionLocalService(
190: SCProductVersionLocalService scProductVersionLocalService) {
191: this .scProductVersionLocalService = scProductVersionLocalService;
192: }
193:
194: public SCProductVersionService getSCProductVersionService() {
195: return scProductVersionService;
196: }
197:
198: public void setSCProductVersionService(
199: SCProductVersionService scProductVersionService) {
200: this .scProductVersionService = scProductVersionService;
201: }
202:
203: public SCProductVersionPersistence getSCProductVersionPersistence() {
204: return scProductVersionPersistence;
205: }
206:
207: public void setSCProductVersionPersistence(
208: SCProductVersionPersistence scProductVersionPersistence) {
209: this .scProductVersionPersistence = scProductVersionPersistence;
210: }
211:
212: public CounterLocalService getCounterLocalService() {
213: return counterLocalService;
214: }
215:
216: public void setCounterLocalService(
217: CounterLocalService counterLocalService) {
218: this .counterLocalService = counterLocalService;
219: }
220:
221: public CounterService getCounterService() {
222: return counterService;
223: }
224:
225: public void setCounterService(CounterService counterService) {
226: this .counterService = counterService;
227: }
228:
229: public void afterPropertiesSet() {
230: if (scLicensePersistence == null) {
231: scLicensePersistence = SCLicenseUtil.getPersistence();
232: }
233:
234: if (scFrameworkVersionLocalService == null) {
235: scFrameworkVersionLocalService = SCFrameworkVersionLocalServiceFactory
236: .getImpl();
237: }
238:
239: if (scFrameworkVersionService == null) {
240: scFrameworkVersionService = SCFrameworkVersionServiceFactory
241: .getImpl();
242: }
243:
244: if (scFrameworkVersionPersistence == null) {
245: scFrameworkVersionPersistence = SCFrameworkVersionUtil
246: .getPersistence();
247: }
248:
249: if (scProductEntryLocalService == null) {
250: scProductEntryLocalService = SCProductEntryLocalServiceFactory
251: .getImpl();
252: }
253:
254: if (scProductEntryService == null) {
255: scProductEntryService = SCProductEntryServiceFactory
256: .getImpl();
257: }
258:
259: if (scProductEntryPersistence == null) {
260: scProductEntryPersistence = SCProductEntryUtil
261: .getPersistence();
262: }
263:
264: if (scProductScreenshotLocalService == null) {
265: scProductScreenshotLocalService = SCProductScreenshotLocalServiceFactory
266: .getImpl();
267: }
268:
269: if (scProductScreenshotPersistence == null) {
270: scProductScreenshotPersistence = SCProductScreenshotUtil
271: .getPersistence();
272: }
273:
274: if (scProductVersionLocalService == null) {
275: scProductVersionLocalService = SCProductVersionLocalServiceFactory
276: .getImpl();
277: }
278:
279: if (scProductVersionService == null) {
280: scProductVersionService = SCProductVersionServiceFactory
281: .getImpl();
282: }
283:
284: if (scProductVersionPersistence == null) {
285: scProductVersionPersistence = SCProductVersionUtil
286: .getPersistence();
287: }
288:
289: if (counterLocalService == null) {
290: counterLocalService = CounterLocalServiceFactory.getImpl();
291: }
292:
293: if (counterService == null) {
294: counterService = CounterServiceFactory.getImpl();
295: }
296: }
297:
298: protected SCLicensePersistence scLicensePersistence;
299: protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
300: protected SCFrameworkVersionService scFrameworkVersionService;
301: protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
302: protected SCProductEntryLocalService scProductEntryLocalService;
303: protected SCProductEntryService scProductEntryService;
304: protected SCProductEntryPersistence scProductEntryPersistence;
305: protected SCProductScreenshotLocalService scProductScreenshotLocalService;
306: protected SCProductScreenshotPersistence scProductScreenshotPersistence;
307: protected SCProductVersionLocalService scProductVersionLocalService;
308: protected SCProductVersionService scProductVersionService;
309: protected SCProductVersionPersistence scProductVersionPersistence;
310: protected CounterLocalService counterLocalService;
311: protected CounterService counterService;
312: }
|