Table Data Object, used by the
SQL SELECT class
and optionally used by Vector class
This code was generated by E4S
This code was generated by E4S
package e4s.db.systabledef;
import e4s.application.Client;
import e4s.application.CountryCode;
import e4s.application.applObject_Intf;
import e4s.db.dbColumnInfo;
import e4s.db.dbConnection_Intf;
import e4s.db.dbException;
import e4s.db.dbTableName;
import e4s.db.freefield.dbObjectFreefields;
import java.util.*;
/**
* Data access object for T_D2S_COMPANY
*
* created: 20041222 105625
* modified: 20070104 180629
*
*
* @see T_D2S_COMPANY_Sel
* @see T_D2S_COMPANY_Mod
*/
public class T_D2S_COMPANY_Obj extends dbObjectFreefields
{
// ------------------------------------------------------------------
// -- 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
// ------------------------------------------------------------------
/**
* Address Line #1
*/
public String m_ADDRESS01;
/**
* Address Line #2
*/
public String m_ADDRESS02;
/**
* Company belongs to another company (can be null or empty)
*/
public CompanyId m_BELONGS_TO;
/**
* City
*/
public String m_CITY;
/**
* Primary key, company - ID
*/
public CompanyId m_COMPANY_ID;
/**
* Countrycode
*/
public CountryCode m_COUNTRYCODE;
/**
* Date modified
*/
public java.util.Date m_DATMOD;
/**
* Date created
*/
public java.util.Date m_DATNEW;
/**
* Corporate E-Mail
*/
public String m_EMAIL;
/**
* GIS Latitude
*/
public float m_GIS_LATITUDE;
/**
* GIS Longitude
*/
public float m_GIS_LONGITUDE;
/**
* Belongs to Group
*/
public CompanyGroup m_GROUP_ID;
/**
* Name for login
*/
public String m_LOGIN_NAME;
/**
* Company Name
*/
public String m_NAME;
/**
* Phone #1
*/
public String m_PHONE01;
/**
* Phone #2
*/
public String m_PHONE02;
/**
* Remark
*/
public String m_REM;
/**
* VAT Number
*/
public String m_UID;
/**
* Valid until
*/
public java.util.Date m_VALID_UNTIL;
/**
* WWW Address
*/
public String m_WWW;
/**
* ZIP Code
*/
public String m_ZIPCODE;
/**
* Client distinction (no update, read only)
*/
protected Client m_client;
/*
* Get the value for client distinction.
*
* @return the client value
*/
public Client get_CLIENT()
{
return m_client;
}
/*
* Insert the data into the database table T_D2S_COMPANY.
*
* @param applobj a valid application object.
*
* @return the value for the ident field, if defined.
*
* @see #executeInsert(e4s.db.dbConnection_Intf,e4s.application.applObject_Intf)
* @see e4s.db.systabledef.T_D2S_COMPANY_Mod#executeInsert(e4s.application.applObject_Intf,T_D2S_COMPANY_Obj)
*/
public long executeInsert(applObject_Intf applobj)
throws dbException
{
return T_D2S_COMPANY_Mod.executeInsert(applobj,this);
}
/*
* Insert the data into the database table T_D2S_COMPANY.
*
* @param con a valid database connection.
* @param applobj a valid application object.
*
* @return the value for the ident field, if defined.
*
* @see #executeInsert(e4s.application.applObject_Intf)
* @see e4s.db.systabledef.T_D2S_COMPANY_Mod#executeInsert(e4s.db.dbConnection_Intf,e4s.application.applObject_Intf,T_D2S_COMPANY_Obj)
*/
public long executeInsert(dbConnection_Intf con, applObject_Intf applobj)
throws dbException
{
return T_D2S_COMPANY_Mod.executeInsert(con,applobj,this);
}
/*
* Get the table name.
*
* @return "T_D2S_COMPANY".
*/
public dbTableName getTableName()
{
return T_D2S_COMPANY_Sel.TABLENAME;
}
/*
* Setting the value for ADDRESS01.
* Address Line #1
*
* @param val the value to be assigned to ADDRESS01
*/
public void set_ADDRESS01(String val)
{
m_ADDRESS01 = val;
}
/*
* Get the value for ADDRESS01.
* Address Line #1
*
* @return the value associated with ADDRESS01
*/
public String get_ADDRESS01()
{
return m_ADDRESS01;
}
/*
* Setting the value for ADDRESS02.
* Address Line #2
*
* @param val the value to be assigned to ADDRESS02
*/
public void set_ADDRESS02(String val)
{
m_ADDRESS02 = val;
}
/*
* Get the value for ADDRESS02.
* Address Line #2
*
* @return the value associated with ADDRESS02
*/
public String get_ADDRESS02()
{
return m_ADDRESS02;
}
/*
* Setting the value for BELONGS_TO.
* Company belongs to another company (can be null or empty)
*
* @param val the value to be assigned to BELONGS_TO
*/
public void set_BELONGS_TO(CompanyId val)
{
m_BELONGS_TO = val;
}
/*
* Get the value for BELONGS_TO.
* Company belongs to another company (can be null or empty)
*
* @return the value associated with BELONGS_TO
*/
public CompanyId get_BELONGS_TO()
{
return m_BELONGS_TO;
}
/*
* Setting the value for CITY.
* City
*
* @param val the value to be assigned to CITY
*/
public void set_CITY(String val)
{
m_CITY = val;
}
/*
* Get the value for CITY.
* City
*
* @return the value associated with CITY
*/
public String get_CITY()
{
return m_CITY;
}
/*
* Setting the value for COMPANY_ID.
* Primary key, company - ID
*
* @param val the value to be assigned to COMPANY_ID
*/
public void set_COMPANY_ID(CompanyId val)
{
m_COMPANY_ID = val;
}
/*
* Get the value for COMPANY_ID.
* Primary key, company - ID
*
* @return the value associated with COMPANY_ID
*/
public CompanyId get_COMPANY_ID()
{
return m_COMPANY_ID;
}
/*
* Setting the value for COUNTRYCODE.
* Countrycode
*
* @param val the value to be assigned to COUNTRYCODE
*/
public void set_COUNTRYCODE(CountryCode val)
{
m_COUNTRYCODE = val;
}
/*
* Get the value for COUNTRYCODE.
* Countrycode
*
* @return the value associated with COUNTRYCODE
*/
public CountryCode get_COUNTRYCODE()
{
return m_COUNTRYCODE;
}
/*
* Setting the value for DATMOD.
* Date modified
*
* @param val the value to be assigned to DATMOD
*/
public void set_DATMOD(java.util.Date val)
{
m_DATMOD = val;
}
/*
* Setting the value for DATMOD.
* Date modified
*
* @param val the value to be assigned to DATMOD
*/
public void set_DATMOD(Calendar val)
{
m_DATMOD = (val == null ? null : val.getTime());
}
/*
* Setting the value for DATMOD to the current date/time.
* Date modified
*
* @param val the value to be assigned to DATMOD
*/
public void set_DATMOD()
{
set_DATMOD(new java.util.Date());
}
/*
* Get the value for DATMOD.
* Date modified
*
* @return the value associated with DATMOD
*/
public java.util.Date get_DATMOD()
{
return m_DATMOD;
}
/*
* Get the value for DATMOD.
* Date modified
*
* @return the value associated with DATMOD
*/
public Calendar get_DATMOD_C()
{
return Calendar(m_DATMOD);
}
/*
* Setting the value for DATNEW.
* Date created
*
* @param val the value to be assigned to DATNEW
*/
public void set_DATNEW(java.util.Date val)
{
m_DATNEW = val;
}
/*
* Setting the value for DATNEW.
* Date created
*
* @param val the value to be assigned to DATNEW
*/
public void set_DATNEW(Calendar val)
{
m_DATNEW = (val == null ? null : val.getTime());
}
/*
* Setting the value for DATNEW to the current date/time.
* Date created
*
* @param val the value to be assigned to DATNEW
*/
public void set_DATNEW()
{
set_DATNEW(new java.util.Date());
}
/*
* Get the value for DATNEW.
* Date created
*
* @return the value associated with DATNEW
*/
public java.util.Date get_DATNEW()
{
return m_DATNEW;
}
/*
* Get the value for DATNEW.
* Date created
*
* @return the value associated with DATNEW
*/
public Calendar get_DATNEW_C()
{
return Calendar(m_DATNEW);
}
/*
* Setting the value for EMAIL.
* Corporate E-Mail
*
* @param val the value to be assigned to EMAIL
*/
public void set_EMAIL(String val)
{
m_EMAIL = val;
}
/*
* Get the value for EMAIL.
* Corporate E-Mail
*
* @return the value associated with EMAIL
*/
public String get_EMAIL()
{
return m_EMAIL;
}
/*
* Setting the value for GIS_LATITUDE.
* GIS Latitude
*
* @param val the value to be assigned to GIS_LATITUDE
*/
public void set_GIS_LATITUDE(float val)
{
m_GIS_LATITUDE = val;
}
/*
* Get the value for GIS_LATITUDE.
* GIS Latitude
*
* @return the value associated with GIS_LATITUDE
*/
public float get_GIS_LATITUDE()
{
return m_GIS_LATITUDE;
}
/*
* Setting the value for GIS_LONGITUDE.
* GIS Longitude
*
* @param val the value to be assigned to GIS_LONGITUDE
*/
public void set_GIS_LONGITUDE(float val)
{
m_GIS_LONGITUDE = val;
}
/*
* Get the value for GIS_LONGITUDE.
* GIS Longitude
*
* @return the value associated with GIS_LONGITUDE
*/
public float get_GIS_LONGITUDE()
{
return m_GIS_LONGITUDE;
}
/*
* Setting the value for GROUP_ID.
* Belongs to Group
*
* @param val the value to be assigned to GROUP_ID
*/
public void set_GROUP_ID(CompanyGroup val)
{
m_GROUP_ID = val;
}
/*
* Get the value for GROUP_ID.
* Belongs to Group
*
* @return the value associated with GROUP_ID
*/
public CompanyGroup get_GROUP_ID()
{
return m_GROUP_ID;
}
/*
* Setting the value for LOGIN_NAME.
* Name for login
*
* @param val the value to be assigned to LOGIN_NAME
*/
public void set_LOGIN_NAME(String val)
{
m_LOGIN_NAME = val;
}
/*
* Get the value for LOGIN_NAME.
* Name for login
*
* @return the value associated with LOGIN_NAME
*/
public String get_LOGIN_NAME()
{
return m_LOGIN_NAME;
}
/*
* Setting the value for NAME.
* Company Name
*
* @param val the value to be assigned to NAME
*/
public void set_NAME(String val)
{
m_NAME = val;
}
/*
* Get the value for NAME.
* Company Name
*
* @return the value associated with NAME
*/
public String get_NAME()
{
return m_NAME;
}
/*
* Setting the value for PHONE01.
* Phone #1
*
* @param val the value to be assigned to PHONE01
*/
public void set_PHONE01(String val)
{
m_PHONE01 = val;
}
/*
* Get the value for PHONE01.
* Phone #1
*
* @return the value associated with PHONE01
*/
public String get_PHONE01()
{
return m_PHONE01;
}
/*
* Setting the value for PHONE02.
* Phone #2
*
* @param val the value to be assigned to PHONE02
*/
public void set_PHONE02(String val)
{
m_PHONE02 = val;
}
/*
* Get the value for PHONE02.
* Phone #2
*
* @return the value associated with PHONE02
*/
public String get_PHONE02()
{
return m_PHONE02;
}
/*
* Setting the value for REM.
* Remark
*
* @param val the value to be assigned to REM
*/
public void set_REM(String val)
{
m_REM = val;
}
/*
* Get the value for REM.
* Remark
*
* @return the value associated with REM
*/
public String get_REM()
{
return m_REM;
}
/*
* Setting the value for UID.
* VAT Number
*
* @param val the value to be assigned to UID
*/
public void set_UID(String val)
{
m_UID = val;
}
/*
* Get the value for UID.
* VAT Number
*
* @return the value associated with UID
*/
public String get_UID()
{
return m_UID;
}
/*
* Setting the value for VALID_UNTIL.
* Valid until
*
* @param val the value to be assigned to VALID_UNTIL
*/
public void set_VALID_UNTIL(java.util.Date val)
{
m_VALID_UNTIL = val;
}
/*
* Setting the value for VALID_UNTIL.
* Valid until
*
* @param val the value to be assigned to VALID_UNTIL
*/
public void set_VALID_UNTIL(Calendar val)
{
m_VALID_UNTIL = (val == null ? null : val.getTime());
}
/*
* Setting the value for VALID_UNTIL to the current date/time.
* Valid until
*
* @param val the value to be assigned to VALID_UNTIL
*/
public void set_VALID_UNTIL()
{
set_VALID_UNTIL(new java.util.Date());
}
/*
* Get the value for VALID_UNTIL.
* Valid until
*
* @return the value associated with VALID_UNTIL
*/
public java.util.Date get_VALID_UNTIL()
{
return m_VALID_UNTIL;
}
/*
* Get the value for VALID_UNTIL.
* Valid until
*
* @return the value associated with VALID_UNTIL
*/
public Calendar get_VALID_UNTIL_C()
{
return Calendar(m_VALID_UNTIL);
}
/*
* Setting the value for WWW.
* WWW Address
*
* @param val the value to be assigned to WWW
*/
public void set_WWW(String val)
{
m_WWW = val;
}
/*
* Get the value for WWW.
* WWW Address
*
* @return the value associated with WWW
*/
public String get_WWW()
{
return m_WWW;
}
/*
* Setting the value for ZIPCODE.
* ZIP Code
*
* @param val the value to be assigned to ZIPCODE
*/
public void set_ZIPCODE(String val)
{
m_ZIPCODE = val;
}
/*
* Get the value for ZIPCODE.
* ZIP Code
*
* @return the value associated with ZIPCODE
*/
public String get_ZIPCODE()
{
return m_ZIPCODE;
}
/*
* Compare the two objects, and get the names of the changed columns
*
* @param obj2 the other object to compare;
*
* @return an array of different columns, or null if nothing has changed
*/
public dbColumnInfo[] unequalsColumns(T_D2S_COMPANY_Obj obj2)
{
dbColumnInfo res[] = null;
if (obj2 != null)
{
Vector vec = new Vector();
String vADDRESS01 = obj2.get_ADDRESS01();
if (((m_ADDRESS01 == null) && (vADDRESS01 != null)) || ((m_ADDRESS01 != null) && ((vADDRESS01 == null) || (! m_ADDRESS01.equals(vADDRESS01)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_ADDRESS01);
String vADDRESS02 = obj2.get_ADDRESS02();
if (((m_ADDRESS02 == null) && (vADDRESS02 != null)) || ((m_ADDRESS02 != null) && ((vADDRESS02 == null) || (! m_ADDRESS02.equals(vADDRESS02)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_ADDRESS02);
CompanyId vBELONGS_TO = obj2.get_BELONGS_TO();
if (((m_BELONGS_TO == null) && (vBELONGS_TO != null)) || ((m_BELONGS_TO != null) && ((vBELONGS_TO == null) || (! m_BELONGS_TO.equals(vBELONGS_TO)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_BELONGS_TO);
String vCITY = obj2.get_CITY();
if (((m_CITY == null) && (vCITY != null)) || ((m_CITY != null) && ((vCITY == null) || (! m_CITY.equals(vCITY)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_CITY);
CompanyId vCOMPANY_ID = obj2.get_COMPANY_ID();
if (((m_COMPANY_ID == null) && (vCOMPANY_ID != null)) || ((m_COMPANY_ID != null) && ((vCOMPANY_ID == null) || (! m_COMPANY_ID.equals(vCOMPANY_ID)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_COMPANY_ID);
CountryCode vCOUNTRYCODE = obj2.get_COUNTRYCODE();
if (((m_COUNTRYCODE == null) && (vCOUNTRYCODE != null)) || ((m_COUNTRYCODE != null) && ((vCOUNTRYCODE == null) || (! m_COUNTRYCODE.equals(vCOUNTRYCODE)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_COUNTRYCODE);
java.util.Date vDATMOD = obj2.get_DATMOD();
if (((m_DATMOD == null) && (vDATMOD != null)) || ((m_DATMOD != null) && ((vDATMOD == null) || (! m_DATMOD.equals(vDATMOD)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_DATMOD);
java.util.Date vDATNEW = obj2.get_DATNEW();
if (((m_DATNEW == null) && (vDATNEW != null)) || ((m_DATNEW != null) && ((vDATNEW == null) || (! m_DATNEW.equals(vDATNEW)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_DATNEW);
String vEMAIL = obj2.get_EMAIL();
if (((m_EMAIL == null) && (vEMAIL != null)) || ((m_EMAIL != null) && ((vEMAIL == null) || (! m_EMAIL.equals(vEMAIL)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_EMAIL);
float vGIS_LATITUDE = obj2.get_GIS_LATITUDE();
if (m_GIS_LATITUDE != vGIS_LATITUDE)
vec.addElement(T_D2S_COMPANY_Sel.CI_GIS_LATITUDE);
float vGIS_LONGITUDE = obj2.get_GIS_LONGITUDE();
if (m_GIS_LONGITUDE != vGIS_LONGITUDE)
vec.addElement(T_D2S_COMPANY_Sel.CI_GIS_LONGITUDE);
CompanyGroup vGROUP_ID = obj2.get_GROUP_ID();
if (((m_GROUP_ID == null) && (vGROUP_ID != null)) || ((m_GROUP_ID != null) && ((vGROUP_ID == null) || (! m_GROUP_ID.equals(vGROUP_ID)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_GROUP_ID);
String vLOGIN_NAME = obj2.get_LOGIN_NAME();
if (((m_LOGIN_NAME == null) && (vLOGIN_NAME != null)) || ((m_LOGIN_NAME != null) && ((vLOGIN_NAME == null) || (! m_LOGIN_NAME.equals(vLOGIN_NAME)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_LOGIN_NAME);
String vNAME = obj2.get_NAME();
if (((m_NAME == null) && (vNAME != null)) || ((m_NAME != null) && ((vNAME == null) || (! m_NAME.equals(vNAME)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_NAME);
String vPHONE01 = obj2.get_PHONE01();
if (((m_PHONE01 == null) && (vPHONE01 != null)) || ((m_PHONE01 != null) && ((vPHONE01 == null) || (! m_PHONE01.equals(vPHONE01)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_PHONE01);
String vPHONE02 = obj2.get_PHONE02();
if (((m_PHONE02 == null) && (vPHONE02 != null)) || ((m_PHONE02 != null) && ((vPHONE02 == null) || (! m_PHONE02.equals(vPHONE02)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_PHONE02);
String vREM = obj2.get_REM();
if (((m_REM == null) && (vREM != null)) || ((m_REM != null) && ((vREM == null) || (! m_REM.equals(vREM)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_REM);
String vUID = obj2.get_UID();
if (((m_UID == null) && (vUID != null)) || ((m_UID != null) && ((vUID == null) || (! m_UID.equals(vUID)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_UID);
java.util.Date vVALID_UNTIL = obj2.get_VALID_UNTIL();
if (((m_VALID_UNTIL == null) && (vVALID_UNTIL != null)) || ((m_VALID_UNTIL != null) && ((vVALID_UNTIL == null) || (! m_VALID_UNTIL.equals(vVALID_UNTIL)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_VALID_UNTIL);
String vWWW = obj2.get_WWW();
if (((m_WWW == null) && (vWWW != null)) || ((m_WWW != null) && ((vWWW == null) || (! m_WWW.equals(vWWW)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_WWW);
String vZIPCODE = obj2.get_ZIPCODE();
if (((m_ZIPCODE == null) && (vZIPCODE != null)) || ((m_ZIPCODE != null) && ((vZIPCODE == null) || (! m_ZIPCODE.equals(vZIPCODE)))))
vec.addElement(T_D2S_COMPANY_Sel.CI_ZIPCODE);
if (vec.size() > 0)
{
res = new dbColumnInfo[vec.size()];
for( int i = 0; i < vec.size(); i++ )
res[i] = (dbColumnInfo)vec.elementAt(i);
}
}
else
{
res = T_D2S_COMPANY_Sel.COLUMNS;
}
return res;
}
}