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


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

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

1.1.2.2
date	2001.02.01.17.49.45;	author dlr;	state Exp;
branches;
next	1.1.2.3;

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

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

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

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

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

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

1.1.2.9
date	2001.02.13.00.55.53;	author dlr;	state Exp;
branches;
next	1.1.2.10;

1.1.2.10
date	2001.02.13.03.03.05;	author dlr;	state Exp;
branches;
next	1.1.2.11;

1.1.2.11
date	2001.02.16.03.04.58;	author dlr;	state dead;
branches;
next	;


desc
@@


1.1
log
@file BaseProjectPeer.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 373
package org.tigris.helm.om.peer;

// JDK classes
import java.util.*;

// Village classes
import com.workingdogs.village.*;

// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.turbine.util.db.map.*;
import org.apache.turbine.util.db.pool.DBConnection;

import org.tigris.helm.om.Project;

// Local classes
import org.tigris.helm.om.map.*;
import org.tigris.helm.om.*;

/** This class was autogenerated by GenerateMapBuilder on: Fri Jan 26 19:21:34 PST 2001 */
public class BaseProjectPeer extends BasePeer
{
    /** the mapbuilder for this class */
    private static final ProjectMapBuilder mapBuilder = 
        (ProjectMapBuilder)getMapBuilder(ProjectMapBuilder.CLASS_NAME);

    /** the table name for this class */
    public static final String TABLE_NAME = mapBuilder.getTable();

    /** the column name for the PROJECT_ID field */
    public static final String PROJECT_ID = mapBuilder.getProject_ProjectId();
    /** the column name for the DOMAIN_ID field */
    public static final String DOMAIN_ID = mapBuilder.getProject_DomainId();
    /** the column name for the NAME field */
    public static final String NAME = mapBuilder.getProject_Name();
    /** the column name for the LICENSE field */
    public static final String LICENSE = mapBuilder.getProject_License();
    /** the column name for the SHORT_DESCRIPTION field */
    public static final String SHORT_DESCRIPTION = mapBuilder.getProject_ShortDescription();
    /** the column name for the LONG_DESCRIPTION field */
    public static final String LONG_DESCRIPTION = mapBuilder.getProject_LongDescription();
    /** the column name for the USE_INDEX field */
    public static final String USE_INDEX = mapBuilder.getProject_UseIndex();
    /** the column name for the STATUS field */
    public static final String STATUS = mapBuilder.getProject_Status();
    /** the column name for the PROFILE field */
    public static final String PROFILE = mapBuilder.getProject_Profile();
    /** the column name for the TYPE field */
    public static final String TYPE = mapBuilder.getProject_Type();
    /** the column name for the ALIAS_URL field */
    public static final String ALIAS_URL = mapBuilder.getProject_AliasUrl();
    /** the column name for the MEMBER_POLICY field */
    public static final String MEMBER_POLICY = mapBuilder.getProject_MemberPolicy();
    /** the column name for the PROPOSED_BY field */
    public static final String PROPOSED_BY = mapBuilder.getProject_ProposedBy();
    /** the column name for the APPROVED_BY field */
    public static final String APPROVED_BY = mapBuilder.getProject_ApprovedBy();
    /** the column name for the SKIN_ID field */
    public static final String SKIN_ID = mapBuilder.getProject_SkinId();
    /** the column name for the IS_PROPRIETARY field */
    public static final String IS_PROPRIETARY = mapBuilder.getProject_IsProprietary();

    /** number of columns for this peer */
    public static final int numColumns =  16;;

    /** Method to do inserts */
    public static Object doInsert( Criteria criteria ) throws Exception
    {
        criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
                                                                                                                                                                                                                                             return BasePeer.doInsert( criteria );
    }

    /** 
     * Method to do inserts.  This method is to be used during a transaction,
     * otherwise use the doInsert(Criteria) method.  It will take care of 
     * the connection details internally. 
     */
    public static Object doInsert( Criteria criteria, DBConnection dbCon ) throws Exception
    {
        criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
                                                                                                                                                                                                                                             return BasePeer.doInsert( criteria, dbCon );
    }

    /** Add all the columns needed to create a new object */
    public static void addSelectColumns (Criteria criteria) throws Exception
    {
            criteria.addSelectColumn( PROJECT_ID );
            criteria.addSelectColumn( DOMAIN_ID );
            criteria.addSelectColumn( NAME );
            criteria.addSelectColumn( LICENSE );
            criteria.addSelectColumn( SHORT_DESCRIPTION );
            criteria.addSelectColumn( LONG_DESCRIPTION );
            criteria.addSelectColumn( USE_INDEX );
            criteria.addSelectColumn( STATUS );
            criteria.addSelectColumn( PROFILE );
            criteria.addSelectColumn( TYPE );
            criteria.addSelectColumn( ALIAS_URL );
            criteria.addSelectColumn( MEMBER_POLICY );
            criteria.addSelectColumn( PROPOSED_BY );
            criteria.addSelectColumn( APPROVED_BY );
            criteria.addSelectColumn( SKIN_ID );
            criteria.addSelectColumn( IS_PROPRIETARY );
        }


    /** Create a new object of type cls from a resultset row starting
      * from a specified offset.  This is done so that you can select
      * other rows than just those needed for this object.  You may
      * for example want to create two objects from the same row.
      */
    public static Project row2Object (Record row, int offset, Class cls ) throws Exception
    {
        Project obj = (Project)cls.newInstance();
                                        obj.setProjectId(row.getValue(offset+0).asInt());
                                            obj.setDomainId(row.getValue(offset+1).asInt());
                                            obj.setName(row.getValue(offset+2).asString());
                                            obj.setLicense(row.getValue(offset+3).asString());
                                            obj.setShortDescription(row.getValue(offset+4).asString());
                                            obj.setLongDescription(row.getValue(offset+5).asString());
                                            obj.setUseIndex(row.getValue(offset+6).asString());
                                            obj.setStatus(row.getValue(offset+7).asString());
                                            obj.setProfile(row.getValue(offset+8).asString());
                                            obj.setType(row.getValue(offset+9).asString());
                                            obj.setAliasUrl(row.getValue(offset+10).asString());
                                            obj.setMemberPolicy(row.getValue(offset+11).asInt());
                                            obj.setProposedBy(row.getValue(offset+12).asInt());
                                            obj.setApprovedBy(row.getValue(offset+13).asInt());
                                            obj.setSkinId(row.getValue(offset+14).asInt());
                                            obj.setIsProprietary(row.getValue(offset+15).asString());
                                        obj.setModified(false);
                obj.setNew(false);
        return obj;
    }

    /** Method to do selects */
    public static Vector doSelect( Criteria criteria ) throws Exception
    {
        criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
        return doSelect (criteria,"org.tigris.helm.om.Project", null);
    }

    /** 
     * Method to do selects.  This method is to be used during a transaction,
     * otherwise use the doSelect(Criteria) method.  It will take care of 
     * the connection details internally. 
     */
    public static Vector doSelect( Criteria criteria, DBConnection dbCon ) throws Exception
    {
        criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
        return doSelect (criteria,"org.tigris.helm.om.Project", dbCon);
    }

    /** Method to do selects. The returned vector will have object
      * of className
      */
    public static Vector doSelect( Criteria criteria, String className, DBConnection dbCon) throws Exception
    {
        addSelectColumns ( criteria );

                                                                                                                                                                                                                                     
        // BasePeer returns a Vector of Value (Village) arrays.  The array
        // order follows the order columns were placed in the Select clause.
        Vector rows = null;
        if (dbCon == null)
        {
            rows = BasePeer.doSelect(criteria);
        }
        else
        {
            rows = BasePeer.doSelect(criteria, dbCon);
        }
        Vector results = new Vector();

        // populate the object(s)
        for ( int i=0; i<rows.size(); i++ )
        {
            Record row = (Record)rows.elementAt(i);
            results.add (row2Object (row,1,Class.forName (className)));
         }
         return results;
    }

    /**
     * Method to do updates. 
     *
     * @@param Criteria object containing data that is used to create the UPDATE statement.
     */
    public static void doUpdate(Criteria criteria) throws Exception
    {
        criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
        Criteria selectCriteria = new Criteria(2);
                                selectCriteria.put( PROJECT_ID, criteria.remove(PROJECT_ID) );
                                                                                                                                                                                                                                                                                                                                                                                BasePeer.doUpdate( selectCriteria, criteria );
    }

    /** 
     * Method to do updates.  This method is to be used during a transaction,
     * otherwise use the doUpdate(Criteria) method.  It will take care of 
     * the connection details internally. 
     *
     * @@param Criteria object containing data that is used to create the UPDATE statement.
     */
    public static void doUpdate(Criteria criteria, DBConnection dbCon) throws Exception
    {
         criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
         Criteria selectCriteria = new Criteria(2);
                                selectCriteria.put( PROJECT_ID, criteria.remove(PROJECT_ID) );
                                                                                                                                                                                                                                                                                                                                                                                BasePeer.doUpdate( selectCriteria, criteria, dbCon );
     }

    /** 
     * Method to do deletes.
     *
     * @@param Criteria object containing data that is used DELETE from database.
     */
     public static void doDelete(Criteria criteria) throws Exception
     {
         criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
                                                                                                                                                                                                                                              BasePeer.doDelete ( criteria );
     }

    /** 
     * Method to do deletes.  This method is to be used during a transaction,
     * otherwise use the doInsert(Criteria) method.  It will take care of 
     * the connection details internally. 
     *
     * @@param Criteria object containing data that is used DELETE from database.
     */
     public static void doDelete(Criteria criteria, DBConnection dbCon) throws Exception
     {
         criteria.setDbName(getMapBuilder().getDatabaseMap().getName());
                                                                                                                                                                                                                                              BasePeer.doDelete ( criteria, dbCon );
     }

    /** Method to do inserts */
    public static void doInsert( Project obj ) throws Exception
    {
                obj.setPrimaryKey(doInsert(buildCriteria(obj)));
                obj.setNew(false);
    }

    /**
     * @@param obj the data object to update in the database.
     */
    public static void doUpdate(Project obj) throws Exception
    {
        doUpdate(buildCriteria(obj));
    }
    /**
     * @@param obj the data object to delete in the database.
     */
    public static void doDelete(Project obj) throws Exception
    {
        doDelete(buildCriteria(obj));
    }

    /** 
     * Method to do inserts.  This method is to be used during a transaction,
     * otherwise use the doInsert(Project) method.  It will take 
     * care of the connection details internally. 
     *
     * @@param obj the data object to insert into the database.
     */
    public static void doInsert( Project obj, DBConnection dbCon) throws Exception
    {
                obj.setPrimaryKey(doInsert(buildCriteria(obj), dbCon));
                obj.setNew(false);
    }

    /**
     * Method to do update.  This method is to be used during a transaction,
     * otherwise use the doUpdate(Project) method.  It will take 
     * care of the connection details internally. 
     *
     * @@param obj the data object to update in the database.
     */
    public static void doUpdate(Project obj, DBConnection dbCon) throws Exception
    {
        doUpdate(buildCriteria(obj), dbCon);
    }
    /**
     * Method to delete.  This method is to be used during a transaction,
     * otherwise use the doDelete(Project) method.  It will take 
     * care of the connection details internally. 
     *
     * @@param obj the data object to delete in the database.
     */
    public static void doDelete(Project obj, DBConnection dbCon) throws Exception
    {
        doDelete(buildCriteria(obj), dbCon);
    }

    /** Build a Criteria object from the data object for this peer */
    public static Criteria buildCriteria( Project obj )
    {
        Criteria criteria = new Criteria();
                            if ( !obj.isNew() )
	                criteria.add( PROJECT_ID, obj.getProjectId() );
                                criteria.add( DOMAIN_ID, obj.getDomainId() );
                                criteria.add( NAME, obj.getName() );
                                criteria.add( LICENSE, obj.getLicense() );
                                criteria.add( SHORT_DESCRIPTION, obj.getShortDescription() );
                                criteria.add( LONG_DESCRIPTION, obj.getLongDescription() );
                                criteria.add( USE_INDEX, obj.getUseIndex() );
                                criteria.add( STATUS, obj.getStatus() );
                                criteria.add( PROFILE, obj.getProfile() );
                                criteria.add( TYPE, obj.getType() );
                                criteria.add( ALIAS_URL, obj.getAliasUrl() );
                                criteria.add( MEMBER_POLICY, obj.getMemberPolicy() );
                                criteria.add( PROPOSED_BY, obj.getProposedBy() );
                                criteria.add( APPROVED_BY, obj.getApprovedBy() );
                                criteria.add( SKIN_ID, obj.getSkinId() );
                                criteria.add( IS_PROPRIETARY, obj.getIsProprietary() );
                return criteria;
    }

    /** 
     * Retrieve a single object by pk where multiple PK's are separated
     * by colons
     *
     * @@param int project_id
     */
    public static Project retrieveById(Object pkid) 
        throws Exception
    {
        StringTokenizer stok = new StringTokenizer((String)pkid, ":");
        if ( stok.countTokens() < 1 )
        {   
            throw new TurbineException(
                "id tokens did not match number of primary keys" );
        }
           int project_id = Integer.parseInt(stok.nextToken());;

       return retrieveByPK(
             project_id
              );
    }

    /** 
     * Retrieve a single object by pk
     *
     * @@param int project_id
     */
    public static Project retrieveByPK(
                      int project_id
                                                                                                                                                                                                                 ) throws Exception
    {
        Criteria criteria = new Criteria();
                       if( project_id > 0 )
                  criteria.add( BaseProjectPeer.PROJECT_ID, project_id );
                                                                                                                                                        Vector ProjectVector = doSelect(criteria);
        if (ProjectVector.size() != 1)
        {
            throw new Exception("Failed to select one and only one row.");
        }
        else
        {
            return (Project) ProjectVector.firstElement();
        }
    }


}








@


1.1.2.2
log
@Mark these base peer classes as 'abstract class', rather than 'public class' to better note that their extensions should be used.
@
text
@d23 1
a23 1
abstract class BaseProjectPeer extends BasePeer
@


1.1.2.3
log
@Regenerated BasePeer extensions.
@
text
@a4 1
import java.math.*;
d22 1
a22 1
/** This class was autogenerated by GenerateMapBuilder on: Fri Feb 02 09:53:57 PST 2001 */
d71 1
a71 1
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d82 1
a82 1
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d140 1
a140 1
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d151 1
a151 1
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d192 1
a192 1
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d207 1
a207 1
         criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d220 1
a220 1
         criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d233 1
a233 1
         criteria.setDbName(mapBuilder.getDatabaseMap().getName());
d352 1
a352 1
                  criteria.add( ProjectPeer.PROJECT_ID, project_id );
@


1.1.2.4
log
@Regenerated BasePeer extensions.
@
text
@d23 1
a23 1
/** This class was autogenerated by GenerateMapBuilder on: Fri Feb 02 11:12:25 PST 2001 */
@


1.1.2.5
log
@Latest Torque generated code (simple object model).
@
text
@d23 2
a24 2
/** This class was autogenerated by GenerateMapBuilder on: Tue Feb 06 19:46:40 PST 2001 */
public abstract class BaseProjectPeer extends BasePeer
d194 1
a194 2
        Criteria selectCriteria = new
            Criteria(mapBuilder.getDatabaseMap().getName(), 2);
d208 2
a209 3
        criteria.setDbName(mapBuilder.getDatabaseMap().getName());
        Criteria selectCriteria = new
            Criteria(mapBuilder.getDatabaseMap().getName(), 2);
@


1.1.2.6
log
@Newest generated code (complex model this time).  Removed getUsers from Domain to side step decl conflict.
@
text
@d23 1
a23 1
/** This class was autogenerated by GenerateMapBuilder on: Wed Feb 07 12:45:09 PST 2001 */
a367 684
        
        
                       
     
          


   /**
    * selects a collection of Project objects pre-filled with their
    * Domain objects.
    */
    public static Vector doSelectJoinDomain(Criteria c)
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset = numColumns + 1;
        DomainPeer.addSelectColumns(c);

                                                                                                                                                                                                                                             
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
            Domain obj2 = DomainPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset, Class.forName("org.tigris.helm.om.Domain") );
            
            boolean newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Domain temp_obj2 = temp_obj1.getDomain();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjects();
                obj2.addProjects(obj1);
            }
            results.add(obj1);

        }

        return results;
    }
         
                               
     
          


   /**
    * selects a collection of Project objects pre-filled with their
    * User objects.
    */
    public static Vector doSelectJoinUserRelatedByProposedBy(Criteria c)
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset = numColumns + 1;
        UserPeer.addSelectColumns(c);

                                                                                                                                                                                                                                             
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
            User obj2 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset, Class.forName("org.tigris.helm.om.User") );
            
            boolean newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj2 = temp_obj1.getUserRelatedByProposedBy();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjectsRelatedByProposedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjectsRelatedByProposedBy();
                obj2.addProjectsRelatedByProposedBy(obj1);
            }
            results.add(obj1);

        }

        return results;
    }
         
                               
     
          


   /**
    * selects a collection of Project objects pre-filled with their
    * User objects.
    */
    public static Vector doSelectJoinUserRelatedByApprovedBy(Criteria c)
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset = numColumns + 1;
        UserPeer.addSelectColumns(c);

                                                                                                                                                                                                                                             
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
            User obj2 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset, Class.forName("org.tigris.helm.om.User") );
            
            boolean newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj2 = temp_obj1.getUserRelatedByApprovedBy();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjectsRelatedByApprovedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjectsRelatedByApprovedBy();
                obj2.addProjectsRelatedByApprovedBy(obj1);
            }
            results.add(obj1);

        }

        return results;
    }
         
                       
     
          


   /**
    * selects a collection of Project objects pre-filled with their
    * Skin objects.
    */
    public static Vector doSelectJoinSkin(Criteria c)
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset = numColumns + 1;
        SkinPeer.addSelectColumns(c);

                                                                                                                                                                                                                                             
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
            Skin obj2 = SkinPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset, Class.forName("org.tigris.helm.om.Skin") );
            
            boolean newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Skin temp_obj2 = temp_obj1.getSkin();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjects();
                obj2.addProjects(obj1);
            }
            results.add(obj1);

        }

        return results;
    }
    

  
  
     
                       
          


   /**
    * selects a collection of Project objects pre-filled with 
    * all related objects.
    */
    public static Vector doSelectJoinAllExceptDomain(Criteria c) 
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset2 = numColumns + 1;
                    
                                      
                UserPeer.addSelectColumns(c);
        int offset3 = offset2 + UserPeer.numColumns;
                                          
                UserPeer.addSelectColumns(c);
        int offset4 = offset3 + UserPeer.numColumns;
                                          
                SkinPeer.addSelectColumns(c);
        int offset5 = offset4 + SkinPeer.numColumns;
                                                                                                                                                                                                                                                                   
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
                    
                                  
                                                                
                        
                        User obj2 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset2, Class.forName("org.tigris.helm.om.User") );

            
             boolean  newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj2 = temp_obj1.getUserRelatedByProposedBy();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjectsRelatedByProposedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjectsRelatedByProposedBy();
                obj2.addProjectsRelatedByProposedBy(obj1);
            }
                        
                                                                
                        
                        User obj3 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset3, Class.forName("org.tigris.helm.om.User") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj3 = temp_obj1.getUserRelatedByApprovedBy();
                if ( temp_obj3.getPrimaryKey().equals(obj3.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj3.addProjectsRelatedByApprovedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj3.initProjectsRelatedByApprovedBy();
                obj3.addProjectsRelatedByApprovedBy(obj1);
            }
                        
                                                
                        
                        Skin obj4 = SkinPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset4, Class.forName("org.tigris.helm.om.Skin") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Skin temp_obj4 = temp_obj1.getSkin();
                if ( temp_obj4.getPrimaryKey().equals(obj4.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj4.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj4.initProjects();
                obj4.addProjects(obj1);
            }
                        results.add(obj1);

        }

        return results;
    }
 
     
                               
          


   /**
    * selects a collection of Project objects pre-filled with 
    * all related objects.
    */
    public static Vector doSelectJoinAllExceptUserRelatedByProposedBy(Criteria c) 
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset2 = numColumns + 1;
                    
                DomainPeer.addSelectColumns(c);
        int offset3 = offset2 + DomainPeer.numColumns;
                                          
                                      
                                      
                SkinPeer.addSelectColumns(c);
        int offset4 = offset3 + SkinPeer.numColumns;
                                                                                                                                                                                                                                                                   
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
                    
                                                
                        
                        Domain obj2 = DomainPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset2, Class.forName("org.tigris.helm.om.Domain") );

            
             boolean  newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Domain temp_obj2 = temp_obj1.getDomain();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjects();
                obj2.addProjects(obj1);
            }
                        
                                  
                                  
                                                
                        
                        Skin obj3 = SkinPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset3, Class.forName("org.tigris.helm.om.Skin") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Skin temp_obj3 = temp_obj1.getSkin();
                if ( temp_obj3.getPrimaryKey().equals(obj3.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj3.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj3.initProjects();
                obj3.addProjects(obj1);
            }
                        results.add(obj1);

        }

        return results;
    }
 
     
                               
          


   /**
    * selects a collection of Project objects pre-filled with 
    * all related objects.
    */
    public static Vector doSelectJoinAllExceptUserRelatedByApprovedBy(Criteria c) 
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset2 = numColumns + 1;
                    
                DomainPeer.addSelectColumns(c);
        int offset3 = offset2 + DomainPeer.numColumns;
                                          
                                      
                                      
                SkinPeer.addSelectColumns(c);
        int offset4 = offset3 + SkinPeer.numColumns;
                                                                                                                                                                                                                                                                   
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
                    
                                                
                        
                        Domain obj2 = DomainPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset2, Class.forName("org.tigris.helm.om.Domain") );

            
             boolean  newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Domain temp_obj2 = temp_obj1.getDomain();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjects();
                obj2.addProjects(obj1);
            }
                        
                                  
                                  
                                                
                        
                        Skin obj3 = SkinPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset3, Class.forName("org.tigris.helm.om.Skin") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Skin temp_obj3 = temp_obj1.getSkin();
                if ( temp_obj3.getPrimaryKey().equals(obj3.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj3.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj3.initProjects();
                obj3.addProjects(obj1);
            }
                        results.add(obj1);

        }

        return results;
    }
 
     
                       
          


   /**
    * selects a collection of Project objects pre-filled with 
    * all related objects.
    */
    public static Vector doSelectJoinAllExceptSkin(Criteria c) 
        throws Exception
    {
         c.setDbName(mapBuilder.getDatabaseMap().getName());

        addSelectColumns(c);
        int offset2 = numColumns + 1;
                    
                DomainPeer.addSelectColumns(c);
        int offset3 = offset2 + DomainPeer.numColumns;
                                          
                UserPeer.addSelectColumns(c);
        int offset4 = offset3 + UserPeer.numColumns;
                                          
                UserPeer.addSelectColumns(c);
        int offset5 = offset4 + UserPeer.numColumns;
                                          
                                                                                                                                                                                                                                                               
        Vector rows = BasePeer.doSelect(c);
        Vector results = new Vector();

        for (int i=0; i<rows.size(); i++)
        {
            Project obj1 = 
                row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            1, Class.forName("org.tigris.helm.om.Project") );
                    
                                                
                        
                        Domain obj2 = DomainPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset2, Class.forName("org.tigris.helm.om.Domain") );

            
             boolean  newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                Domain temp_obj2 = temp_obj1.getDomain();
                if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj2.addProjects(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj2.initProjects();
                obj2.addProjects(obj1);
            }
                        
                                                                
                        
                        User obj3 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset3, Class.forName("org.tigris.helm.om.User") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj3 = temp_obj1.getUserRelatedByProposedBy();
                if ( temp_obj3.getPrimaryKey().equals(obj3.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj3.addProjectsRelatedByProposedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj3.initProjectsRelatedByProposedBy();
                obj3.addProjectsRelatedByProposedBy(obj1);
            }
                        
                                                                
                        
                        User obj4 = UserPeer
                .row2Object((com.workingdogs.village.Record)rows.elementAt(i),
                            offset4, Class.forName("org.tigris.helm.om.User") );

            
             newObject = true;
            for (int j=0; j<results.size(); j++)
            {
                Project temp_obj1 = (Project)results.elementAt(j);
                User temp_obj4 = temp_obj1.getUserRelatedByApprovedBy();
                if ( temp_obj4.getPrimaryKey().equals(obj4.getPrimaryKey() ) )
                {
                    newObject = false;
                    temp_obj4.addProjectsRelatedByApprovedBy(obj1);
                    break;
                }
            }
            if (newObject)
            {
                obj4.initProjectsRelatedByApprovedBy();
                obj4.addProjectsRelatedByApprovedBy(obj1);
            }
                        
                                  results.add(obj1);

        }

        return results;
    }
  


    
    /** 
     * Retrieve objects by fk
     *
     * @@param int domain_id
     */
//    public static Vector retrieveByDomainId(int domain_id)
//    {
        
                        
    /** 
     * Retrieve objects by fk
     *
     * @@param int proposed_by
     */
//    public static Vector retrieveByProposedBy(int proposed_by)
//    {
        
    
    /** 
     * Retrieve objects by fk
     *
     * @@param int approved_by
     */
//    public static Vector retrieveByApprovedBy(int approved_by)
//    {
        
    
    /** 
     * Retrieve objects by fk
     *
     * @@param int skin_id
     */
//    public static Vector retrieveBySkinId(int skin_id)
//    {
        
    
@


1.1.2.7
log
@Torque autogen files.
@
text
@d23 1
a23 6
/**
  * This class was autogenerated by Torque on:
  *
  * [Thu Feb 08 17:56:55 PST 2001]
  *
  */
@


1.1.2.8
log
@New Torque-generated classes.  NewsItem replaces ProjectNews.
@
text
@d26 1
a26 1
  * [Fri Feb 09 15:29:27 PST 2001]
@


1.1.2.9
log
@New Torque-generated classes.
@
text
@d26 1
a26 1
  * [Mon Feb 12 16:46:43 PST 2001]
d56 2
d72 1
a72 41
    public static final int numColumns =  15;

    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_DEFAULT = 
        "org.tigris.helm.om.Project";

    /** the column name for the TYPE field */
    public static final String TYPE = mapBuilder.getProject_Type();

                                    
            /** A key representing a particular subclass */
    protected static final String CLASSKEY_GROUP = 
        "group";

    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_GROUP = 
        "org.tigris.helm.om.ProjectGroup";

            /** A key representing a particular subclass */
    protected static final String CLASSKEY_CATEGORY = 
        "category";

    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_CATEGORY = 
        "org.tigris.helm.om.Category";

            /** A key representing a particular subclass */
    protected static final String CLASSKEY_DOMAIN = 
        "domain";

    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_DOMAIN = 
        "org.tigris.helm.om.DomainGroup";

            /** A key representing a particular subclass */
    protected static final String CLASSKEY_HOST = 
        "host";

    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_HOST = 
        "org.tigris.helm.om.HostGroup";
a73 1
            
d78 1
a78 1
                                                                                                                                                                                                                               return BasePeer.doInsert( criteria );
d89 1
a89 1
                                                                                                                                                                                                                               return BasePeer.doInsert( criteria, dbCon );
d104 1
d114 25
a138 29
    /** 
     * Create a new object of type cls from a resultset row starting
     * from a specified offset.  This is done so that you can select
     * other rows than just those needed for this object.  You may
     * for example want to create two objects from the same row.
     */
    public static Project row2Object (Record row, 
                                              int offset, 
                                              String cls ) 
        throws Exception
    {
        Project obj = 
            (Project)Class.forName(cls).newInstance();
                                                        obj.setProjectId(row.getValue(offset+0).asInt());
                                                                            obj.setDomainId(row.getValue(offset+1).asInt());
                                                                            obj.setName(row.getValue(offset+2).asString());
                                                                            obj.setLicense(row.getValue(offset+3).asString());
                                                                            obj.setShortDescription(row.getValue(offset+4).asString());
                                                                            obj.setLongDescription(row.getValue(offset+5).asString());
                                                                            obj.setUseIndex(row.getValue(offset+6).asString());
                                                                            obj.setStatus(row.getValue(offset+7).asString());
                                                                            obj.setProfile(row.getValue(offset+8).asString());
                                                                            obj.setAliasUrl(row.getValue(offset+9).asString());
                                                                            obj.setMemberPolicy(row.getValue(offset+10).asInt());
                                                                            obj.setProposedBy(row.getValue(offset+11).asInt());
                                                                            obj.setApprovedBy(row.getValue(offset+12).asInt());
                                                                            obj.setSkinId(row.getValue(offset+13).asInt());
                                                                            obj.setIsProprietary(row.getValue(offset+14).asString());
                                                        obj.setModified(false);
d146 2
a147 10
        return populateObjects( doSelectVillageRecords(criteria) ); 
    }


    /** Method to do selects within a transaction */
    public static Vector doSelect( Criteria criteria, 
                                   DBConnection dbCon ) 
        throws Exception
    {
        return populateObjects( doSelectVillageRecords(criteria, dbCon) ); 
d151 3
a153 2
     * Grabs the raw Village records to be formed into objects.
     * This method handles connections internally 
d155 1
a155 2
    public static Vector doSelectVillageRecords( Criteria criteria ) 
        throws Exception
d158 1
a158 9
        if (criteria.getSelectColumns().size() == 0)
        {
            addSelectColumns ( criteria );
        }

                                                                                                                                                                                                                       
        // BasePeer returns a Vector of Value (Village) arrays.  The array
        // order follows the order columns were placed in the Select clause.
        return BasePeer.doSelect(criteria);
d161 4
a164 8

    /** 
     * Grabs the raw Village records to be formed into objects.
     * This method should be used for transactions 
     */
    public static Vector doSelectVillageRecords( Criteria criteria, 
                                                 DBConnection dbCon ) 
        throws Exception
d168 1
a168 1
                                                                                                                                                                                                                       
d171 10
a180 11
        return BasePeer.doSelect(criteria, dbCon);
    }

    /** 
     * The returned vector will contain objects of the default type or
     * objects that inherit from the default.
     */
    private static Vector populateObjects(Vector records) 
        throws Exception
    {
        Vector results = new Vector(records.size());
d183 1
a183 1
        for ( int i=0; i<records.size(); i++ )
d185 4
a188 28
            Record row = (Record)records.elementAt(i);

                String className = null;
            String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            results.add(row2Object( row, 1, className ));
            }
        return results;
d202 1
a202 1
                                                                                                                                                                                                                                                                                                                                                         BasePeer.doUpdate( selectCriteria, criteria );
d218 1
a218 1
                                                                                                                                                                                                                                                                                                                                                         BasePeer.doUpdate( selectCriteria, criteria, dbCon );
d229 1
a229 1
                                                                                                                                                                                                                                BasePeer.doDelete ( criteria );
d242 1
a242 1
                                                                                                                                                                                                                                BasePeer.doDelete ( criteria, dbCon );
d317 1
d356 1
a356 1
                                                                                                                                                                                                     ) throws Exception
d361 1
a361 1
                                                                                                                                               Vector ProjectVector = doSelect(criteria);
d393 1
a393 1
                                                                                                                                                                                                                               
d399 3
a401 28
            Record row = (Record)rows.elementAt(i);

                String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
    

d403 2
a404 2
                .row2Object(row, offset, 
                    DomainPeer.CLASSNAME_DEFAULT);
d448 1
a448 1
                                                                                                                                                                                                                               
d454 3
a456 46
            Record row = (Record)rows.elementAt(i);

                String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
    

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
d458 3
a460 2
                .row2Object(row, offset, className);
                
d503 1
a503 1
                                                                                                                                                                                                                               
d509 3
a511 46
            Record row = (Record)rows.elementAt(i);

                String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
    

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
d513 3
a515 2
                .row2Object(row, offset, className);
                
d558 1
a558 1
                                                                                                                                                                                                                               
d564 3
a566 28
            Record row = (Record)rows.elementAt(i);

                String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
    

d568 2
a569 2
                .row2Object(row, offset, 
                    SkinPeer.CLASSNAME_DEFAULT);
d624 1
a624 1
                                                                                                                                                                                                                                                     
d630 3
a632 27
            Record row = (Record)rows.elementAt(i);

                    String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
      
d637 4
a641 22

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            User obj2 = UserPeer
                .row2Object(row, offset2, className);
                
d662 4
a666 22

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            User obj3 = UserPeer
                .row2Object(row, offset3, className);
                
d687 3
a689 1
            
a690 3
            Skin obj4 = SkinPeer
                .row2Object(row, offset4, 
                    SkinPeer.CLASSNAME_DEFAULT);
d740 1
a740 1
                                                                                                                                                                                                                                                     
d746 3
a748 27
            Record row = (Record)rows.elementAt(i);

                    String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
      
d752 3
a754 1
            
a755 3
            Domain obj2 = DomainPeer
                .row2Object(row, offset2, 
                    DomainPeer.CLASSNAME_DEFAULT);
d779 3
a781 1
            
a782 3
            Skin obj3 = SkinPeer
                .row2Object(row, offset3, 
                    SkinPeer.CLASSNAME_DEFAULT);
d832 1
a832 1
                                                                                                                                                                                                                                                     
d838 3
a840 27
            Record row = (Record)rows.elementAt(i);

                    String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
      
d844 3
a846 1
            
a847 3
            Domain obj2 = DomainPeer
                .row2Object(row, offset2, 
                    DomainPeer.CLASSNAME_DEFAULT);
d871 3
a873 1
            
a874 3
            Skin obj3 = SkinPeer
                .row2Object(row, offset3, 
                    SkinPeer.CLASSNAME_DEFAULT);
d926 1
a926 1
                                                                                                                                                                                                                                                 
d932 3
a934 27
            Record row = (Record)rows.elementAt(i);

                    String className = null;
                        String classKey = row.getValue(TYPE)
                .asString();
                                        if (CLASSKEY_GROUP.equals(classKey))
                        {
                className = CLASSNAME_GROUP;
            }
                                            else if (CLASSKEY_CATEGORY.equals(classKey))
                        {
                className = CLASSNAME_CATEGORY;
            }
                                            else if (CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = CLASSNAME_DOMAIN;
            }
                                            else if (CLASSKEY_HOST.equals(classKey))
                        {
                className = CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            Project obj1 = row2Object( row, 1, className );
      
d938 3
a940 1
            
a941 3
            Domain obj2 = DomainPeer
                .row2Object(row, offset2, 
                    DomainPeer.CLASSNAME_DEFAULT);
d963 4
a967 22

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            User obj3 = UserPeer
                .row2Object(row, offset3, className);
                
d988 4
a992 22

                                 classKey = row.getValue(UserPeer.TYPE)
                .asString();
                                        if (UserPeer.CLASSKEY_GROUP.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_GROUP;
            }
                                            else if (UserPeer.CLASSKEY_DOMAIN.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_DOMAIN;
            }
                                            else if (UserPeer.CLASSKEY_HOST.equals(classKey))
                        {
                className = UserPeer.CLASSNAME_HOST;
            }
                                else
            {
                className = CLASSNAME_DEFAULT;
            }
            User obj4 = UserPeer
                .row2Object(row, offset4, className);
                
d1020 37
a1056 2


@


1.1.2.10
log
@Latest Torque-generated code to handle inheritance based on values in a database field column.
@
text
@d26 1
a26 1
  * [Mon Feb 12 19:03:25 PST 2001]
a55 2
    /** the column name for the TYPE field */
    public static final String TYPE = mapBuilder.getProject_Type();
d70 1
a70 1
    public static final int numColumns =  16;
d76 2
d81 1
a81 1
    public static final String CLASSKEY_GROUP = 
d85 1
a85 1
    public static final String CLASSNAME_GROUP = 
d89 1
a89 1
    public static final String CLASSKEY_CATEGORY = 
d93 1
a93 1
    public static final String CLASSNAME_CATEGORY = 
d97 1
a97 1
    public static final String CLASSKEY_DOMAIN = 
d101 2
a102 2
    public static final String CLASSNAME_DOMAIN = 
        "org.tigris.helm.om.DomainProjectGroup";
d105 1
a105 1
    public static final String CLASSKEY_HOST = 
d109 2
a110 2
    public static final String CLASSNAME_HOST = 
        "org.tigris.helm.om.HostProjectGroup";
d117 1
a117 1
                                                                                                                                                                                                                                             return BasePeer.doInsert( criteria );
d128 1
a128 1
                                                                                                                                                                                                                                             return BasePeer.doInsert( criteria, dbCon );
a142 1
            criteria.addSelectColumn( TYPE );
d165 16
a180 17
                                            obj.setProjectId(row.getValue(offset+0).asInt());
                                                    obj.setDomainId(row.getValue(offset+1).asInt());
                                                    obj.setName(row.getValue(offset+2).asString());
                                                    obj.setLicense(row.getValue(offset+3).asString());
                                                    obj.setShortDescription(row.getValue(offset+4).asString());
                                                    obj.setLongDescription(row.getValue(offset+5).asString());
                                                    obj.setUseIndex(row.getValue(offset+6).asString());
                                                    obj.setStatus(row.getValue(offset+7).asString());
                                                    obj.setProfile(row.getValue(offset+8).asString());
                                                    obj.setType(row.getValue(offset+9).asString());
                                                    obj.setAliasUrl(row.getValue(offset+10).asString());
                                                    obj.setMemberPolicy(row.getValue(offset+11).asInt());
                                                    obj.setProposedBy(row.getValue(offset+12).asInt());
                                                    obj.setApprovedBy(row.getValue(offset+13).asInt());
                                                    obj.setSkinId(row.getValue(offset+14).asInt());
                                                    obj.setIsProprietary(row.getValue(offset+15).asString());
                                            obj.setModified(false);
a181 1

d213 1
a213 1
                                                                                                                                                                                                                                     
d230 1
a230 1
                                                                                                                                                                                                                                     
d289 1
a289 1
                                                                                                                                                                                                                                                                                                                                                                                BasePeer.doUpdate( selectCriteria, criteria );
d305 1
a305 1
                                                                                                                                                                                                                                                                                                                                                                                BasePeer.doUpdate( selectCriteria, criteria, dbCon );
d316 1
a316 1
                                                                                                                                                                                                                                              BasePeer.doDelete ( criteria );
d321 1
a321 1
     * otherwise use the doDelete(Criteria) method.  It will take care of 
d329 1
a329 1
                                                                                                                                                                                                                                              BasePeer.doDelete ( criteria, dbCon );
d395 1
a395 1
    	                criteria.add( PROJECT_ID, obj.getProjectId() );
a403 1
                                criteria.add( TYPE, obj.getType() );
d442 1
a442 1
                                                                                                                                                                                                                 ) throws Exception
d447 1
a447 1
                                                                                                                                                        Vector ProjectVector = doSelect(criteria);
d479 1
a479 1
                                                                                                                                                                                                                                             
d559 1
a559 1
                                                                                                                                                                                                                                             
d656 1
a656 1
                                                                                                                                                                                                                                             
d753 1
a753 1
                                                                                                                                                                                                                                             
d844 1
a844 1
                                                                                                                                                                                                                                                                   
d1021 1
a1021 1
                                                                                                                                                                                                                                                                   
d1139 1
a1139 1
                                                                                                                                                                                                                                                                   
d1259 1
a1259 1
                                                                                                                                                                                                                                                               
@


1.1.2.11
log
@Deprecated by Torque modificaitons.
@
text
@@


