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.39;	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 BaseProjectProjectgroup.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 191
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 ProjectProject 
 */
abstract class BaseProjectProjectgroup extends BaseObject
{
    /** the value for the project_id field */
    private int project_id;
    /** the value for the project_group_id field */
    private int project_group_id;


    /**
     * 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 ProjectGroupId
     * @@return int
     */
     public int getProjectGroupId()
     {
          return project_group_id;
     }


    /**
     * Set the value of ProjectGroupId
     */
     public void setProjectGroupId(int v ) 
     {


           if (this.project_group_id != v)
           {
              this.project_group_id = 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())
            {
                ProjectProjectgroupPeer.doInsert((ProjectProjectgroup)this);
                setNew(false);
            }
            else
            {
                ProjectProjectgroupPeer.doUpdate((ProjectProjectgroup)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())
            {
                ProjectProjectgroupPeer.doInsert((ProjectProjectgroup)this, dbCon);
            }
            else
            {
                ProjectProjectgroupPeer.doUpdate((ProjectProjectgroup)this, dbCon);
                setNew(false);
            }
        }

       }


    /** 
     * Set the Id using pk values.
     *
     * @@param int project_id
     * @@param int project_group_id
     */
    public void setPrimaryKey(
                      int project_id
                                      , int project_group_id
                             ) 
    {
                     setProjectId(project_id);
                             setProjectGroupId(project_group_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()) );
                                          setProjectGroupId( Integer.parseInt(st.nextToken()) );
                        }


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

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

    /**
     * Makes a copy of this object.  
     * It creates a new object filling in the simple attributes.
      */
    public ProjectProjectgroup copy() throws Exception
    {
        ProjectProjectgroup copyObj = new ProjectProjectgroup();
         copyObj.setProjectId(project_id);
         copyObj.setProjectGroupId(project_group_id);
 
  
                        
        copyObj.setProjectId(NEW_ID);
                              
        copyObj.setProjectGroupId(NEW_ID);
           return copyObj;
    }             

}
@


1.1.2.2
log
@Changes to generated classes.
@
text
@d20 1
a20 1
public abstract class BaseProjectProjectgroup 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
d18 1
a18 1
 * extended all references should be to ProjectProjectgroup 
a76 31
    /**
     * 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("ProjectGroupId");
          }
      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("ProjectGroupId"))
	{
	  	    return new Integer(getProjectGroupId());
	  	}
            return null; 
    }
d172 18
@


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
d38 1
a38 1
            
d42 1
a42 1
     public void setProjectId(int v ) throws Exception
d44 1
a44 7
                  if ( aProjectRelatedByProjectId != null && !aProjectRelatedByProjectId.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
d61 1
a61 1
            
d65 1
a65 1
     public void setProjectGroupId(int v ) throws Exception
d67 1
a67 7
                  if ( aProjectRelatedByProjectGroupId != null && !aProjectRelatedByProjectGroupId.isNew())
        {
            throw new Exception("Can't set a foreign key directly after an "
                + " association is already made based on saved data.");
        }
  
  
a76 74
 
   
                 
      
   
    /**
     * Declares an association between this object and a Project object
     *
     * @@param Project v
     */
    private Project aProjectRelatedByProjectId;
    public void setProjectRelatedByProjectId(Project v) throws Exception
    {
        aProjectRelatedByProjectId = null;
           setProjectId(v.getProjectId());
           aProjectRelatedByProjectId = v;
    }

                     
    public Project getProjectRelatedByProjectId() throws Exception
    {
        if ( aProjectRelatedByProjectId==null && (this.project_id>0) )
        {
            aProjectRelatedByProjectId = ProjectPeer.retrieveByPK(this.project_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.  
            // Project obj = ProjectPeer.retrieveByPK(this.project_id);
            // obj.addProjectProjectgroupsRelatedByProjectId(this);
        }
        return aProjectRelatedByProjectId;
    }

 
   
                 
      
   
    /**
     * Declares an association between this object and a Project object
     *
     * @@param Project v
     */
    private Project aProjectRelatedByProjectGroupId;
    public void setProjectRelatedByProjectGroupId(Project v) throws Exception
    {
        aProjectRelatedByProjectGroupId = null;
           setProjectGroupId(v.getProjectId());
           aProjectRelatedByProjectGroupId = v;
    }

                     
    public Project getProjectRelatedByProjectGroupId() throws Exception
    {
        if ( aProjectRelatedByProjectGroupId==null && (this.project_group_id>0) )
        {
            aProjectRelatedByProjectGroupId = ProjectPeer.retrieveByPK(this.project_group_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.  
            // Project obj = ProjectPeer.retrieveByPK(this.project_group_id);
            // obj.addProjectProjectgroupsRelatedByProjectGroupId(this);
        }
        return aProjectRelatedByProjectGroupId;
    }

    
        
a77 2
    private static Vector fieldNames_ = null;

d79 1
a79 1
     * Generate a list of field names.
d81 2
a82 1
    public static Vector getFieldNames()
d117 2
a118 2
         DBConnection dbCon = null;
        try
d120 9
a128 4
            dbCon = BasePeer.beginTransaction(
                ProjectProjectgroupPeer.getMapBuilder()
                .getDatabaseMap().getName());
            save(dbCon);
d130 1
a130 7
        catch(Exception e)
        {
            BasePeer.rollBackTransaction(dbCon);
            throw e;
        }
        BasePeer.commitTransaction(dbCon);

a132 3
      // flag to prevent endless save loop, if this object is referenced
    // by another object which falls in this transaction.
    private boolean alreadyInSave = false;
a141 3
        if (!alreadyInSave)
      {
        alreadyInSave = true;
d155 2
a156 3
              alreadyInSave = false;
      }
      }
a157 1
                                        
d167 1
a167 1
                             ) throws Exception
@


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]
@


1.1.2.7
log
@New Torque-generated classes.
@
text
@d19 1
a19 1
 * [Mon Feb 12 16:46:43 PST 2001]
@


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]
@


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


