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.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            public T toEscapedModel() {
067                    throw new UnsupportedOperationException();
068            }
069    
070            private boolean _new;
071            private boolean _cachedModel;
072            private boolean _escapedModel;
073    
074    }