001    /**
002     * Copyright (c) 2000-2010 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.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    }