001    /**
002     * Copyright (c) 2000-2011 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.model.CacheModel;
019    import com.liferay.portal.service.ServiceContext;
020    import com.liferay.portlet.expando.model.ExpandoBridge;
021    
022    /**
023     * The base implementation for all model classes. This class should never need
024     * to be used directly.
025     *
026     * @author Brian Wing Shun Chan
027     */
028    public abstract class BaseModelImpl<T> implements BaseModel<T> {
029    
030            public BaseModelImpl() {
031            }
032    
033            public boolean isNew() {
034                    return _new;
035            }
036    
037            public void setNew(boolean n) {
038                    _new = n;
039            }
040    
041            public boolean isCachedModel() {
042                    return _cachedModel;
043            }
044    
045            public void setCachedModel(boolean cachedModel) {
046                    _cachedModel = cachedModel;
047            }
048    
049            public boolean isEscapedModel() {
050                    return _escapedModel;
051            }
052    
053            public void setEscapedModel(boolean escapedModel) {
054                    _escapedModel = escapedModel;
055            }
056    
057            public ExpandoBridge getExpandoBridge() {
058                    throw new UnsupportedOperationException();
059            }
060    
061            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
062                    throw new UnsupportedOperationException();
063            }
064    
065            @Override
066            public abstract Object clone();
067    
068            public void resetOriginalValues() {
069            }
070    
071            public CacheModel<T> toCacheModel() {
072                    throw new UnsupportedOperationException();
073            }
074    
075            public T toEscapedModel() {
076                    throw new UnsupportedOperationException();
077            }
078    
079            private boolean _new;
080            private boolean _cachedModel;
081            private boolean _escapedModel;
082    
083    }