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.impl;
016    
017    import com.liferay.portal.model.BaseModel;
018    import com.liferay.portal.service.ServiceContext;
019    import com.liferay.portlet.expando.model.ExpandoBridge;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     */
024    public abstract class BaseModelImpl<T> implements BaseModel<T> {
025    
026            public BaseModelImpl() {
027            }
028    
029            public boolean isNew() {
030                    return _new;
031            }
032    
033            public void setNew(boolean n) {
034                    _new = n;
035            }
036    
037            public boolean isCachedModel() {
038                    return _cachedModel;
039            }
040    
041            public void setCachedModel(boolean cachedModel) {
042                    _cachedModel = cachedModel;
043            }
044    
045            public boolean isEscapedModel() {
046                    return _escapedModel;
047            }
048    
049            public void setEscapedModel(boolean escapedModel) {
050                    _escapedModel = escapedModel;
051            }
052    
053            public ExpandoBridge getExpandoBridge() {
054                    throw new UnsupportedOperationException();
055            }
056    
057            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
058                    throw new UnsupportedOperationException();
059            }
060    
061            public abstract Object clone();
062    
063            private boolean _new;
064            private boolean _cachedModel;
065            private boolean _escapedModel;
066    
067    }