Vector object, holds elements of type Table Data Object
This code was generated by E4S

 
package e4s.db.systabledef;

import e4s.application.applObject_Intf;
import e4s.db.dbConnectionDefault;
import e4s.db.dbConnection_Intf;
import e4s.db.dbException;
import e4s.util.e4sObject;
import java.util.Vector;

/**
 * Vector to hold access objects for T_D2S_COMPANY
 *
 * created:  20041222 105625
 * modified: 20070605 182630
 *
 * Hold Information about companies, users are related to companies.
 *
 * @see T_D2S_COMPANY_Obj
 * @see T_D2S_COMPANY_Sel
 * @see T_D2S_COMPANY_Mod
 */ 
public class T_D2S_COMPANY_Vec extends e4sObject
{
// ------------------------------------------------------------------
// -- this file was generated by e4s.db.dict.dbTable from the
// -- element4solution library. Do not place modifications here!
// -- http://www.element4solution.com
// -- (C)door2solution software gmbh
// ------------------------------------------------------------------

   private Vector m_vec = new Vector();

   /**
    * Create an empty instance
    */
   public T_D2S_COMPANY_Vec()
   {
   }

   /**
    * Create an instance, reading all elements of database table T_D2S_COMPANY.
    */
   public T_D2S_COMPANY_Vec(T_D2S_COMPANY_Sel T_D2S_COMPANY)
   throws dbException
   {
      T_D2S_COMPANY.executeQuery();

      while( T_D2S_COMPANY.next() )
         m_vec.addElement(T_D2S_COMPANY.get());

      T_D2S_COMPANY.close();
   }

   /**
    * Create an instance, reading all elements of database table T_D2S_COMPANY.
    */
   public T_D2S_COMPANY_Vec(dbConnection_Intf con, applObject_Intf applobj)
   throws dbException
   {
      T_D2S_COMPANY_Sel T_D2S_COMPANY = new T_D2S_COMPANY_Sel(con,applobj);
      T_D2S_COMPANY.executeQuery();

      while( T_D2S_COMPANY.next() )
         m_vec.addElement(T_D2S_COMPANY.get());

      T_D2S_COMPANY.close();
   }

   /**
    * Create an instance, reading all elements of database table T_D2S_COMPANY.
    */
   public T_D2S_COMPANY_Vec(applObject_Intf applobj)
   throws dbException
   {
      this(dbConnectionDefault.getInstance(),applobj);
   }

   /**
    * Get the number of elements in the vector.
    *
    * @return the size (element index goes from 0 to this value less 1).
    */
   public int size()
   {
      return m_vec.size();
   }

   /**
    * Get an element from the vector.
    *
    * @param i the position (0 .. {@link #size()} less 1).
    *
    * @ return the element at the specified position.
    */
   public T_D2S_COMPANY_Obj elementAt(int i)
   {
      return (T_D2S_COMPANY_Obj)m_vec.elementAt(i);
   }

   /**
    * Get an array of elements from the vector.
    *
    * @return an array of T_D2S_COMPANY_Obj elements or null if the vector is empty.
    */
   public T_D2S_COMPANY_Obj[] getElements()
   {
      T_D2S_COMPANY_Obj res[] = null;

      int sz = size();

      if (sz > 0)
      {
         res = new T_D2S_COMPANY_Obj[sz];

         for( int i = 0; i < sz; i++ )
            res[i] = (T_D2S_COMPANY_Obj)m_vec.elementAt(i);
      }

      return res;
   }

   /**
    * Add an element to the vector.
    *
    * @param T_D2S_COMPANY the element to be added.
    */
   public void addElement(T_D2S_COMPANY_Obj T_D2S_COMPANY)
   {
      m_vec.addElement(T_D2S_COMPANY);
   }

   /**
    * Add all elements to the vector.
    *
    * @param vT_D2S_COMPANY a vector with the elements to be added.
    */
   public void addElements(T_D2S_COMPANY_Vec vT_D2S_COMPANY)
   {
      if (vT_D2S_COMPANY != null)
      {
         int sz = vT_D2S_COMPANY.size();

	 for( int i = 0; i < sz; i++ )
            m_vec.addElement(vT_D2S_COMPANY.elementAt(i));
      }
   }

   /**
    * Removes all elements.
    */
   public void removeAllElements()
   {
      m_vec.removeAllElements();
   }
}