001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.model;
016    
017    import com.liferay.portal.ModelListenerException;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class BaseModelListener<T extends BaseModel<T>>
023            implements ModelListener<T> {
024    
025            /**
026             * @throws ModelListenerException
027             */
028            public void onAfterAddAssociation(
029                            Object classPK, String associationClassName,
030                            Object associationClassPK)
031                    throws ModelListenerException {
032            }
033    
034            /**
035             * @throws ModelListenerException
036             */
037            public void onAfterCreate(T model) throws ModelListenerException {
038            }
039    
040            /**
041             * @throws ModelListenerException
042             */
043            public void onAfterRemove(T model) throws ModelListenerException {
044            }
045    
046            /**
047             * @throws ModelListenerException
048             */
049            public void onAfterRemoveAssociation(
050                            Object classPK, String associationClassName,
051                            Object associationClassPK)
052                    throws ModelListenerException {
053            }
054    
055            /**
056             * @throws ModelListenerException
057             */
058            public void onAfterUpdate(T model) throws ModelListenerException {
059            }
060    
061            /**
062             * @throws ModelListenerException
063             */
064            public void onBeforeAddAssociation(
065                            Object classPK, String associationClassName,
066                            Object associationClassPK)
067                    throws ModelListenerException {
068            }
069    
070            /**
071             * @throws ModelListenerException
072             */
073            public void onBeforeCreate(T model) throws ModelListenerException {
074            }
075    
076            /**
077             * @throws ModelListenerException
078             */
079            public void onBeforeRemove(T model) throws ModelListenerException {
080            }
081    
082            /**
083             * @throws ModelListenerException
084             */
085            public void onBeforeRemoveAssociation(
086                            Object classPK, String associationClassName,
087                            Object associationClassPK)
088                    throws ModelListenerException {
089            }
090    
091            /**
092             * @throws ModelListenerException
093             */
094            public void onBeforeUpdate(T model) throws ModelListenerException {
095            }
096    
097    }