⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basemediatype.java

📁 jetspeed源代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jetspeed.om.dbregistry;import java.math.BigDecimal;import java.sql.Connection;import java.util.ArrayList;import java.util.Collections;import java.util.Date;import java.util.List;import org.apache.commons.lang.ObjectUtils;import org.apache.torque.TorqueException;import org.apache.torque.om.BaseObject;import org.apache.torque.om.ComboKey;import org.apache.torque.om.DateKey;import org.apache.torque.om.NumberKey;import org.apache.torque.om.ObjectKey;import org.apache.torque.om.SimpleKey;import org.apache.torque.om.StringKey;import org.apache.torque.om.Persistent;import org.apache.torque.util.Criteria;import org.apache.torque.util.Transaction;/** * This class was autogenerated by Torque on: * * [Thu Apr 22 15:30:48 PDT 2004] * * You should not use this class directly.  It should not even be * extended all references should be to Mediatype */public abstract class BaseMediatype extends BaseObject{    /** The Peer class */    private static final MediatypePeer peer =        new MediatypePeer();          /** The value for the id field */    private long id;          /** The value for the name field */    private String name;                                                                    /** The value for the hidden field */    private boolean hidden=false;          /** The value for the mimetype field */    private String mimetype;          /** The value for the role field */    private String role;          /** The value for the title field */    private String title;          /** The value for the description field */    private String description;          /** The value for the image field */    private String image;        /**     * Get the Id     * @return long     */    public long getId()    {        return id;    }                                                  /**     * Set the value of Id     */    public void setId(long v ) throws TorqueException    {                      if (this.id != v)              {            this.id = v;            setModified(true);        }                                                        // update associated PortletMediatype        if (collPortletMediatypes != null )        {            for (int i = 0; i < collPortletMediatypes.size(); i++)            {                ((PortletMediatype)collPortletMediatypes.get(i))                        .setMediaId(v);            }        }                      }      /**     * Get the Name     * @return String     */    public String getName()    {        return name;    }                            /**     * Set the value of Name     */    public void setName(String v )     {                      if (!ObjectUtils.equals(this.name, v))              {            this.name = v;            setModified(true);        }                            }      /**     * Get the Hidden     * @return boolean     */    public boolean getHidden()    {        return hidden;    }                            /**     * Set the value of Hidden     */    public void setHidden(boolean v )     {                      if (this.hidden != v)              {            this.hidden = v;            setModified(true);        }                            }      /**     * Get the Mimetype     * @return String     */    public String getMimetype()    {        return mimetype;    }                            /**     * Set the value of Mimetype     */    public void setMimetype(String v )     {                      if (!ObjectUtils.equals(this.mimetype, v))              {            this.mimetype = v;            setModified(true);        }                            }      /**     * Get the Role     * @return String     */    public String getRole()    {        return role;    }                            /**     * Set the value of Role     */    public void setRole(String v )     {                      if (!ObjectUtils.equals(this.role, v))              {            this.role = v;            setModified(true);        }                            }      /**     * Get the Title     * @return String     */    public String getTitle()    {        return title;    }                            /**     * Set the value of Title     */    public void setTitle(String v )     {                      if (!ObjectUtils.equals(this.title, v))              {            this.title = v;            setModified(true);        }                            }      /**     * Get the Description     * @return String     */    public String getDescription()    {        return description;    }                            /**     * Set the value of Description     */    public void setDescription(String v )     {                      if (!ObjectUtils.equals(this.description, v))              {            this.description = v;            setModified(true);        }                            }      /**     * Get the Image     * @return String     */    public String getImage()    {        return image;    }                            /**     * Set the value of Image     */    public void setImage(String v )     {                      if (!ObjectUtils.equals(this.image, v))              {            this.image = v;            setModified(true);        }                            }                                                           /**     * Collection to store aggregation of collPortletMediatypes     */    protected List collPortletMediatypes;    /**     * Temporary storage of collPortletMediatypes to save a possible db hit in     * the event objects are add to the collection, but the     * complete collection is never requested.     */    protected void initPortletMediatypes()    {        if (collPortletMediatypes == null)        {            collPortletMediatypes = new ArrayList();        }    }                /**     * Method called to associate a PortletMediatype object to this object     * through the PortletMediatype foreign key attribute     *     * @param PortletMediatype l     */    public void addPortletMediatype(PortletMediatype l) throws TorqueException    {        getPortletMediatypes().add(l);        l.setMediatype((Mediatype)this);    }    /**     * The criteria used to select the current contents of collPortletMediatypes     */    private Criteria lastPortletMediatypesCriteria = null;    /**     * If this collection has already been initialized, returns     * the collection. Otherwise returns the results of     * getPortletMediatypes(new Criteria())     */    public List getPortletMediatypes() throws TorqueException    {        if (collPortletMediatypes == null)        {            collPortletMediatypes = getPortletMediatypes(new Criteria(10));        }        return collPortletMediatypes;    }    /**     * If this collection has already been initialized with     * an identical criteria, it returns the collection.     * Otherwise if this Mediatype has previously     * been saved, it will retrieve related PortletMediatypes from storage.     * If this Mediatype is new, it will return     * an empty collection or the current collection, the criteria     * is ignored on a new object.     */    public List getPortletMediatypes(Criteria criteria) throws TorqueException    {        if (collPortletMediatypes == null)        {            if (isNew())            {               collPortletMediatypes = new ArrayList();            }            else            {                      criteria.add(PortletMediatypePeer.MEDIA_ID, getId() );                      collPortletMediatypes = PortletMediatypePeer.doSelect(criteria);            }        }        else        {            // criteria has no effect for a new object            if (!isNew())            {                // the following code is to determine if a new query is                // called for.  If the criteria is the same as the last                // one, just return the collection.                      criteria.add(PortletMediatypePeer.MEDIA_ID, getId() );                      if (!lastPortletMediatypesCriteria.equals(criteria))                {                    collPortletMediatypes = PortletMediatypePeer.doSelect(criteria);                }            }        }        lastPortletMediatypesCriteria = criteria;        return collPortletMediatypes;    }    /**     * If this collection has already been initialized, returns     * the collection. Otherwise returns the results of     * getPortletMediatypes(new Criteria(),Connection)     * This method takes in the Connection also as input so that     * referenced objects can also be obtained using a Connection     * that is taken as input     */    public List getPortletMediatypes(Connection con) throws TorqueException    {        if (collPortletMediatypes == null)        {            collPortletMediatypes = getPortletMediatypes(new Criteria(10),con);        }        return collPortletMediatypes;    }    /**     * If this collection has already been initialized with     * an identical criteria, it returns the collection.     * Otherwise if this Mediatype has previously     * been saved, it will retrieve related PortletMediatypes from storage.     * If this Mediatype is new, it will return     * an empty collection or the current collection, the criteria     * is ignored on a new object.     * This method takes in the Connection also as input so that     * referenced objects can also be obtained using a Connection     * that is taken as input     */    public List getPortletMediatypes(Criteria criteria,Connection con) throws TorqueException    {        if (collPortletMediatypes == null)        {            if (isNew())            {               collPortletMediatypes = new ArrayList();            }            else            {                       criteria.add(PortletMediatypePeer.MEDIA_ID, getId() );                       collPortletMediatypes = PortletMediatypePeer.doSelect(criteria,con);             }         }         else         {             // criteria has no effect for a new object             if (!isNew())             {                 // the following code is to determine if a new query is                 // called for.  If the criteria is the same as the last                 // one, just return the collection.                     criteria.add(PortletMediatypePeer.MEDIA_ID, getId() );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -