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