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