com.knowgate.crm
Class OportunityLoader

java.lang.Object
  extended by com.knowgate.crm.OportunityLoader
All Implemented Interfaces:
ImportLoader

public class OportunityLoader
extends java.lang.Object
implements ImportLoader


Field Summary
static int bo_private
           
static int dt_created
           
static int dt_last_call
           
static int dt_modified
           
static int dt_next_action
           
static int gu_campaign
           
static int gu_company
           
static int gu_contact
           
static int gu_oportunity
           
static int gu_workarea
           
static int gu_writer
           
static int id_objetive
           
static int id_ref
           
static int id_status
           
static int im_cost
           
static int im_revenue
           
static int lv_interest
           
static int MODE_APPEND
           
static int MODE_APPENDUPDATE
           
static int MODE_UPDATE
           
static int sn_passport
           
static int tl_oportunity
           
static int tp_oportunity
           
static int tp_origin
           
static int tx_cause
           
static int tx_company
           
static int tx_contact
           
static int tx_email
           
static int tx_note
           
static int WRITE_LOOKUPS
           
 
Fields inherited from interface com.knowgate.hipergate.datamodel.ImportLoader
LOOUKP_TR_COLUMNS, LOOUKP_TR_COUNT
 
Constructor Summary
OportunityLoader()
           
 
Method Summary
 void close()
          Close ImportLoader Must be always called before ImportLoader is destroyed
 int columnCount()
          Get columns count
 java.lang.String[] columnNames()
          Get array of column names
 java.lang.Object get(int iColumnIndex)
          Get current value for a column given its index
 java.lang.Object get(java.lang.String sColumnName)
          Get current value for a column given its name
 int getColumnIndex(java.lang.String sColumnName)
          Get column index from its name
 void prepare(java.sql.Connection oConn, ColumnList oCols)
          Prepare ImportLoader for repeated execution
 void put(int iColumnIndex, java.lang.Object oValue)
          Put current value for a column
 void put(java.lang.String sColumnName, java.lang.Object oValue)
          Put current value for a column
 void setAllColumnsToNull()
          Set all current values to null
 void store(java.sql.Connection oConn, java.lang.String sWorkArea, int iFlags)
          Store a single row or a set of related rows
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_APPEND

public static final int MODE_APPEND
See Also:
Constant Field Values

MODE_UPDATE

public static final int MODE_UPDATE
See Also:
Constant Field Values

MODE_APPENDUPDATE

public static final int MODE_APPENDUPDATE
See Also:
Constant Field Values

WRITE_LOOKUPS

public static final int WRITE_LOOKUPS
See Also:
Constant Field Values

bo_private

public static int bo_private

dt_created

public static int dt_created

dt_last_call

public static int dt_last_call

dt_modified

public static int dt_modified

dt_next_action

public static int dt_next_action

gu_campaign

public static int gu_campaign

gu_company

public static int gu_company

gu_contact

public static int gu_contact

gu_oportunity

public static int gu_oportunity

gu_workarea

public static int gu_workarea

gu_writer

public static int gu_writer

id_objetive

public static int id_objetive

id_ref

public static int id_ref

id_status

public static int id_status

im_cost

public static int im_cost

im_revenue

public static int im_revenue

lv_interest

public static int lv_interest

sn_passport

public static int sn_passport

tl_oportunity

public static int tl_oportunity

tp_oportunity

public static int tp_oportunity

tp_origin

public static int tp_origin

tx_cause

public static int tx_cause

tx_company

public static int tx_company

tx_contact

public static int tx_contact

tx_email

public static int tx_email

tx_note

public static int tx_note
Constructor Detail

OportunityLoader

public OportunityLoader()
Method Detail

columnCount

public int columnCount()
Description copied from interface: ImportLoader
Get columns count

Specified by:
columnCount in interface ImportLoader
Returns:
int

columnNames

public java.lang.String[] columnNames()
                               throws java.lang.IllegalStateException
Description copied from interface: ImportLoader
Get array of column names

Specified by:
columnNames in interface ImportLoader
Returns:
String[]
Throws:
java.lang.IllegalStateException

get

public java.lang.Object get(int iColumnIndex)
                     throws java.lang.ArrayIndexOutOfBoundsException
Description copied from interface: ImportLoader
Get current value for a column given its index

Specified by:
get in interface ImportLoader
Parameters:
iColumnIndex - int [0..columnCount()-1]
Returns:
Object
Throws:
java.lang.ArrayIndexOutOfBoundsException

get

public java.lang.Object get(java.lang.String sColumnName)
                     throws java.lang.ArrayIndexOutOfBoundsException
Description copied from interface: ImportLoader
Get current value for a column given its name

Specified by:
get in interface ImportLoader
Parameters:
sColumnName - Case insensitive String
Returns:
Object
Throws:
java.lang.ArrayIndexOutOfBoundsException - if no column with such name was found

getColumnIndex

public int getColumnIndex(java.lang.String sColumnName)
Description copied from interface: ImportLoader
Get column index from its name

Specified by:
getColumnIndex in interface ImportLoader
Parameters:
sColumnName - String
Returns:
int [0..columnCount()-1] or -1 if column was not found

put

public void put(int iColumnIndex,
                java.lang.Object oValue)
         throws java.lang.ArrayIndexOutOfBoundsException
Description copied from interface: ImportLoader
Put current value for a column

Specified by:
put in interface ImportLoader
Parameters:
iColumnIndex - int [0..columnCount()-1]
oValue - Object
Throws:
java.lang.ArrayIndexOutOfBoundsException

put

public void put(java.lang.String sColumnName,
                java.lang.Object oValue)
         throws java.lang.ArrayIndexOutOfBoundsException
Description copied from interface: ImportLoader
Put current value for a column

Specified by:
put in interface ImportLoader
Parameters:
sColumnName - String Column name
oValue - Object
Throws:
java.lang.ArrayIndexOutOfBoundsException

setAllColumnsToNull

public void setAllColumnsToNull()
Description copied from interface: ImportLoader
Set all current values to null

Specified by:
setAllColumnsToNull in interface ImportLoader

prepare

public void prepare(java.sql.Connection oConn,
                    ColumnList oCols)
             throws java.sql.SQLException
Description copied from interface: ImportLoader
Prepare ImportLoader for repeated execution

Specified by:
prepare in interface ImportLoader
Parameters:
oConn - Connection
oCols - ColumnList List of columns that will be inserted or updated at the database
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Description copied from interface: ImportLoader

Close ImportLoader

Must be always called before ImportLoader is destroyed

Specified by:
close in interface ImportLoader
Throws:
java.sql.SQLException

store

public void store(java.sql.Connection oConn,
                  java.lang.String sWorkArea,
                  int iFlags)
           throws java.sql.SQLException,
                  java.lang.IllegalArgumentException,
                  java.lang.NullPointerException
Description copied from interface: ImportLoader
Store a single row or a set of related rows

Specified by:
store in interface ImportLoader
Parameters:
oConn - Connection
sWorkArea - String
iFlags - int
Throws:
java.sql.SQLException
java.lang.IllegalArgumentException
java.lang.NullPointerException