001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.expando.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.PersistedModel;
036    import com.liferay.portal.service.BaseLocalServiceImpl;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.persistence.ClassNamePersistence;
039    import com.liferay.portal.service.persistence.UserFinder;
040    import com.liferay.portal.service.persistence.UserPersistence;
041    import com.liferay.portal.util.PortalUtil;
042    
043    import com.liferay.portlet.expando.model.ExpandoColumn;
044    import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
045    import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
046    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
047    import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
048    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
049    
050    import java.io.Serializable;
051    
052    import java.util.List;
053    
054    import javax.sql.DataSource;
055    
056    /**
057     * Provides the base implementation for the expando column local service.
058     *
059     * <p>
060     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl}.
061     * </p>
062     *
063     * @author Brian Wing Shun Chan
064     * @see com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl
065     * @see com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil
066     * @generated
067     */
068    @ProviderType
069    public abstract class ExpandoColumnLocalServiceBaseImpl
070            extends BaseLocalServiceImpl implements ExpandoColumnLocalService,
071                    IdentifiableBean {
072            /*
073             * NOTE FOR DEVELOPERS:
074             *
075             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil} to access the expando column local service.
076             */
077    
078            /**
079             * Adds the expando column to the database. Also notifies the appropriate model listeners.
080             *
081             * @param expandoColumn the expando column
082             * @return the expando column that was added
083             */
084            @Indexable(type = IndexableType.REINDEX)
085            @Override
086            public ExpandoColumn addExpandoColumn(ExpandoColumn expandoColumn) {
087                    expandoColumn.setNew(true);
088    
089                    return expandoColumnPersistence.update(expandoColumn);
090            }
091    
092            /**
093             * Creates a new expando column with the primary key. Does not add the expando column to the database.
094             *
095             * @param columnId the primary key for the new expando column
096             * @return the new expando column
097             */
098            @Override
099            public ExpandoColumn createExpandoColumn(long columnId) {
100                    return expandoColumnPersistence.create(columnId);
101            }
102    
103            /**
104             * Deletes the expando column with the primary key from the database. Also notifies the appropriate model listeners.
105             *
106             * @param columnId the primary key of the expando column
107             * @return the expando column that was removed
108             * @throws PortalException if a expando column with the primary key could not be found
109             */
110            @Indexable(type = IndexableType.DELETE)
111            @Override
112            public ExpandoColumn deleteExpandoColumn(long columnId)
113                    throws PortalException {
114                    return expandoColumnPersistence.remove(columnId);
115            }
116    
117            /**
118             * Deletes the expando column from the database. Also notifies the appropriate model listeners.
119             *
120             * @param expandoColumn the expando column
121             * @return the expando column that was removed
122             */
123            @Indexable(type = IndexableType.DELETE)
124            @Override
125            public ExpandoColumn deleteExpandoColumn(ExpandoColumn expandoColumn) {
126                    return expandoColumnPersistence.remove(expandoColumn);
127            }
128    
129            @Override
130            public DynamicQuery dynamicQuery() {
131                    Class<?> clazz = getClass();
132    
133                    return DynamicQueryFactoryUtil.forClass(ExpandoColumn.class,
134                            clazz.getClassLoader());
135            }
136    
137            /**
138             * Performs a dynamic query on the database and returns the matching rows.
139             *
140             * @param dynamicQuery the dynamic query
141             * @return the matching rows
142             */
143            @Override
144            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
145                    return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery);
146            }
147    
148            /**
149             * Performs a dynamic query on the database and returns a range of the matching rows.
150             *
151             * <p>
152             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoColumnModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
153             * </p>
154             *
155             * @param dynamicQuery the dynamic query
156             * @param start the lower bound of the range of model instances
157             * @param end the upper bound of the range of model instances (not inclusive)
158             * @return the range of matching rows
159             */
160            @Override
161            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
162                    int end) {
163                    return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery,
164                            start, end);
165            }
166    
167            /**
168             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
169             *
170             * <p>
171             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoColumnModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
172             * </p>
173             *
174             * @param dynamicQuery the dynamic query
175             * @param start the lower bound of the range of model instances
176             * @param end the upper bound of the range of model instances (not inclusive)
177             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
178             * @return the ordered range of matching rows
179             */
180            @Override
181            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
182                    int end, OrderByComparator<T> orderByComparator) {
183                    return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery,
184                            start, end, orderByComparator);
185            }
186    
187            /**
188             * Returns the number of rows matching the dynamic query.
189             *
190             * @param dynamicQuery the dynamic query
191             * @return the number of rows matching the dynamic query
192             */
193            @Override
194            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
195                    return expandoColumnPersistence.countWithDynamicQuery(dynamicQuery);
196            }
197    
198            /**
199             * Returns the number of rows matching the dynamic query.
200             *
201             * @param dynamicQuery the dynamic query
202             * @param projection the projection to apply to the query
203             * @return the number of rows matching the dynamic query
204             */
205            @Override
206            public long dynamicQueryCount(DynamicQuery dynamicQuery,
207                    Projection projection) {
208                    return expandoColumnPersistence.countWithDynamicQuery(dynamicQuery,
209                            projection);
210            }
211    
212            @Override
213            public ExpandoColumn fetchExpandoColumn(long columnId) {
214                    return expandoColumnPersistence.fetchByPrimaryKey(columnId);
215            }
216    
217            /**
218             * Returns the expando column with the primary key.
219             *
220             * @param columnId the primary key of the expando column
221             * @return the expando column
222             * @throws PortalException if a expando column with the primary key could not be found
223             */
224            @Override
225            public ExpandoColumn getExpandoColumn(long columnId)
226                    throws PortalException {
227                    return expandoColumnPersistence.findByPrimaryKey(columnId);
228            }
229    
230            @Override
231            public ActionableDynamicQuery getActionableDynamicQuery() {
232                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
233    
234                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil.getService());
235                    actionableDynamicQuery.setClass(ExpandoColumn.class);
236                    actionableDynamicQuery.setClassLoader(getClassLoader());
237    
238                    actionableDynamicQuery.setPrimaryKeyPropertyName("columnId");
239    
240                    return actionableDynamicQuery;
241            }
242    
243            protected void initActionableDynamicQuery(
244                    ActionableDynamicQuery actionableDynamicQuery) {
245                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil.getService());
246                    actionableDynamicQuery.setClass(ExpandoColumn.class);
247                    actionableDynamicQuery.setClassLoader(getClassLoader());
248    
249                    actionableDynamicQuery.setPrimaryKeyPropertyName("columnId");
250            }
251    
252            /**
253             * @throws PortalException
254             */
255            @Override
256            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
257                    throws PortalException {
258                    return expandoColumnLocalService.deleteExpandoColumn((ExpandoColumn)persistedModel);
259            }
260    
261            @Override
262            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
263                    throws PortalException {
264                    return expandoColumnPersistence.findByPrimaryKey(primaryKeyObj);
265            }
266    
267            /**
268             * Returns a range of all the expando columns.
269             *
270             * <p>
271             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoColumnModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
272             * </p>
273             *
274             * @param start the lower bound of the range of expando columns
275             * @param end the upper bound of the range of expando columns (not inclusive)
276             * @return the range of expando columns
277             */
278            @Override
279            public List<ExpandoColumn> getExpandoColumns(int start, int end) {
280                    return expandoColumnPersistence.findAll(start, end);
281            }
282    
283            /**
284             * Returns the number of expando columns.
285             *
286             * @return the number of expando columns
287             */
288            @Override
289            public int getExpandoColumnsCount() {
290                    return expandoColumnPersistence.countAll();
291            }
292    
293            /**
294             * Updates the expando column in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
295             *
296             * @param expandoColumn the expando column
297             * @return the expando column that was updated
298             */
299            @Indexable(type = IndexableType.REINDEX)
300            @Override
301            public ExpandoColumn updateExpandoColumn(ExpandoColumn expandoColumn) {
302                    return expandoColumnPersistence.update(expandoColumn);
303            }
304    
305            /**
306             * Returns the expando column local service.
307             *
308             * @return the expando column local service
309             */
310            public ExpandoColumnLocalService getExpandoColumnLocalService() {
311                    return expandoColumnLocalService;
312            }
313    
314            /**
315             * Sets the expando column local service.
316             *
317             * @param expandoColumnLocalService the expando column local service
318             */
319            public void setExpandoColumnLocalService(
320                    ExpandoColumnLocalService expandoColumnLocalService) {
321                    this.expandoColumnLocalService = expandoColumnLocalService;
322            }
323    
324            /**
325             * Returns the expando column remote service.
326             *
327             * @return the expando column remote service
328             */
329            public com.liferay.portlet.expando.service.ExpandoColumnService getExpandoColumnService() {
330                    return expandoColumnService;
331            }
332    
333            /**
334             * Sets the expando column remote service.
335             *
336             * @param expandoColumnService the expando column remote service
337             */
338            public void setExpandoColumnService(
339                    com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService) {
340                    this.expandoColumnService = expandoColumnService;
341            }
342    
343            /**
344             * Returns the expando column persistence.
345             *
346             * @return the expando column persistence
347             */
348            public ExpandoColumnPersistence getExpandoColumnPersistence() {
349                    return expandoColumnPersistence;
350            }
351    
352            /**
353             * Sets the expando column persistence.
354             *
355             * @param expandoColumnPersistence the expando column persistence
356             */
357            public void setExpandoColumnPersistence(
358                    ExpandoColumnPersistence expandoColumnPersistence) {
359                    this.expandoColumnPersistence = expandoColumnPersistence;
360            }
361    
362            /**
363             * Returns the expando row local service.
364             *
365             * @return the expando row local service
366             */
367            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
368                    return expandoRowLocalService;
369            }
370    
371            /**
372             * Sets the expando row local service.
373             *
374             * @param expandoRowLocalService the expando row local service
375             */
376            public void setExpandoRowLocalService(
377                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
378                    this.expandoRowLocalService = expandoRowLocalService;
379            }
380    
381            /**
382             * Returns the expando row persistence.
383             *
384             * @return the expando row persistence
385             */
386            public ExpandoRowPersistence getExpandoRowPersistence() {
387                    return expandoRowPersistence;
388            }
389    
390            /**
391             * Sets the expando row persistence.
392             *
393             * @param expandoRowPersistence the expando row persistence
394             */
395            public void setExpandoRowPersistence(
396                    ExpandoRowPersistence expandoRowPersistence) {
397                    this.expandoRowPersistence = expandoRowPersistence;
398            }
399    
400            /**
401             * Returns the expando table local service.
402             *
403             * @return the expando table local service
404             */
405            public com.liferay.portlet.expando.service.ExpandoTableLocalService getExpandoTableLocalService() {
406                    return expandoTableLocalService;
407            }
408    
409            /**
410             * Sets the expando table local service.
411             *
412             * @param expandoTableLocalService the expando table local service
413             */
414            public void setExpandoTableLocalService(
415                    com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService) {
416                    this.expandoTableLocalService = expandoTableLocalService;
417            }
418    
419            /**
420             * Returns the expando table persistence.
421             *
422             * @return the expando table persistence
423             */
424            public ExpandoTablePersistence getExpandoTablePersistence() {
425                    return expandoTablePersistence;
426            }
427    
428            /**
429             * Sets the expando table persistence.
430             *
431             * @param expandoTablePersistence the expando table persistence
432             */
433            public void setExpandoTablePersistence(
434                    ExpandoTablePersistence expandoTablePersistence) {
435                    this.expandoTablePersistence = expandoTablePersistence;
436            }
437    
438            /**
439             * Returns the expando value local service.
440             *
441             * @return the expando value local service
442             */
443            public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() {
444                    return expandoValueLocalService;
445            }
446    
447            /**
448             * Sets the expando value local service.
449             *
450             * @param expandoValueLocalService the expando value local service
451             */
452            public void setExpandoValueLocalService(
453                    com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) {
454                    this.expandoValueLocalService = expandoValueLocalService;
455            }
456    
457            /**
458             * Returns the expando value remote service.
459             *
460             * @return the expando value remote service
461             */
462            public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() {
463                    return expandoValueService;
464            }
465    
466            /**
467             * Sets the expando value remote service.
468             *
469             * @param expandoValueService the expando value remote service
470             */
471            public void setExpandoValueService(
472                    com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) {
473                    this.expandoValueService = expandoValueService;
474            }
475    
476            /**
477             * Returns the expando value persistence.
478             *
479             * @return the expando value persistence
480             */
481            public ExpandoValuePersistence getExpandoValuePersistence() {
482                    return expandoValuePersistence;
483            }
484    
485            /**
486             * Sets the expando value persistence.
487             *
488             * @param expandoValuePersistence the expando value persistence
489             */
490            public void setExpandoValuePersistence(
491                    ExpandoValuePersistence expandoValuePersistence) {
492                    this.expandoValuePersistence = expandoValuePersistence;
493            }
494    
495            /**
496             * Returns the counter local service.
497             *
498             * @return the counter local service
499             */
500            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
501                    return counterLocalService;
502            }
503    
504            /**
505             * Sets the counter local service.
506             *
507             * @param counterLocalService the counter local service
508             */
509            public void setCounterLocalService(
510                    com.liferay.counter.service.CounterLocalService counterLocalService) {
511                    this.counterLocalService = counterLocalService;
512            }
513    
514            /**
515             * Returns the class name local service.
516             *
517             * @return the class name local service
518             */
519            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
520                    return classNameLocalService;
521            }
522    
523            /**
524             * Sets the class name local service.
525             *
526             * @param classNameLocalService the class name local service
527             */
528            public void setClassNameLocalService(
529                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
530                    this.classNameLocalService = classNameLocalService;
531            }
532    
533            /**
534             * Returns the class name remote service.
535             *
536             * @return the class name remote service
537             */
538            public com.liferay.portal.service.ClassNameService getClassNameService() {
539                    return classNameService;
540            }
541    
542            /**
543             * Sets the class name remote service.
544             *
545             * @param classNameService the class name remote service
546             */
547            public void setClassNameService(
548                    com.liferay.portal.service.ClassNameService classNameService) {
549                    this.classNameService = classNameService;
550            }
551    
552            /**
553             * Returns the class name persistence.
554             *
555             * @return the class name persistence
556             */
557            public ClassNamePersistence getClassNamePersistence() {
558                    return classNamePersistence;
559            }
560    
561            /**
562             * Sets the class name persistence.
563             *
564             * @param classNamePersistence the class name persistence
565             */
566            public void setClassNamePersistence(
567                    ClassNamePersistence classNamePersistence) {
568                    this.classNamePersistence = classNamePersistence;
569            }
570    
571            /**
572             * Returns the resource local service.
573             *
574             * @return the resource local service
575             */
576            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
577                    return resourceLocalService;
578            }
579    
580            /**
581             * Sets the resource local service.
582             *
583             * @param resourceLocalService the resource local service
584             */
585            public void setResourceLocalService(
586                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
587                    this.resourceLocalService = resourceLocalService;
588            }
589    
590            /**
591             * Returns the user local service.
592             *
593             * @return the user local service
594             */
595            public com.liferay.portal.service.UserLocalService getUserLocalService() {
596                    return userLocalService;
597            }
598    
599            /**
600             * Sets the user local service.
601             *
602             * @param userLocalService the user local service
603             */
604            public void setUserLocalService(
605                    com.liferay.portal.service.UserLocalService userLocalService) {
606                    this.userLocalService = userLocalService;
607            }
608    
609            /**
610             * Returns the user remote service.
611             *
612             * @return the user remote service
613             */
614            public com.liferay.portal.service.UserService getUserService() {
615                    return userService;
616            }
617    
618            /**
619             * Sets the user remote service.
620             *
621             * @param userService the user remote service
622             */
623            public void setUserService(
624                    com.liferay.portal.service.UserService userService) {
625                    this.userService = userService;
626            }
627    
628            /**
629             * Returns the user persistence.
630             *
631             * @return the user persistence
632             */
633            public UserPersistence getUserPersistence() {
634                    return userPersistence;
635            }
636    
637            /**
638             * Sets the user persistence.
639             *
640             * @param userPersistence the user persistence
641             */
642            public void setUserPersistence(UserPersistence userPersistence) {
643                    this.userPersistence = userPersistence;
644            }
645    
646            /**
647             * Returns the user finder.
648             *
649             * @return the user finder
650             */
651            public UserFinder getUserFinder() {
652                    return userFinder;
653            }
654    
655            /**
656             * Sets the user finder.
657             *
658             * @param userFinder the user finder
659             */
660            public void setUserFinder(UserFinder userFinder) {
661                    this.userFinder = userFinder;
662            }
663    
664            public void afterPropertiesSet() {
665                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.expando.model.ExpandoColumn",
666                            expandoColumnLocalService);
667            }
668    
669            public void destroy() {
670                    persistedModelLocalServiceRegistry.unregister(
671                            "com.liferay.portlet.expando.model.ExpandoColumn");
672            }
673    
674            /**
675             * Returns the Spring bean ID for this bean.
676             *
677             * @return the Spring bean ID for this bean
678             */
679            @Override
680            public String getBeanIdentifier() {
681                    return _beanIdentifier;
682            }
683    
684            /**
685             * Sets the Spring bean ID for this bean.
686             *
687             * @param beanIdentifier the Spring bean ID for this bean
688             */
689            @Override
690            public void setBeanIdentifier(String beanIdentifier) {
691                    _beanIdentifier = beanIdentifier;
692            }
693    
694            protected Class<?> getModelClass() {
695                    return ExpandoColumn.class;
696            }
697    
698            protected String getModelClassName() {
699                    return ExpandoColumn.class.getName();
700            }
701    
702            /**
703             * Performs a SQL query.
704             *
705             * @param sql the sql query
706             */
707            protected void runSQL(String sql) {
708                    try {
709                            DataSource dataSource = expandoColumnPersistence.getDataSource();
710    
711                            DB db = DBFactoryUtil.getDB();
712    
713                            sql = db.buildSQL(sql);
714                            sql = PortalUtil.transformSQL(sql);
715    
716                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
717                                            sql, new int[0]);
718    
719                            sqlUpdate.update();
720                    }
721                    catch (Exception e) {
722                            throw new SystemException(e);
723                    }
724            }
725    
726            @BeanReference(type = ExpandoColumnLocalService.class)
727            protected ExpandoColumnLocalService expandoColumnLocalService;
728            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoColumnService.class)
729            protected com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService;
730            @BeanReference(type = ExpandoColumnPersistence.class)
731            protected ExpandoColumnPersistence expandoColumnPersistence;
732            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
733            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
734            @BeanReference(type = ExpandoRowPersistence.class)
735            protected ExpandoRowPersistence expandoRowPersistence;
736            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoTableLocalService.class)
737            protected com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService;
738            @BeanReference(type = ExpandoTablePersistence.class)
739            protected ExpandoTablePersistence expandoTablePersistence;
740            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class)
741            protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService;
742            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class)
743            protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService;
744            @BeanReference(type = ExpandoValuePersistence.class)
745            protected ExpandoValuePersistence expandoValuePersistence;
746            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
747            protected com.liferay.counter.service.CounterLocalService counterLocalService;
748            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
749            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
750            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
751            protected com.liferay.portal.service.ClassNameService classNameService;
752            @BeanReference(type = ClassNamePersistence.class)
753            protected ClassNamePersistence classNamePersistence;
754            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
755            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
756            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
757            protected com.liferay.portal.service.UserLocalService userLocalService;
758            @BeanReference(type = com.liferay.portal.service.UserService.class)
759            protected com.liferay.portal.service.UserService userService;
760            @BeanReference(type = UserPersistence.class)
761            protected UserPersistence userPersistence;
762            @BeanReference(type = UserFinder.class)
763            protected UserFinder userFinder;
764            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
765            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
766            private String _beanIdentifier;
767    }