001    /**
002     * Copyright (c) 2000-2010 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;
016    
017    import com.liferay.portal.kernel.annotation.AutoEscape;
018    import com.liferay.portal.service.ServiceContext;
019    
020    import com.liferay.portlet.expando.model.ExpandoBridge;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The base model interface for the Resource service. Represents a row in the "Resource_" database table, with each column mapped to a property of this class.
026     *
027     * <p>
028     * This interface and its corresponding implementation {@link com.liferay.portal.model.impl.ResourceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.portal.model.impl.ResourceImpl}.
029     * </p>
030     *
031     * <p>
032     * Never modify or reference this interface directly. All methods that expect a resource model instance should use the {@link Resource} interface instead.
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see Resource
037     * @see com.liferay.portal.model.impl.ResourceImpl
038     * @see com.liferay.portal.model.impl.ResourceModelImpl
039     * @generated
040     */
041    public interface ResourceModel extends BaseModel<Resource> {
042            /**
043             * Gets the primary key of this resource.
044             *
045             * @return the primary key of this resource
046             */
047            public long getPrimaryKey();
048    
049            /**
050             * Sets the primary key of this resource
051             *
052             * @param pk the primary key of this resource
053             */
054            public void setPrimaryKey(long pk);
055    
056            /**
057             * Gets the resource id of this resource.
058             *
059             * @return the resource id of this resource
060             */
061            public long getResourceId();
062    
063            /**
064             * Sets the resource id of this resource.
065             *
066             * @param resourceId the resource id of this resource
067             */
068            public void setResourceId(long resourceId);
069    
070            /**
071             * Gets the code id of this resource.
072             *
073             * @return the code id of this resource
074             */
075            public long getCodeId();
076    
077            /**
078             * Sets the code id of this resource.
079             *
080             * @param codeId the code id of this resource
081             */
082            public void setCodeId(long codeId);
083    
084            /**
085             * Gets the prim key of this resource.
086             *
087             * @return the prim key of this resource
088             */
089            @AutoEscape
090            public String getPrimKey();
091    
092            /**
093             * Sets the prim key of this resource.
094             *
095             * @param primKey the prim key of this resource
096             */
097            public void setPrimKey(String primKey);
098    
099            /**
100             * Gets a copy of this resource as an escaped model instance by wrapping it with an {@link com.liferay.portal.kernel.bean.AutoEscapeBeanHandler}.
101             *
102             * @return the escaped model instance
103             * @see com.liferay.portal.kernel.bean.AutoEscapeBeanHandler
104             */
105            public Resource toEscapedModel();
106    
107            public boolean isNew();
108    
109            public void setNew(boolean n);
110    
111            public boolean isCachedModel();
112    
113            public void setCachedModel(boolean cachedModel);
114    
115            public boolean isEscapedModel();
116    
117            public void setEscapedModel(boolean escapedModel);
118    
119            public Serializable getPrimaryKeyObj();
120    
121            public ExpandoBridge getExpandoBridge();
122    
123            public void setExpandoBridgeAttributes(ServiceContext serviceContext);
124    
125            public Object clone();
126    
127            public int compareTo(Resource resource);
128    
129            public int hashCode();
130    
131            public String toString();
132    
133            public String toXmlString();
134    }