001    /**
002     * Copyright (c) 2000-2013 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.portlet.documentlibrary.model.impl;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    
019    import com.liferay.portlet.documentlibrary.model.DLFileVersion;
020    import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalServiceUtil;
021    
022    /**
023     * The extended model base implementation for the DLFileVersion service. Represents a row in the "DLFileVersion" database table, with each column mapped to a property of this class.
024     *
025     * <p>
026     * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link DLFileVersionImpl}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see DLFileVersionImpl
031     * @see com.liferay.portlet.documentlibrary.model.DLFileVersion
032     * @generated
033     */
034    public abstract class DLFileVersionBaseImpl extends DLFileVersionModelImpl
035            implements DLFileVersion {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * Never modify or reference this class directly. All methods that expect a document library file version model instance should use the {@link DLFileVersion} interface instead.
040             */
041            @Override
042            public void persist() throws SystemException {
043                    if (this.isNew()) {
044                            DLFileVersionLocalServiceUtil.addDLFileVersion(this);
045                    }
046                    else {
047                            DLFileVersionLocalServiceUtil.updateDLFileVersion(this);
048                    }
049            }
050    
051            @Override
052            public void updateTreePath(String treePath) throws SystemException {
053                    DLFileVersion dlFileVersion = this;
054    
055                    dlFileVersion.setTreePath(treePath);
056    
057                    DLFileVersionLocalServiceUtil.updateDLFileVersion(dlFileVersion);
058            }
059    }