001    /**
002     * Copyright (c) 2000-present 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.portlet.documentlibrary.model.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.document.library.kernel.model.DLFileShortcut;
020    import com.liferay.document.library.kernel.service.DLFileShortcutLocalServiceUtil;
021    
022    /**
023     * The extended model base implementation for the DLFileShortcut service. Represents a row in the "DLFileShortcut" 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 DLFileShortcutImpl}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see DLFileShortcutImpl
031     * @see DLFileShortcut
032     * @generated
033     */
034    @ProviderType
035    public abstract class DLFileShortcutBaseImpl extends DLFileShortcutModelImpl
036            implements DLFileShortcut {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this class directly. All methods that expect a document library file shortcut model instance should use the {@link DLFileShortcut} interface instead.
041             */
042            @Override
043            public void persist() {
044                    if (this.isNew()) {
045                            DLFileShortcutLocalServiceUtil.addDLFileShortcut(this);
046                    }
047                    else {
048                            DLFileShortcutLocalServiceUtil.updateDLFileShortcut(this);
049                    }
050            }
051    
052            @Override
053            public void updateTreePath(String treePath) {
054                    DLFileShortcut dlFileShortcut = this;
055    
056                    dlFileShortcut.setTreePath(treePath);
057    
058                    DLFileShortcutLocalServiceUtil.updateDLFileShortcut(dlFileShortcut);
059            }
060    }