head	1.1;
access;
symbols
	HELM_PEER_PORT_BRANCH:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2001.01.28.01.18.22;	author dlr;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2001.01.28.01.18.22;	author dlr;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2001.02.01.02.56.58;	author leonardr;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2001.02.07.03.46.27;	author dlr;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2001.02.07.21.17.59;	author dlr;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2001.02.09.02.01.49;	author dlr;	state Exp;
branches;
next	1.1.2.6;

1.1.2.6
date	2001.02.09.23.25.38;	author dlr;	state Exp;
branches;
next	1.1.2.7;

1.1.2.7
date	2001.02.13.00.55.50;	author dlr;	state Exp;
branches;
next	1.1.2.8;

1.1.2.8
date	2001.02.13.03.03.01;	author dlr;	state Exp;
branches;
next	1.1.2.9;

1.1.2.9
date	2001.02.16.03.05.24;	author dlr;	state dead;
branches;
next	;


desc
@@


1.1
log
@file BaseProject.java was initially added on branch HELM_PEER_PORT_BRANCH.
@
text
@@


1.1.2.1
log
@Classes ported to the Turbine Peer system. -dlr and leonardr
@
text
@a0 548
package org.tigris.helm.om;

// JDK classes
import java.util.*;

// Turbine classes
import org.apache.turbine.om.BaseObject;
import org.apache.turbine.om.peer.BasePeer;
import org.tigris.helm.om.peer.*;
import org.apache.turbine.util.db.Criteria;
import org.apache.turbine.util.ObjectUtils;
import org.apache.turbine.util.Log;
import org.apache.turbine.util.db.pool.DBConnection;

/** 
 * This class was autogenerated by Torque on: Fri Jan 26 19:21:34 PST 2001
 * You should not use this class directly.  It should not even be
 * extended all references should be to Project 
 */
abstract class BaseProject extends BaseObject
{
    /** the value for the project_id field */
    private int project_id;
    /** the value for the domain_id field */
    private int domain_id;
    /** the value for the name field */
    private String name;
    /** the value for the license field */
    private String license;
    /** the value for the short_description field */
    private String short_description;
    /** the value for the long_description field */
    private String long_description;
    /** the value for the use_index field */
    private String use_index;
    /** the value for the status field */
    private String status;
    /** the value for the profile field */
    private String profile;
    /** the value for the type field */
    private String type;
    /** the value for the alias_url field */
    private String alias_url;
    /** the value for the member_policy field */
    private int member_policy;
    /** the value for the proposed_by field */
    private int proposed_by;
    /** the value for the approved_by field */
    private int approved_by;
    /** the value for the skin_id field */
    private int skin_id;
    /** the value for the is_proprietary field */
    private String is_proprietary;


    /**
     * Get the ProjectId
     * @@return int
     */
     public int getProjectId()
     {
          return project_id;
     }


    /**
     * Set the value of ProjectId
     */
     public void setProjectId(int v ) 
     {


           if (this.project_id != v)
           {
              this.project_id = v;
              setModified(true);
          }
     }
    /**
     * Get the DomainId
     * @@return int
     */
     public int getDomainId()
     {
          return domain_id;
     }


    /**
     * Set the value of DomainId
     */
     public void setDomainId(int v ) 
     {


           if (this.domain_id != v)
           {
              this.domain_id = v;
              setModified(true);
          }
     }
    /**
     * 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 License
     * @@return String
     */
     public String getLicense()
     {
          return license;
     }


    /**
     * Set the value of License
     */
     public void setLicense(String v ) 
     {


           if ( !ObjectUtils.equals(this.license, v) )
           {
              this.license = v;
              setModified(true);
          }
     }
    /**
     * Get the ShortDescription
     * @@return String
     */
     public String getShortDescription()
     {
          return short_description;
     }


    /**
     * Set the value of ShortDescription
     */
     public void setShortDescription(String v ) 
     {


           if ( !ObjectUtils.equals(this.short_description, v) )
           {
              this.short_description = v;
              setModified(true);
          }
     }
    /**
     * Get the LongDescription
     * @@return String
     */
     public String getLongDescription()
     {
          return long_description;
     }


    /**
     * Set the value of LongDescription
     */
     public void setLongDescription(String v ) 
     {


           if ( !ObjectUtils.equals(this.long_description, v) )
           {
              this.long_description = v;
              setModified(true);
          }
     }
    /**
     * Get the UseIndex
     * @@return String
     */
     public String getUseIndex()
     {
          return use_index;
     }


    /**
     * Set the value of UseIndex
     */
     public void setUseIndex(String v ) 
     {


           if ( !ObjectUtils.equals(this.use_index, v) )
           {
              this.use_index = v;
              setModified(true);
          }
     }
    /**
     * Get the Status
     * @@return String
     */
     public String getStatus()
     {
          return status;
     }


    /**
     * Set the value of Status
     */
     public void setStatus(String v ) 
     {


           if ( !ObjectUtils.equals(this.status, v) )
           {
              this.status = v;
              setModified(true);
          }
     }
    /**
     * Get the Profile
     * @@return String
     */
     public String getProfile()
     {
          return profile;
     }


    /**
     * Set the value of Profile
     */
     public void setProfile(String v ) 
     {


           if ( !ObjectUtils.equals(this.profile, v) )
           {
              this.profile = v;
              setModified(true);
          }
     }
    /**
     * Get the Type
     * @@return String
     */
     public String getType()
     {
          return type;
     }


    /**
     * Set the value of Type
     */
     public void setType(String v ) 
     {


           if ( !ObjectUtils.equals(this.type, v) )
           {
              this.type = v;
              setModified(true);
          }
     }
    /**
     * Get the AliasUrl
     * @@return String
     */
     public String getAliasUrl()
     {
          return alias_url;
     }


    /**
     * Set the value of AliasUrl
     */
     public void setAliasUrl(String v ) 
     {


           if ( !ObjectUtils.equals(this.alias_url, v) )
           {
              this.alias_url = v;
              setModified(true);
          }
     }
    /**
     * Get the MemberPolicy
     * @@return int
     */
     public int getMemberPolicy()
     {
          return member_policy;
     }


    /**
     * Set the value of MemberPolicy
     */
     public void setMemberPolicy(int v ) 
     {


           if (this.member_policy != v)
           {
              this.member_policy = v;
              setModified(true);
          }
     }
    /**
     * Get the ProposedBy
     * @@return int
     */
     public int getProposedBy()
     {
          return proposed_by;
     }


    /**
     * Set the value of ProposedBy
     */
     public void setProposedBy(int v ) 
     {


           if (this.proposed_by != v)
           {
              this.proposed_by = v;
              setModified(true);
          }
     }
    /**
     * Get the ApprovedBy
     * @@return int
     */
     public int getApprovedBy()
     {
          return approved_by;
     }


    /**
     * Set the value of ApprovedBy
     */
     public void setApprovedBy(int v ) 
     {


           if (this.approved_by != v)
           {
              this.approved_by = v;
              setModified(true);
          }
     }
    /**
     * Get the SkinId
     * @@return int
     */
     public int getSkinId()
     {
          return skin_id;
     }


    /**
     * Set the value of SkinId
     */
     public void setSkinId(int v ) 
     {


           if (this.skin_id != v)
           {
              this.skin_id = v;
              setModified(true);
          }
     }
    /**
     * Get the IsProprietary
     * @@return String
     */
     public String getIsProprietary()
     {
          return is_proprietary;
     }


    /**
     * Set the value of IsProprietary
     */
     public void setIsProprietary(String v ) 
     {


           if ( !ObjectUtils.equals(this.is_proprietary, v) )
           {
              this.is_proprietary = v;
              setModified(true);
          }
     }

 
    
     	

    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     */
    public void save() throws Exception
    {
 
        if (isModified())
        {
            if (isNew())
            {
                ProjectPeer.doInsert((Project)this);
                setNew(false);
            }
            else
            {
                ProjectPeer.doUpdate((Project)this);
            }
        }
      
     }

      /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.  This method
     * is meant to be used as part of a transaction, otherwise use
     * the save() method and the connection details will be handled
     * internally
     */
    public void save(DBConnection dbCon) throws Exception
    {
          if (isModified())
        {
            if (isNew())
            {
                ProjectPeer.doInsert((Project)this, dbCon);
            }
            else
            {
                ProjectPeer.doUpdate((Project)this, dbCon);
                setNew(false);
            }
        }

       }


    /** 
     * Set the Id using pk values.
     *
     * @@param int project_id
     */
    public void setPrimaryKey(
                      int project_id
                                                                                                                                                                                                                 ) 
    {
                     setProjectId(project_id);
                                                                                                                                                                                                    }

    /** 
     * Set the Id using a : separated String of pk values.
     */
    public void setPrimaryKey(Object id) throws Exception
    {
        StringTokenizer st = new StringTokenizer(id.toString(), ":");
                           setProjectId( Integer.parseInt(st.nextToken()) );
                                                                                                                                                                                                            }


    /** 
     * returns an id that differentiates this object from others
     * of its class.
     */
    public Object getPrimaryKey() 
    {
        return ""
                      + getProjectId()
                                                                                                                                                                                                                 ;
    } 

    /** 
     * returns an id that can be used to specify this object in
     * a query string.
     */
    public String getQueryOID() 
    {
        return "Project[" + getPrimaryKey() + "]";
    }

    /**
     * Makes a copy of this object.  
     * It creates a new object filling in the simple attributes.
      */
    public Project copy() throws Exception
    {
        Project copyObj = new Project();
         copyObj.setProjectId(project_id);
         copyObj.setDomainId(domain_id);
         copyObj.setName(name);
         copyObj.setLicense(license);
         copyObj.setShortDescription(short_description);
         copyObj.setLongDescription(long_description);
         copyObj.setUseIndex(use_index);
         copyObj.setStatus(status);
         copyObj.setProfile(profile);
         copyObj.setType(type);
         copyObj.setAliasUrl(alias_url);
         copyObj.setMemberPolicy(member_policy);
         copyObj.setProposedBy(proposed_by);
         copyObj.setApprovedBy(approved_by);
         copyObj.setSkinId(skin_id);
         copyObj.setIsProprietary(is_proprietary);
 
  
                        
        copyObj.setProjectId(NEW_ID);
                                                                                                                    return copyObj;
    }             

}
@


1.1.2.2
log
@Changes to generated classes.
@
text
@d20 1
a20 1
public abstract class BaseProject extends BaseObject
@


1.1.2.3
log
@Latest Torque generated code (simple object model).
@
text
@a4 1
import java.math.*;
d16 1
a16 1
 * This class was autogenerated by Torque on: Tue Feb 06 19:46:40 PST 2001
a426 101
    /**
     * Generate a Vector with field names.
     */
    static private Vector fieldNames_ = null;
    static public Vector getFieldNames()
    {
      if (fieldNames_ == null)
      {
        fieldNames_ = new Vector();
            fieldNames_.add("ProjectId");
            fieldNames_.add("DomainId");
            fieldNames_.add("Name");
            fieldNames_.add("License");
            fieldNames_.add("ShortDescription");
            fieldNames_.add("LongDescription");
            fieldNames_.add("UseIndex");
            fieldNames_.add("Status");
            fieldNames_.add("Profile");
            fieldNames_.add("Type");
            fieldNames_.add("AliasUrl");
            fieldNames_.add("MemberPolicy");
            fieldNames_.add("ProposedBy");
            fieldNames_.add("ApprovedBy");
            fieldNames_.add("SkinId");
            fieldNames_.add("IsProprietary");
          }
      return fieldNames_;
    }

    /**
     * Retrieves a field from the object by name passed in
     * as a String.
     */
    public Object getByName(String name)
    {
            if (name.equals("ProjectId"))
	{
	  	    return new Integer(getProjectId());
	  	}
            if (name.equals("DomainId"))
	{
	  	    return new Integer(getDomainId());
	  	}
            if (name.equals("Name"))
	{
	  	    return getName();
	  	}
            if (name.equals("License"))
	{
	  	    return getLicense();
	  	}
            if (name.equals("ShortDescription"))
	{
	  	    return getShortDescription();
	  	}
            if (name.equals("LongDescription"))
	{
	  	    return getLongDescription();
	  	}
            if (name.equals("UseIndex"))
	{
	  	    return getUseIndex();
	  	}
            if (name.equals("Status"))
	{
	  	    return getStatus();
	  	}
            if (name.equals("Profile"))
	{
	  	    return getProfile();
	  	}
            if (name.equals("Type"))
	{
	  	    return getType();
	  	}
            if (name.equals("AliasUrl"))
	{
	  	    return getAliasUrl();
	  	}
            if (name.equals("MemberPolicy"))
	{
	  	    return new Integer(getMemberPolicy());
	  	}
            if (name.equals("ProposedBy"))
	{
	  	    return new Integer(getProposedBy());
	  	}
            if (name.equals("ApprovedBy"))
	{
	  	    return new Integer(getApprovedBy());
	  	}
            if (name.equals("SkinId"))
	{
	  	    return new Integer(getSkinId());
	  	}
            if (name.equals("IsProprietary"))
	{
	  	    return getIsProprietary();
	  	}
            return null; 
    }
d543 1
a543 1
                       
d547 1
@


1.1.2.4
log
@Newest generated code (complex model this time).  Removed getUsers from Domain to side step decl conflict.
@
text
@d17 1
a17 1
 * This class was autogenerated by Torque on: Wed Feb 07 12:45:09 PST 2001
d66 1
a66 1
                            
d70 1
a70 1
     public void setProjectId(int v ) throws Exception
d72 1
a72 122
  
       
        
                
          // update associated Invitation
          if (collInvitations != null )
          {
              for (int i=0; i<collInvitations.size(); i++)
              {
                  ((Invitation)collInvitations.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated MailingList
          if (collMailingLists != null )
          {
              for (int i=0; i<collMailingLists.size(); i++)
              {
                  ((MailingList)collMailingLists.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated ProjectDocument
          if (collProjectDocuments != null )
          {
              for (int i=0; i<collProjectDocuments.size(); i++)
              {
                  ((ProjectDocument)collProjectDocuments.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated ProjectDownload
          if (collProjectDownloads != null )
          {
              for (int i=0; i<collProjectDownloads.size(); i++)
              {
                  ((ProjectDownload)collProjectDownloads.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated ProjectProjectgroup
          if (collProjectProjectgroupsRelatedByProjectId != null )
          {
              for (int i=0; i<collProjectProjectgroupsRelatedByProjectId.size(); i++)
              {
                  ((ProjectProjectgroup)collProjectProjectgroupsRelatedByProjectId.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated ProjectProjectgroup
          if (collProjectProjectgroupsRelatedByProjectGroupId != null )
          {
              for (int i=0; i<collProjectProjectgroupsRelatedByProjectGroupId.size(); i++)
              {
                  ((ProjectProjectgroup)collProjectProjectgroupsRelatedByProjectGroupId.get(i))
                      .setProjectGroupId(v);
              }
          }
            
        
                
          // update associated ProjectNews
          if (collProjectNewss != null )
          {
              for (int i=0; i<collProjectNewss.size(); i++)
              {
                  ((ProjectNews)collProjectNewss.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated ProjectSection
          if (collProjectSections != null )
          {
              for (int i=0; i<collProjectSections.size(); i++)
              {
                  ((ProjectSection)collProjectSections.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated UserProjectInterest
          if (collUserProjectInterests != null )
          {
              for (int i=0; i<collUserProjectInterests.size(); i++)
              {
                  ((UserProjectInterest)collUserProjectInterests.get(i))
                      .setProjectId(v);
              }
          }
            
        
                
          // update associated UserRoleProject
          if (collUserRoleProjects != null )
          {
              for (int i=0; i<collUserRoleProjects.size(); i++)
              {
                  ((UserRoleProject)collUserRoleProjects.get(i))
                      .setProjectId(v);
              }
          }
       
d89 1
a89 1
            
d93 1
a93 1
     public void setDomainId(int v ) throws Exception
d95 1
a95 7
                  if ( aDomain != null && !aDomain.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
d112 1
a112 1
        
d118 1
a118 2
  
  
d135 1
a135 1
        
d141 1
a141 2
  
  
d158 1
a158 1
        
d164 1
a164 2
  
  
d181 1
a181 1
        
d187 1
a187 2
  
  
d204 1
a204 1
        
d210 1
a210 2
  
  
d227 1
a227 1
        
d233 1
a233 2
  
  
d250 1
a250 1
        
d256 1
a256 2
  
  
d273 1
a273 1
        
d279 1
a279 2
  
  
d296 1
a296 1
        
d302 1
a302 2
  
  
d319 1
a319 1
        
d325 1
a325 2
  
  
d342 1
a342 1
            
d346 1
a346 1
     public void setProposedBy(int v ) throws Exception
d348 1
a348 7
                  if ( aUserRelatedByProposedBy != null && !aUserRelatedByProposedBy.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
d365 1
a365 1
            
d369 1
a369 1
     public void setApprovedBy(int v ) throws Exception
d371 1
a371 7
                  if ( aUserRelatedByApprovedBy != null && !aUserRelatedByApprovedBy.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
d388 1
a388 1
            
d392 1
a392 1
     public void setSkinId(int v ) throws Exception
d394 1
a394 7
                  if ( aSkin != null && !aSkin.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
d411 1
a411 1
        
d417 1
a417 2
  
  
d427 1
a427 5
 
   
             
   
   
d429 1
a429 3
     * Declares an association between this object and a Domain object
     *
     * @@param Domain v
d431 2
a432 2
    private Domain aDomain;
    public void setDomain(Domain v) throws Exception
d434 21
a454 21
        aDomain = null;
           setDomainId(v.getDomainId());
           aDomain = v;
    }

                     
    public Domain getDomain() throws Exception
    {
        if ( aDomain==null && (this.domain_id>0) )
        {
            aDomain = DomainPeer.retrieveByPK(this.domain_id);
            // The following can be used instead of the line above to
            // guarantee the related object contains a reference
            // to this object, but this level of coupling 
            // may be undesirable in many circumstances.
            // As it can lead to a db query with many results that may
            // never be used.  
            // Domain obj = DomainPeer.retrieveByPK(this.domain_id);
            // obj.addProjects(this);
        }
        return aDomain;
a456 5
 
   
                 
      
   
d458 2
a459 3
     * Declares an association between this object and a User object
     *
     * @@param User v
d461 1
a461 2
    private User aUserRelatedByProposedBy;
    public void setUserRelatedByProposedBy(User v) throws Exception
d463 65
a527 21
        aUserRelatedByProposedBy = null;
           setProposedBy(v.getUserId());
           aUserRelatedByProposedBy = v;
    }

                     
    public User getUserRelatedByProposedBy() throws Exception
    {
        if ( aUserRelatedByProposedBy==null && (this.proposed_by>0) )
        {
            aUserRelatedByProposedBy = UserPeer.retrieveByPK(this.proposed_by);
            // The following can be used instead of the line above to
            // guarantee the related object contains a reference
            // to this object, but this level of coupling 
            // may be undesirable in many circumstances.
            // As it can lead to a db query with many results that may
            // never be used.  
            // User obj = UserPeer.retrieveByPK(this.proposed_by);
            // obj.addProjectsRelatedByProposedBy(this);
        }
        return aUserRelatedByProposedBy;
d529 1
a530 5
 
   
                 
      
   
d532 2
a533 3
     * Declares an association between this object and a User object
     *
     * @@param User v
d535 1
a535 10
    private User aUserRelatedByApprovedBy;
    public void setUserRelatedByApprovedBy(User v) throws Exception
    {
        aUserRelatedByApprovedBy = null;
           setApprovedBy(v.getUserId());
           aUserRelatedByApprovedBy = v;
    }

                     
    public User getUserRelatedByApprovedBy() throws Exception
a536 15
        if ( aUserRelatedByApprovedBy==null && (this.approved_by>0) )
        {
            aUserRelatedByApprovedBy = UserPeer.retrieveByPK(this.approved_by);
            // The following can be used instead of the line above to
            // guarantee the related object contains a reference
            // to this object, but this level of coupling 
            // may be undesirable in many circumstances.
            // As it can lead to a db query with many results that may
            // never be used.  
            // User obj = UserPeer.retrieveByPK(this.approved_by);
            // obj.addProjectsRelatedByApprovedBy(this);
        }
        return aUserRelatedByApprovedBy;
    }

d538 1
a538 21
   
             
   
   
    /**
     * Declares an association between this object and a Skin object
     *
     * @@param Skin v
     */
    private Skin aSkin;
    public void setSkin(Skin v) throws Exception
    {
        aSkin = null;
           setSkinId(v.getSkinId());
           aSkin = v;
    }

                     
    public Skin getSkin() throws Exception
    {
        if ( aSkin==null && (this.skin_id>0) )
d540 9
a548 9
            aSkin = SkinPeer.retrieveByPK(this.skin_id);
            // The following can be used instead of the line above to
            // guarantee the related object contains a reference
            // to this object, but this level of coupling 
            // may be undesirable in many circumstances.
            // As it can lead to a db query with many results that may
            // never be used.  
            // Skin obj = SkinPeer.retrieveByPK(this.skin_id);
            // obj.addProjects(this);
a549 5
        return aSkin;
    }

    
                
d551 1
a551 10
    /**
     * Collection to store aggregation of collInvitations
     */
    private Vector collInvitations;
    /**
     * Temporary storage of collInvitations to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollInvitations;
d553 6
a558 11
    public void initInvitations()
    {
        if (collInvitations == null)
            collInvitations = new Vector();
    }

    /**
     * Method called to associate a Invitation object to this object
     * through the Invitation foreign key attribute
     *
     * @@param Invitation l
d560 1
a560 1
    public void addInvitations(Invitation l) throws Exception
d562 1
a562 2
        /*
        if (collInvitations == null)
d564 5
a568 1
            if (tempcollInvitations == null)
d570 2
a571 1
                tempcollInvitations = new Vector();
a572 1
            tempcollInvitations.add(l);
a573 8
        else
        {
            collInvitations.add(l);
        }
        */
        getInvitations().add(l);
        l.setProject((Project)this);
    }
d575 2
a576 4
    /**
     * The criteria used to select the current contents of collInvitations
     */
    private Criteria lastInvitationsCriteria = null;
d578 4
a581 4
    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getInvitations(new Criteria())
d583 3
a585 1
    public Vector getInvitations() throws Exception
d587 1
a587 2149
        if (collInvitations == null)
        {
            collInvitations = getInvitations(new Criteria(10));
        }
        return collInvitations;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related Invitations from storage.
     */
    public Vector getInvitations(Criteria criteria) throws Exception
    {
        if (collInvitations == null)
        {
            if ( isNew() ) 
            {
               collInvitations = new Vector();       
            } 
            else
            {
                   criteria.add(InvitationPeer.PROJECT_ID, getProjectId() );               
                   collInvitations = InvitationPeer.doSelect(criteria);
            }
/*
            if (tempcollInvitations != null)
            {
                for (int i=0; i<tempcollInvitations.size(); i++)
                {
                    collInvitations.add(tempcollInvitations.get(i));
                }
                tempcollInvitations = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(InvitationPeer.PROJECT_ID, getProjectId() );               
               if ( !lastInvitationsCriteria.equals(criteria)  )
            {
                collInvitations = InvitationPeer.doSelect(criteria);  
            }
        }
        lastInvitationsCriteria = criteria; 

        return collInvitations;
    }
   

        
      
         
          
                    
                
        
        
      



             
      
    /**
     * Collection to store aggregation of collMailingLists
     */
    private Vector collMailingLists;
    /**
     * Temporary storage of collMailingLists to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollMailingLists;

    public void initMailingLists()
    {
        if (collMailingLists == null)
            collMailingLists = new Vector();
    }

    /**
     * Method called to associate a MailingList object to this object
     * through the MailingList foreign key attribute
     *
     * @@param MailingList l
     */
    public void addMailingLists(MailingList l) throws Exception
    {
        /*
        if (collMailingLists == null)
        {
            if (tempcollMailingLists == null)
            {
                tempcollMailingLists = new Vector();
            }
            tempcollMailingLists.add(l);
        }
        else
        {
            collMailingLists.add(l);
        }
        */
        getMailingLists().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collMailingLists
     */
    private Criteria lastMailingListsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getMailingLists(new Criteria())
     */
    public Vector getMailingLists() throws Exception
    {
        if (collMailingLists == null)
        {
            collMailingLists = getMailingLists(new Criteria(10));
        }
        return collMailingLists;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related MailingLists from storage.
     */
    public Vector getMailingLists(Criteria criteria) throws Exception
    {
        if (collMailingLists == null)
        {
            if ( isNew() ) 
            {
               collMailingLists = new Vector();       
            } 
            else
            {
                   criteria.add(MailingListPeer.PROJECT_ID, getProjectId() );               
                   collMailingLists = MailingListPeer.doSelect(criteria);
            }
/*
            if (tempcollMailingLists != null)
            {
                for (int i=0; i<tempcollMailingLists.size(); i++)
                {
                    collMailingLists.add(tempcollMailingLists.get(i));
                }
                tempcollMailingLists = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(MailingListPeer.PROJECT_ID, getProjectId() );               
               if ( !lastMailingListsCriteria.equals(criteria)  )
            {
                collMailingLists = MailingListPeer.doSelect(criteria);  
            }
        }
        lastMailingListsCriteria = criteria; 

        return collMailingLists;
    }
   

        
      
         
          
                    
                
        
        
      



             
      
    /**
     * Collection to store aggregation of collProjectDocuments
     */
    private Vector collProjectDocuments;
    /**
     * Temporary storage of collProjectDocuments to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectDocuments;

    public void initProjectDocuments()
    {
        if (collProjectDocuments == null)
            collProjectDocuments = new Vector();
    }

    /**
     * Method called to associate a ProjectDocument object to this object
     * through the ProjectDocument foreign key attribute
     *
     * @@param ProjectDocument l
     */
    public void addProjectDocuments(ProjectDocument l) throws Exception
    {
        /*
        if (collProjectDocuments == null)
        {
            if (tempcollProjectDocuments == null)
            {
                tempcollProjectDocuments = new Vector();
            }
            tempcollProjectDocuments.add(l);
        }
        else
        {
            collProjectDocuments.add(l);
        }
        */
        getProjectDocuments().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectDocuments
     */
    private Criteria lastProjectDocumentsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectDocuments(new Criteria())
     */
    public Vector getProjectDocuments() throws Exception
    {
        if (collProjectDocuments == null)
        {
            collProjectDocuments = getProjectDocuments(new Criteria(10));
        }
        return collProjectDocuments;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDocuments from storage.
     */
    public Vector getProjectDocuments(Criteria criteria) throws Exception
    {
        if (collProjectDocuments == null)
        {
            if ( isNew() ) 
            {
               collProjectDocuments = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
                   collProjectDocuments = ProjectDocumentPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectDocuments != null)
            {
                for (int i=0; i<tempcollProjectDocuments.size(); i++)
                {
                    collProjectDocuments.add(tempcollProjectDocuments.get(i));
                }
                tempcollProjectDocuments = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDocumentsCriteria.equals(criteria)  )
            {
                collProjectDocuments = ProjectDocumentPeer.doSelect(criteria);  
            }
        }
        lastProjectDocumentsCriteria = criteria; 

        return collProjectDocuments;
    }
     

        
      
         
          
                    
                
        
        
       
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDocuments from storage.
     */
    public Vector getProjectDocumentsJoinUserRelatedBySuggestedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectDocuments == null)
        {
            if ( isNew() ) 
            {
               collProjectDocuments = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
                   collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDocumentsCriteria.equals(criteria)  )
            {
                collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
        }
        lastProjectDocumentsCriteria = criteria; 

        return collProjectDocuments;
    }
      
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDocuments from storage.
     */
    public Vector getProjectDocumentsJoinUserRelatedByApprovedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectDocuments == null)
        {
            if ( isNew() ) 
            {
               collProjectDocuments = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
                   collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDocumentPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDocumentsCriteria.equals(criteria)  )
            {
                collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
        }
        lastProjectDocumentsCriteria = criteria; 

        return collProjectDocuments;
    }
     



             
      
    /**
     * Collection to store aggregation of collProjectDownloads
     */
    private Vector collProjectDownloads;
    /**
     * Temporary storage of collProjectDownloads to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectDownloads;

    public void initProjectDownloads()
    {
        if (collProjectDownloads == null)
            collProjectDownloads = new Vector();
    }

    /**
     * Method called to associate a ProjectDownload object to this object
     * through the ProjectDownload foreign key attribute
     *
     * @@param ProjectDownload l
     */
    public void addProjectDownloads(ProjectDownload l) throws Exception
    {
        /*
        if (collProjectDownloads == null)
        {
            if (tempcollProjectDownloads == null)
            {
                tempcollProjectDownloads = new Vector();
            }
            tempcollProjectDownloads.add(l);
        }
        else
        {
            collProjectDownloads.add(l);
        }
        */
        getProjectDownloads().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectDownloads
     */
    private Criteria lastProjectDownloadsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectDownloads(new Criteria())
     */
    public Vector getProjectDownloads() throws Exception
    {
        if (collProjectDownloads == null)
        {
            collProjectDownloads = getProjectDownloads(new Criteria(10));
        }
        return collProjectDownloads;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDownloads from storage.
     */
    public Vector getProjectDownloads(Criteria criteria) throws Exception
    {
        if (collProjectDownloads == null)
        {
            if ( isNew() ) 
            {
               collProjectDownloads = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
                   collProjectDownloads = ProjectDownloadPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectDownloads != null)
            {
                for (int i=0; i<tempcollProjectDownloads.size(); i++)
                {
                    collProjectDownloads.add(tempcollProjectDownloads.get(i));
                }
                tempcollProjectDownloads = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDownloadsCriteria.equals(criteria)  )
            {
                collProjectDownloads = ProjectDownloadPeer.doSelect(criteria);  
            }
        }
        lastProjectDownloadsCriteria = criteria; 

        return collProjectDownloads;
    }
     

        
      
         
          
                    
                
        
        
       
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDownloads from storage.
     */
    public Vector getProjectDownloadsJoinUserRelatedBySuggestedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectDownloads == null)
        {
            if ( isNew() ) 
            {
               collProjectDownloads = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
                   collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDownloadsCriteria.equals(criteria)  )
            {
                collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
        }
        lastProjectDownloadsCriteria = criteria; 

        return collProjectDownloads;
    }
      
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectDownloads from storage.
     */
    public Vector getProjectDownloadsJoinUserRelatedByApprovedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectDownloads == null)
        {
            if ( isNew() ) 
            {
               collProjectDownloads = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
                   collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectDownloadPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectDownloadsCriteria.equals(criteria)  )
            {
                collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
        }
        lastProjectDownloadsCriteria = criteria; 

        return collProjectDownloads;
    }
     



                 
      
    /**
     * Collection to store aggregation of collProjectProjectgroupsRelatedByProjectId
     */
    private Vector collProjectProjectgroupsRelatedByProjectId;
    /**
     * Temporary storage of collProjectProjectgroupsRelatedByProjectId to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectProjectgroupsRelatedByProjectId;

    public void initProjectProjectgroupsRelatedByProjectId()
    {
        if (collProjectProjectgroupsRelatedByProjectId == null)
            collProjectProjectgroupsRelatedByProjectId = new Vector();
    }

    /**
     * Method called to associate a ProjectProjectgroup object to this object
     * through the ProjectProjectgroup foreign key attribute
     *
     * @@param ProjectProjectgroup l
     */
    public void addProjectProjectgroupsRelatedByProjectId(ProjectProjectgroup l) throws Exception
    {
        /*
        if (collProjectProjectgroupsRelatedByProjectId == null)
        {
            if (tempcollProjectProjectgroupsRelatedByProjectId == null)
            {
                tempcollProjectProjectgroupsRelatedByProjectId = new Vector();
            }
            tempcollProjectProjectgroupsRelatedByProjectId.add(l);
        }
        else
        {
            collProjectProjectgroupsRelatedByProjectId.add(l);
        }
        */
        getProjectProjectgroupsRelatedByProjectId().add(l);
        l.setProjectRelatedByProjectId((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectProjectgroupsRelatedByProjectId
     */
    private Criteria lastProjectProjectgroupsRelatedByProjectIdCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectProjectgroupsRelatedByProjectId(new Criteria())
     */
    public Vector getProjectProjectgroupsRelatedByProjectId() throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectId == null)
        {
            collProjectProjectgroupsRelatedByProjectId = getProjectProjectgroupsRelatedByProjectId(new Criteria(10));
        }
        return collProjectProjectgroupsRelatedByProjectId;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectProjectgroupsRelatedByProjectId from storage.
     */
    public Vector getProjectProjectgroupsRelatedByProjectId(Criteria criteria) throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectId == null)
        {
            if ( isNew() ) 
            {
               collProjectProjectgroupsRelatedByProjectId = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectProjectgroupPeer.PROJECT_ID, getProjectId() );               
                   collProjectProjectgroupsRelatedByProjectId = ProjectProjectgroupPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectProjectgroupsRelatedByProjectId != null)
            {
                for (int i=0; i<tempcollProjectProjectgroupsRelatedByProjectId.size(); i++)
                {
                    collProjectProjectgroupsRelatedByProjectId.add(tempcollProjectProjectgroupsRelatedByProjectId.get(i));
                }
                tempcollProjectProjectgroupsRelatedByProjectId = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectProjectgroupPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectProjectgroupsRelatedByProjectIdCriteria.equals(criteria)  )
            {
                collProjectProjectgroupsRelatedByProjectId = ProjectProjectgroupPeer.doSelect(criteria);  
            }
        }
        lastProjectProjectgroupsRelatedByProjectIdCriteria = criteria; 

        return collProjectProjectgroupsRelatedByProjectId;
    }
    

        
      
         
              
                            
                
        
                        
       
      
         
              
                            
                
        
                
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectProjectgroupsRelatedByProjectId from storage.
     */
    public Vector getProjectProjectgroupsRelatedByProjectIdJoinProjectRelatedByProjectGroupId(Criteria criteria) 
        throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectId == null)
        {
            if ( isNew() ) 
            {
               collProjectProjectgroupsRelatedByProjectId = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectProjectgroupPeer.PROJECT_ID, getProjectId() );               
                   collProjectProjectgroupsRelatedByProjectId = ProjectProjectgroupPeer.doSelectJoinProjectRelatedByProjectGroupId(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectProjectgroupPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectProjectgroupsRelatedByProjectIdCriteria.equals(criteria)  )
            {
                collProjectProjectgroupsRelatedByProjectId = ProjectProjectgroupPeer.doSelectJoinProjectRelatedByProjectGroupId(criteria);
            }
        }
        lastProjectProjectgroupsRelatedByProjectIdCriteria = criteria; 

        return collProjectProjectgroupsRelatedByProjectId;
    }
     



                 
      
    /**
     * Collection to store aggregation of collProjectProjectgroupsRelatedByProjectGroupId
     */
    private Vector collProjectProjectgroupsRelatedByProjectGroupId;
    /**
     * Temporary storage of collProjectProjectgroupsRelatedByProjectGroupId to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectProjectgroupsRelatedByProjectGroupId;

    public void initProjectProjectgroupsRelatedByProjectGroupId()
    {
        if (collProjectProjectgroupsRelatedByProjectGroupId == null)
            collProjectProjectgroupsRelatedByProjectGroupId = new Vector();
    }

    /**
     * Method called to associate a ProjectProjectgroup object to this object
     * through the ProjectProjectgroup foreign key attribute
     *
     * @@param ProjectProjectgroup l
     */
    public void addProjectProjectgroupsRelatedByProjectGroupId(ProjectProjectgroup l) throws Exception
    {
        /*
        if (collProjectProjectgroupsRelatedByProjectGroupId == null)
        {
            if (tempcollProjectProjectgroupsRelatedByProjectGroupId == null)
            {
                tempcollProjectProjectgroupsRelatedByProjectGroupId = new Vector();
            }
            tempcollProjectProjectgroupsRelatedByProjectGroupId.add(l);
        }
        else
        {
            collProjectProjectgroupsRelatedByProjectGroupId.add(l);
        }
        */
        getProjectProjectgroupsRelatedByProjectGroupId().add(l);
        l.setProjectRelatedByProjectGroupId((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectProjectgroupsRelatedByProjectGroupId
     */
    private Criteria lastProjectProjectgroupsRelatedByProjectGroupIdCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectProjectgroupsRelatedByProjectGroupId(new Criteria())
     */
    public Vector getProjectProjectgroupsRelatedByProjectGroupId() throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectGroupId == null)
        {
            collProjectProjectgroupsRelatedByProjectGroupId = getProjectProjectgroupsRelatedByProjectGroupId(new Criteria(10));
        }
        return collProjectProjectgroupsRelatedByProjectGroupId;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectProjectgroupsRelatedByProjectGroupId from storage.
     */
    public Vector getProjectProjectgroupsRelatedByProjectGroupId(Criteria criteria) throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectGroupId == null)
        {
            if ( isNew() ) 
            {
               collProjectProjectgroupsRelatedByProjectGroupId = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectProjectgroupPeer.PROJECT_GROUP_ID, getProjectId() );               
                   collProjectProjectgroupsRelatedByProjectGroupId = ProjectProjectgroupPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectProjectgroupsRelatedByProjectGroupId != null)
            {
                for (int i=0; i<tempcollProjectProjectgroupsRelatedByProjectGroupId.size(); i++)
                {
                    collProjectProjectgroupsRelatedByProjectGroupId.add(tempcollProjectProjectgroupsRelatedByProjectGroupId.get(i));
                }
                tempcollProjectProjectgroupsRelatedByProjectGroupId = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectProjectgroupPeer.PROJECT_GROUP_ID, getProjectId() );               
               if ( !lastProjectProjectgroupsRelatedByProjectGroupIdCriteria.equals(criteria)  )
            {
                collProjectProjectgroupsRelatedByProjectGroupId = ProjectProjectgroupPeer.doSelect(criteria);  
            }
        }
        lastProjectProjectgroupsRelatedByProjectGroupIdCriteria = criteria; 

        return collProjectProjectgroupsRelatedByProjectGroupId;
    }
    

        
      
         
              
                            
                
        
                
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectProjectgroupsRelatedByProjectGroupId from storage.
     */
    public Vector getProjectProjectgroupsRelatedByProjectGroupIdJoinProjectRelatedByProjectId(Criteria criteria) 
        throws Exception
    {
        if (collProjectProjectgroupsRelatedByProjectGroupId == null)
        {
            if ( isNew() ) 
            {
               collProjectProjectgroupsRelatedByProjectGroupId = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectProjectgroupPeer.PROJECT_GROUP_ID, getProjectId() );               
                   collProjectProjectgroupsRelatedByProjectGroupId = ProjectProjectgroupPeer.doSelectJoinProjectRelatedByProjectId(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectProjectgroupPeer.PROJECT_GROUP_ID, getProjectId() );               
               if ( !lastProjectProjectgroupsRelatedByProjectGroupIdCriteria.equals(criteria)  )
            {
                collProjectProjectgroupsRelatedByProjectGroupId = ProjectProjectgroupPeer.doSelectJoinProjectRelatedByProjectId(criteria);
            }
        }
        lastProjectProjectgroupsRelatedByProjectGroupIdCriteria = criteria; 

        return collProjectProjectgroupsRelatedByProjectGroupId;
    }
      
      
         
              
                            
                
        
                        
      



             
      
    /**
     * Collection to store aggregation of collProjectNewss
     */
    private Vector collProjectNewss;
    /**
     * Temporary storage of collProjectNewss to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectNewss;

    public void initProjectNewss()
    {
        if (collProjectNewss == null)
            collProjectNewss = new Vector();
    }

    /**
     * Method called to associate a ProjectNews object to this object
     * through the ProjectNews foreign key attribute
     *
     * @@param ProjectNews l
     */
    public void addProjectNewss(ProjectNews l) throws Exception
    {
        /*
        if (collProjectNewss == null)
        {
            if (tempcollProjectNewss == null)
            {
                tempcollProjectNewss = new Vector();
            }
            tempcollProjectNewss.add(l);
        }
        else
        {
            collProjectNewss.add(l);
        }
        */
        getProjectNewss().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectNewss
     */
    private Criteria lastProjectNewssCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectNewss(new Criteria())
     */
    public Vector getProjectNewss() throws Exception
    {
        if (collProjectNewss == null)
        {
            collProjectNewss = getProjectNewss(new Criteria(10));
        }
        return collProjectNewss;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectNewss from storage.
     */
    public Vector getProjectNewss(Criteria criteria) throws Exception
    {
        if (collProjectNewss == null)
        {
            if ( isNew() ) 
            {
               collProjectNewss = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
                   collProjectNewss = ProjectNewsPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectNewss != null)
            {
                for (int i=0; i<tempcollProjectNewss.size(); i++)
                {
                    collProjectNewss.add(tempcollProjectNewss.get(i));
                }
                tempcollProjectNewss = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectNewssCriteria.equals(criteria)  )
            {
                collProjectNewss = ProjectNewsPeer.doSelect(criteria);  
            }
        }
        lastProjectNewssCriteria = criteria; 

        return collProjectNewss;
    }
     

        
      
         
          
                    
                
        
        
       
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectNewss from storage.
     */
    public Vector getProjectNewssJoinUserRelatedByProposedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectNewss == null)
        {
            if ( isNew() ) 
            {
               collProjectNewss = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
                   collProjectNewss = ProjectNewsPeer.doSelectJoinUserRelatedByProposedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectNewssCriteria.equals(criteria)  )
            {
                collProjectNewss = ProjectNewsPeer.doSelectJoinUserRelatedByProposedBy(criteria);
            }
        }
        lastProjectNewssCriteria = criteria; 

        return collProjectNewss;
    }
      
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectNewss from storage.
     */
    public Vector getProjectNewssJoinUserRelatedByApprovedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectNewss == null)
        {
            if ( isNew() ) 
            {
               collProjectNewss = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
                   collProjectNewss = ProjectNewsPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectNewsPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectNewssCriteria.equals(criteria)  )
            {
                collProjectNewss = ProjectNewsPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
        }
        lastProjectNewssCriteria = criteria; 

        return collProjectNewss;
    }
     



             
      
    /**
     * Collection to store aggregation of collProjectSections
     */
    private Vector collProjectSections;
    /**
     * Temporary storage of collProjectSections to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollProjectSections;

    public void initProjectSections()
    {
        if (collProjectSections == null)
            collProjectSections = new Vector();
    }

    /**
     * Method called to associate a ProjectSection object to this object
     * through the ProjectSection foreign key attribute
     *
     * @@param ProjectSection l
     */
    public void addProjectSections(ProjectSection l) throws Exception
    {
        /*
        if (collProjectSections == null)
        {
            if (tempcollProjectSections == null)
            {
                tempcollProjectSections = new Vector();
            }
            tempcollProjectSections.add(l);
        }
        else
        {
            collProjectSections.add(l);
        }
        */
        getProjectSections().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collProjectSections
     */
    private Criteria lastProjectSectionsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getProjectSections(new Criteria())
     */
    public Vector getProjectSections() throws Exception
    {
        if (collProjectSections == null)
        {
            collProjectSections = getProjectSections(new Criteria(10));
        }
        return collProjectSections;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectSections from storage.
     */
    public Vector getProjectSections(Criteria criteria) throws Exception
    {
        if (collProjectSections == null)
        {
            if ( isNew() ) 
            {
               collProjectSections = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
                   collProjectSections = ProjectSectionPeer.doSelect(criteria);
            }
/*
            if (tempcollProjectSections != null)
            {
                for (int i=0; i<tempcollProjectSections.size(); i++)
                {
                    collProjectSections.add(tempcollProjectSections.get(i));
                }
                tempcollProjectSections = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectSectionsCriteria.equals(criteria)  )
            {
                collProjectSections = ProjectSectionPeer.doSelect(criteria);  
            }
        }
        lastProjectSectionsCriteria = criteria; 

        return collProjectSections;
    }
      

        
      
      
          
                    
                    
        
        
       
      
         
          
                    
                
        
        
       
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectSections from storage.
     */
    public Vector getProjectSectionsJoinUserRelatedBySuggestedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectSections == null)
        {
            if ( isNew() ) 
            {
               collProjectSections = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
                   collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectSectionsCriteria.equals(criteria)  )
            {
                collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedBySuggestedBy(criteria);
            }
        }
        lastProjectSectionsCriteria = criteria; 

        return collProjectSections;
    }
      
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related ProjectSections from storage.
     */
    public Vector getProjectSectionsJoinUserRelatedByApprovedBy(Criteria criteria) 
        throws Exception
    {
        if (collProjectSections == null)
        {
            if ( isNew() ) 
            {
               collProjectSections = new Vector();       
            } 
            else
            {
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
                   collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(ProjectSectionPeer.PROJECT_ID, getProjectId() );               
               if ( !lastProjectSectionsCriteria.equals(criteria)  )
            {
                collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
        }
        lastProjectSectionsCriteria = criteria; 

        return collProjectSections;
    }
     



             
      
    /**
     * Collection to store aggregation of collUserProjectInterests
     */
    private Vector collUserProjectInterests;
    /**
     * Temporary storage of collUserProjectInterests to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollUserProjectInterests;

    public void initUserProjectInterests()
    {
        if (collUserProjectInterests == null)
            collUserProjectInterests = new Vector();
    }

    /**
     * Method called to associate a UserProjectInterest object to this object
     * through the UserProjectInterest foreign key attribute
     *
     * @@param UserProjectInterest l
     */
    public void addUserProjectInterests(UserProjectInterest l) throws Exception
    {
        /*
        if (collUserProjectInterests == null)
        {
            if (tempcollUserProjectInterests == null)
            {
                tempcollUserProjectInterests = new Vector();
            }
            tempcollUserProjectInterests.add(l);
        }
        else
        {
            collUserProjectInterests.add(l);
        }
        */
        getUserProjectInterests().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collUserProjectInterests
     */
    private Criteria lastUserProjectInterestsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getUserProjectInterests(new Criteria())
     */
    public Vector getUserProjectInterests() throws Exception
    {
        if (collUserProjectInterests == null)
        {
            collUserProjectInterests = getUserProjectInterests(new Criteria(10));
        }
        return collUserProjectInterests;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserProjectInterests from storage.
     */
    public Vector getUserProjectInterests(Criteria criteria) throws Exception
    {
        if (collUserProjectInterests == null)
        {
            if ( isNew() ) 
            {
               collUserProjectInterests = new Vector();       
            } 
            else
            {
                   criteria.add(UserProjectInterestPeer.PROJECT_ID, getProjectId() );               
                   collUserProjectInterests = UserProjectInterestPeer.doSelect(criteria);
            }
/*
            if (tempcollUserProjectInterests != null)
            {
                for (int i=0; i<tempcollUserProjectInterests.size(); i++)
                {
                    collUserProjectInterests.add(tempcollUserProjectInterests.get(i));
                }
                tempcollUserProjectInterests = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserProjectInterestPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserProjectInterestsCriteria.equals(criteria)  )
            {
                collUserProjectInterests = UserProjectInterestPeer.doSelect(criteria);  
            }
        }
        lastUserProjectInterestsCriteria = criteria; 

        return collUserProjectInterests;
    }
    

        
      
      
          
                    
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserProjectInterests from storage.
     */
    public Vector getUserProjectInterestsJoinUser(Criteria criteria) 
        throws Exception
    {
        if (collUserProjectInterests == null)
        {
            if ( isNew() ) 
            {
               collUserProjectInterests = new Vector();       
            } 
            else
            {
                   criteria.add(UserProjectInterestPeer.PROJECT_ID, getProjectId() );               
                   collUserProjectInterests = UserProjectInterestPeer.doSelectJoinUser(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserProjectInterestPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserProjectInterestsCriteria.equals(criteria)  )
            {
                collUserProjectInterests = UserProjectInterestPeer.doSelectJoinUser(criteria);
            }
        }
        lastUserProjectInterestsCriteria = criteria; 

        return collUserProjectInterests;
    }
      
      
         
          
                    
                
        
        
      



             
      
    /**
     * Collection to store aggregation of collUserRoleProjects
     */
    private Vector collUserRoleProjects;
    /**
     * Temporary storage of collUserRoleProjects to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
//    private Vector tempcollUserRoleProjects;

    public void initUserRoleProjects()
    {
        if (collUserRoleProjects == null)
            collUserRoleProjects = new Vector();
    }

    /**
     * Method called to associate a UserRoleProject object to this object
     * through the UserRoleProject foreign key attribute
     *
     * @@param UserRoleProject l
     */
    public void addUserRoleProjects(UserRoleProject l) throws Exception
    {
        /*
        if (collUserRoleProjects == null)
        {
            if (tempcollUserRoleProjects == null)
            {
                tempcollUserRoleProjects = new Vector();
            }
            tempcollUserRoleProjects.add(l);
        }
        else
        {
            collUserRoleProjects.add(l);
        }
        */
        getUserRoleProjects().add(l);
        l.setProject((Project)this);
    }

    /**
     * The criteria used to select the current contents of collUserRoleProjects
     */
    private Criteria lastUserRoleProjectsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of 
     * getUserRoleProjects(new Criteria())
     */
    public Vector getUserRoleProjects() throws Exception
    {
        if (collUserRoleProjects == null)
        {
            collUserRoleProjects = getUserRoleProjects(new Criteria(10));
        }
        return collUserRoleProjects;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserRoleProjects from storage.
     */
    public Vector getUserRoleProjects(Criteria criteria) throws Exception
    {
        if (collUserRoleProjects == null)
        {
            if ( isNew() ) 
            {
               collUserRoleProjects = new Vector();       
            } 
            else
            {
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
                   collUserRoleProjects = UserRoleProjectPeer.doSelect(criteria);
            }
/*
            if (tempcollUserRoleProjects != null)
            {
                for (int i=0; i<tempcollUserRoleProjects.size(); i++)
                {
                    collUserRoleProjects.add(tempcollUserRoleProjects.get(i));
                }
                tempcollUserRoleProjects = null;
            }
*/
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserRoleProjectsCriteria.equals(criteria)  )
            {
                collUserRoleProjects = UserRoleProjectPeer.doSelect(criteria);  
            }
        }
        lastUserRoleProjectsCriteria = criteria; 

        return collUserRoleProjects;
    }
      

        
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserRoleProjects from storage.
     */
    public Vector getUserRoleProjectsJoinUserRelatedByUserId(Criteria criteria) 
        throws Exception
    {
        if (collUserRoleProjects == null)
        {
            if ( isNew() ) 
            {
               collUserRoleProjects = new Vector();       
            } 
            else
            {
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
                   collUserRoleProjects = UserRoleProjectPeer.doSelectJoinUserRelatedByUserId(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserRoleProjectsCriteria.equals(criteria)  )
            {
                collUserRoleProjects = UserRoleProjectPeer.doSelectJoinUserRelatedByUserId(criteria);
            }
        }
        lastUserRoleProjectsCriteria = criteria; 

        return collUserRoleProjects;
    }
      
      
      
          
                    
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserRoleProjects from storage.
     */
    public Vector getUserRoleProjectsJoinRole(Criteria criteria) 
        throws Exception
    {
        if (collUserRoleProjects == null)
        {
            if ( isNew() ) 
            {
               collUserRoleProjects = new Vector();       
            } 
            else
            {
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
                   collUserRoleProjects = UserRoleProjectPeer.doSelectJoinRole(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserRoleProjectsCriteria.equals(criteria)  )
            {
                collUserRoleProjects = UserRoleProjectPeer.doSelectJoinRole(criteria);
            }
        }
        lastUserRoleProjectsCriteria = criteria; 

        return collUserRoleProjects;
    }
      
      
         
          
                    
                
        
        
       
      
      
              
                            
                
        
        
   
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection. 
     * Otherwise if this Project is new, it will return
     * an empty collection; or if this Project has previously
     * been saved, it will retrieve related UserRoleProjects from storage.
     */
    public Vector getUserRoleProjectsJoinUserRelatedByApprovedBy(Criteria criteria) 
        throws Exception
    {
        if (collUserRoleProjects == null)
        {
            if ( isNew() ) 
            {
               collUserRoleProjects = new Vector();       
            } 
            else
            {
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
                   collUserRoleProjects = UserRoleProjectPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
            
            
        }
        else
        {
            // 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.
            boolean newCriteria = true;
                   criteria.add(UserRoleProjectPeer.PROJECT_ID, getProjectId() );               
               if ( !lastUserRoleProjectsCriteria.equals(criteria)  )
            {
                collUserRoleProjects = UserRoleProjectPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
            }
        }
        lastUserRoleProjectsCriteria = criteria; 

        return collUserRoleProjects;
    }
     



     
    
    private static Vector fieldNames_ = null;

    /**
     * Generate a list of field names.
     */
    public static Vector getFieldNames()
    {
      if (fieldNames_ == null)
      {
        fieldNames_ = new Vector();
            fieldNames_.add("ProjectId");
            fieldNames_.add("DomainId");
            fieldNames_.add("Name");
            fieldNames_.add("License");
            fieldNames_.add("ShortDescription");
            fieldNames_.add("LongDescription");
            fieldNames_.add("UseIndex");
            fieldNames_.add("Status");
            fieldNames_.add("Profile");
            fieldNames_.add("Type");
            fieldNames_.add("AliasUrl");
            fieldNames_.add("MemberPolicy");
            fieldNames_.add("ProposedBy");
            fieldNames_.add("ApprovedBy");
            fieldNames_.add("SkinId");
            fieldNames_.add("IsProprietary");
          }
      return fieldNames_;
    }

    /**
     * Retrieves a field from the object by name passed in
     * as a String.
     */
    public Object getByName(String name)
    {
            if (name.equals("ProjectId"))
	{
	  	    return new Integer(getProjectId());
	  	}
            if (name.equals("DomainId"))
	{
	  	    return new Integer(getDomainId());
	  	}
            if (name.equals("Name"))
	{
	  	    return getName();
	  	}
            if (name.equals("License"))
	{
	  	    return getLicense();
	  	}
            if (name.equals("ShortDescription"))
	{
	  	    return getShortDescription();
	  	}
            if (name.equals("LongDescription"))
	{
	  	    return getLongDescription();
	  	}
            if (name.equals("UseIndex"))
	{
	  	    return getUseIndex();
	  	}
            if (name.equals("Status"))
	{
	  	    return getStatus();
	  	}
            if (name.equals("Profile"))
	{
	  	    return getProfile();
	  	}
            if (name.equals("Type"))
	{
	  	    return getType();
	  	}
            if (name.equals("AliasUrl"))
	{
	  	    return getAliasUrl();
	  	}
            if (name.equals("MemberPolicy"))
	{
	  	    return new Integer(getMemberPolicy());
	  	}
            if (name.equals("ProposedBy"))
	{
	  	    return new Integer(getProposedBy());
	  	}
            if (name.equals("ApprovedBy"))
	{
	  	    return new Integer(getApprovedBy());
	  	}
            if (name.equals("SkinId"))
	{
	  	    return new Integer(getSkinId());
	  	}
            if (name.equals("IsProprietary"))
	{
	  	    return getIsProprietary();
	  	}
            return null; 
    }
     	

    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     */
    public void save() throws Exception
    {
         DBConnection dbCon = null;
        try
        {
            dbCon = BasePeer.beginTransaction(
                ProjectPeer.getMapBuilder()
                .getDatabaseMap().getName());
            save(dbCon);
        }
        catch(Exception e)
        {
            BasePeer.rollBackTransaction(dbCon);
            throw e;
        }
        BasePeer.commitTransaction(dbCon);

     }

      // flag to prevent endless save loop, if this object is referenced
    // by another object which falls in this transaction.
    private boolean alreadyInSave = false;
      /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.  This method
     * is meant to be used as part of a transaction, otherwise use
     * the save() method and the connection details will be handled
     * internally
     */
    public void save(DBConnection dbCon) throws Exception
    {
        if (!alreadyInSave)
      {
        alreadyInSave = true;
          if (isModified())
        {
            if (isNew())
            {
                ProjectPeer.doInsert((Project)this, dbCon);
            }
            else
            {
                ProjectPeer.doUpdate((Project)this, dbCon);
                setNew(false);
            }
        }

                                    
                
          if (collInvitations != null )
          {
              for (int i=0; i<collInvitations.size(); i++)
              {
                  ((Invitation)collInvitations.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collMailingLists != null )
          {
              for (int i=0; i<collMailingLists.size(); i++)
              {
                  ((MailingList)collMailingLists.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collProjectDocuments != null )
          {
              for (int i=0; i<collProjectDocuments.size(); i++)
              {
                  ((ProjectDocument)collProjectDocuments.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collProjectDownloads != null )
          {
              for (int i=0; i<collProjectDownloads.size(); i++)
              {
                  ((ProjectDownload)collProjectDownloads.get(i)).save(dbCon);
              }
          }
                                                    
                
          if (collProjectProjectgroupsRelatedByProjectId != null )
          {
              for (int i=0; i<collProjectProjectgroupsRelatedByProjectId.size(); i++)
              {
                  ((ProjectProjectgroup)collProjectProjectgroupsRelatedByProjectId.get(i)).save(dbCon);
              }
          }
                                                    
                
          if (collProjectProjectgroupsRelatedByProjectGroupId != null )
          {
              for (int i=0; i<collProjectProjectgroupsRelatedByProjectGroupId.size(); i++)
              {
                  ((ProjectProjectgroup)collProjectProjectgroupsRelatedByProjectGroupId.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collProjectNewss != null )
          {
              for (int i=0; i<collProjectNewss.size(); i++)
              {
                  ((ProjectNews)collProjectNewss.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collProjectSections != null )
          {
              for (int i=0; i<collProjectSections.size(); i++)
              {
                  ((ProjectSection)collProjectSections.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collUserProjectInterests != null )
          {
              for (int i=0; i<collUserProjectInterests.size(); i++)
              {
                  ((UserProjectInterest)collUserProjectInterests.get(i)).save(dbCon);
              }
          }
                                        
                
          if (collUserRoleProjects != null )
          {
              for (int i=0; i<collUserRoleProjects.size(); i++)
              {
                  ((UserRoleProject)collUserRoleProjects.get(i)).save(dbCon);
              }
          }
                  alreadyInSave = false;
      }
      }

                                                                                                
    /** 
     * Set the Id using pk values.
     *
     * @@param int project_id
     */
    public void setPrimaryKey(
                      int project_id
                                                                                                                                                                                                                 ) throws Exception
    {
                     setProjectId(project_id);
a622 2
      * It then fills all the association collections and sets the
     * related objects to isNew=true.
d644 1
a644 71
                                  
                
         List v = copyObj.getInvitations();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getMailingLists();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getProjectDocuments();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getProjectDownloads();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                                     
                
         v = copyObj.getProjectProjectgroupsRelatedByProjectId();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                                     
                
         v = copyObj.getProjectProjectgroupsRelatedByProjectGroupId();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getProjectNewss();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getProjectSections();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getUserProjectInterests();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
                                         
                
         v = copyObj.getUserRoleProjects();
         for (int i=0; i<v.size(); i++)
         {
             ((BaseObject)v.get(i)).setNew(true);
         }
         
@


1.1.2.5
log
@Torque autogen files.
@
text
@d17 1
a17 4
 * This class was autogenerated by Torque on:
 *
 * [Thu Feb 08 17:56:55 PST 2001]
 *
@


1.1.2.6
log
@New Torque-generated classes.  NewsItem replaces ProjectNews.
@
text
@d19 1
a19 1
 * [Fri Feb 09 15:29:27 PST 2001]
d151 2
a152 2
          // update associated NewsItem
          if (collNewsItems != null )
d154 1
a154 1
              for (int i=0; i<collNewsItems.size(); i++)
d156 1
a156 1
                  ((NewsItem)collNewsItems.get(i))
d1778 1
a1778 1
     * Collection to store aggregation of collNewsItems
d1780 1
a1780 1
    private Vector collNewsItems;
d1782 1
a1782 1
     * Temporary storage of collNewsItems to save a possible db hit in
d1786 1
a1786 1
//    private Vector tempcollNewsItems;
d1788 1
a1788 1
    public void initNewsItems()
d1790 2
a1791 2
        if (collNewsItems == null)
            collNewsItems = new Vector();
d1795 2
a1796 2
     * Method called to associate a NewsItem object to this object
     * through the NewsItem foreign key attribute
d1798 1
a1798 1
     * @@param NewsItem l
d1800 1
a1800 1
    public void addNewsItems(NewsItem l) throws Exception
d1803 1
a1803 1
        if (collNewsItems == null)
d1805 1
a1805 1
            if (tempcollNewsItems == null)
d1807 1
a1807 1
                tempcollNewsItems = new Vector();
d1809 1
a1809 1
            tempcollNewsItems.add(l);
d1813 1
a1813 1
            collNewsItems.add(l);
d1816 1
a1816 1
        getNewsItems().add(l);
d1821 1
a1821 1
     * The criteria used to select the current contents of collNewsItems
d1823 1
a1823 1
    private Criteria lastNewsItemsCriteria = null;
d1828 1
a1828 1
     * getNewsItems(new Criteria())
d1830 1
a1830 1
    public Vector getNewsItems() throws Exception
d1832 1
a1832 1
        if (collNewsItems == null)
d1834 1
a1834 1
            collNewsItems = getNewsItems(new Criteria(10));
d1836 1
a1836 1
        return collNewsItems;
d1844 1
a1844 1
     * been saved, it will retrieve related NewsItems from storage.
d1846 1
a1846 1
    public Vector getNewsItems(Criteria criteria) throws Exception
d1848 1
a1848 1
        if (collNewsItems == null)
d1852 1
a1852 1
               collNewsItems = new Vector();       
d1856 2
a1857 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
                   collNewsItems = NewsItemPeer.doSelect(criteria);
d1860 1
a1860 1
            if (tempcollNewsItems != null)
d1862 1
a1862 1
                for (int i=0; i<tempcollNewsItems.size(); i++)
d1864 1
a1864 1
                    collNewsItems.add(tempcollNewsItems.get(i));
d1866 1
a1866 1
                tempcollNewsItems = null;
d1876 2
a1877 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
               if ( !lastNewsItemsCriteria.equals(criteria)  )
d1879 1
a1879 1
                collNewsItems = NewsItemPeer.doSelect(criteria);  
d1882 1
a1882 1
        lastNewsItemsCriteria = criteria; 
d1884 1
a1884 1
        return collNewsItems;
d1910 1
a1910 1
     * been saved, it will retrieve related NewsItems from storage.
d1912 1
a1912 1
    public Vector getNewsItemsJoinUserRelatedByProposedBy(Criteria criteria) 
d1915 1
a1915 1
        if (collNewsItems == null)
d1919 1
a1919 1
               collNewsItems = new Vector();       
d1923 2
a1924 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
                   collNewsItems = NewsItemPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d1935 2
a1936 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
               if ( !lastNewsItemsCriteria.equals(criteria)  )
d1938 1
a1938 1
                collNewsItems = NewsItemPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d1941 1
a1941 1
        lastNewsItemsCriteria = criteria; 
d1943 1
a1943 1
        return collNewsItems;
d1959 1
a1959 1
     * been saved, it will retrieve related NewsItems from storage.
d1961 1
a1961 1
    public Vector getNewsItemsJoinUserRelatedByApprovedBy(Criteria criteria) 
d1964 1
a1964 1
        if (collNewsItems == null)
d1968 1
a1968 1
               collNewsItems = new Vector();       
d1972 2
a1973 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
                   collNewsItems = NewsItemPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
d1984 2
a1985 2
                   criteria.add(NewsItemPeer.PROJECT_ID, getProjectId() );               
               if ( !lastNewsItemsCriteria.equals(criteria)  )
d1987 1
a1987 1
                collNewsItems = NewsItemPeer.doSelectJoinUserRelatedByApprovedBy(criteria);
d1990 1
a1990 1
        lastNewsItemsCriteria = criteria; 
d1992 1
a1992 1
        return collNewsItems;
d2888 1
a2888 1
          if (collNewsItems != null )
d2890 1
a2890 1
              for (int i=0; i<collNewsItems.size(); i++)
d2892 1
a2892 1
                  ((NewsItem)collNewsItems.get(i)).save(dbCon);
d3039 1
a3039 1
         v = copyObj.getNewsItems();
@


1.1.2.7
log
@New Torque-generated classes.
@
text
@d19 1
a19 1
 * [Mon Feb 12 16:46:43 PST 2001]
d44 2
d402 24
d1118 1
a1118 1
    public Vector getProjectDocumentsJoinUserRelatedByProposedBy(Criteria criteria) 
d1130 1
a1130 1
                   collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d1144 1
a1144 1
                collProjectDocuments = ProjectDocumentPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d1341 1
a1341 1
    public Vector getProjectDownloadsJoinUserRelatedByProposedBy(Criteria criteria) 
d1353 1
a1353 1
                   collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d1367 1
a1367 1
                collProjectDownloads = ProjectDownloadPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d2143 1
a2143 1
    public Vector getProjectSectionsJoinUserRelatedByProposedBy(Criteria criteria) 
d2155 1
a2155 1
                   collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d2169 1
a2169 1
                collProjectSections = ProjectSectionPeer.doSelectJoinUserRelatedByProposedBy(criteria);
d2696 1
d2749 4
d2926 1
a2926 1
                                                                                            
d2934 1
a2934 1
                                                                                                                                                                                                     ) throws Exception
d2937 1
a2937 1
                                                                                                                                                                                        }
d2946 1
a2946 1
                                                                                                                                                                                                }
d2957 1
a2957 1
                                                                                                                                                                                                     ;
d2987 1
d3068 1
a3068 1
                                                                                                             return copyObj;
@


1.1.2.8
log
@Latest Torque-generated code to handle inheritance based on values in a database field column.
@
text
@d19 1
a19 1
 * [Mon Feb 12 19:03:25 PST 2001]
a43 2
    /** the value for the type field */
    private String type;
a399 24
     * Get the Type
     * @@return String
     */
     public String getType()
     {
          return type;
     }

        
    /**
     * Set the value of Type
     */
     public void setType(String v ) 
     {
  
  

           if ( !ObjectUtils.equals(this.type, v) )
           {
              this.type = v;
              setModified(true);
          }
     }
    /**
a2669 1
            fieldNames_.add("Type");
a2721 4
            if (name.equals("Type"))
	{
	  	    return getType();
	  	}
d2895 1
a2895 1
                                                                                                
d2903 1
a2903 1
                                                                                                                                                                                                                 ) throws Exception
d2906 1
a2906 1
                                                                                                                                                                                                    }
d2915 1
a2915 1
                                                                                                                                                                                                            }
d2926 1
a2926 1
                                                                                                                                                                                                                 ;
a2955 1
         copyObj.setType(type);
d3036 1
a3036 1
                                                                                                                    return copyObj;
@


1.1.2.9
log
@Deprecated by Torque modifications.
@
text
@@


