openlsm.lsmbusiness.LSDBusinessImpl Class Reference

Inheritance diagram for openlsm.lsmbusiness.LSDBusinessImpl:

Inheritance graph
[legend]
Collaboration diagram for openlsm.lsmbusiness.LSDBusinessImpl:

Collaboration graph
[legend]

List of all members.


Detailed Description

This class contains all Business data and database relative functions for OpenLSM.
Author:
Frederic BREGIER LGPL 2007

Public Member Functions

String getAllFieldsExt ()
String getFieldsExt (int number)
String getFieldsSetAllExt ()
String getFieldsSetExt ()
String getFieldsSetExtNULL ()
String getWhereClause ()
String doc_hintBusiness ()
 LSDBusinessImpl ()
 LSDBusinessImpl (LSDBusiness lsdb)
 LSDBusinessImpl (int[]ranks, String[]args)
 LSDBusinessImpl (LSDBusinessImpl lsdb)
boolean setFromStringArray (int[]ranks, String[]args)
boolean equals (LSDBusiness other)
boolean setFromLSDBusiness (LSDBusiness lsdb)
boolean getFromResultSet (ResultSet resultSet)
String getFieldsValues ()
int setToPrepStmtGetWhereClause (int startrank, LSDDbPreparedStatement preparedStatement)
int setToPrepStmtGetFieldsSetExt (int startrank, LSDDbPreparedStatement preparedStatement)
int setToPrepStmtGetFieldsSetAllExt (int startrank, LSDDbPreparedStatement preparedStatement)
void clear ()
LSDBusiness clone ()
boolean setFromLSDBusiness (LSDBusinessImpl lsdb)
boolean equals (LSDBusinessImpl other)
String toString ()
void setFromString (String line)
int setFromStrings (int curargs, String[] args)
String toCSV ()

Static Public Member Functions

static LSDBusiness newBusiness ()

Public Attributes

String idb = null
String sender = null
String recipients = null
String subject = null
String emaccount = null
String idowner = null
Timestamp maildate = null

Static Public Attributes

static final String[] fieldsext
static final int ridb = 0
static final int rsender = 1
static final int rrecipients = 2
static final int rsubject = 3
static final int remaccount = 4
static final int ridowner = 5
static final int rmaildate = 6
static final String allFieldsExt
static String getWhereClause = fieldsext[ridb]+" = ? "
static String getFieldsSetExt
static String getFieldsSetAllExt
static String getFieldsSetExtNULL

Constructor & Destructor Documentation

openlsm.lsmbusiness.LSDBusinessImpl.LSDBusinessImpl (  ) 

Default empty constructor

openlsm.lsmbusiness.LSDBusinessImpl.LSDBusinessImpl ( LSDBusiness  lsdb  ) 

Constructor from data

Parameters:
lsdb 

openlsm.lsmbusiness.LSDBusinessImpl.LSDBusinessImpl ( int[]  ranks,
String[]  args 
)

Constructor from 1 int[] for rank and 1 String[] for value

Parameters:
ranks 
args 

openlsm.lsmbusiness.LSDBusinessImpl.LSDBusinessImpl ( LSDBusinessImpl  lsdb  ) 

Constructor from data

Parameters:
lsdb 


Member Function Documentation

String openlsm.lsmbusiness.LSDBusinessImpl.getAllFieldsExt (  )  [virtual]

String openlsm.lsmbusiness.LSDBusinessImpl.getFieldsExt ( int  number  )  [virtual]

String openlsm.lsmbusiness.LSDBusinessImpl.doc_hintBusiness (  )  [virtual]

Returns the hint for DOC on Business Index (SELECT "hint" 1 FROM LSDDOCUMENT WHERE getWhereClauseBusiness)

Returns:
the String containing the hint to set after SELECT command based on getWhereClauseBusiness

Implements openlsd.database.business.LSDBusiness.

boolean openlsm.lsmbusiness.LSDBusinessImpl.setFromStringArray ( int[]  ranks,
String[]  args 
) [virtual]

Set from 1 int[] for rank and 1 String[] for value

Parameters:
ranks 
args 
Returns:
True if OK, else False

Implements openlsd.database.business.LSDBusiness.

boolean openlsm.lsmbusiness.LSDBusinessImpl.equals ( LSDBusiness  other  )  [virtual]

boolean openlsm.lsmbusiness.LSDBusinessImpl.setFromLSDBusiness ( LSDBusiness  lsdb  )  [virtual]

boolean openlsm.lsmbusiness.LSDBusinessImpl.getFromResultSet ( ResultSet  resultSet  )  [virtual]

Set internal value from ResultSet

Parameters:
resultSet 
Returns:
True if OK, else False

Implements openlsd.database.business.LSDBusiness.

String openlsm.lsmbusiness.LSDBusinessImpl.getFieldsValues (  )  [virtual]

Set Values for Insert command

Returns:
the String for Insert command Value part

Implements openlsd.database.business.LSDBusiness.

int openlsm.lsmbusiness.LSDBusinessImpl.setToPrepStmtGetWhereClause ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [virtual]

Set the value into the prepareStatement from Object for the Where Condition in getWhereClause

Parameters:
startrank The value to start from in the preparedStatement.setXXX call
preparedStatement 
Returns:
the next startrank or 0 if KO

Implements openlsd.database.business.LSDBusiness.

int openlsm.lsmbusiness.LSDBusinessImpl.setToPrepStmtGetFieldsSetExt ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [virtual]

Set the value into the prepareStatement from Object for the set in GetFieldsSetExt

Parameters:
startrank The value to start from in the preparedStatement.setXXX call
preparedStatement 
Returns:
the next startrank or 0 if KO

Implements openlsd.database.business.LSDBusiness.

int openlsm.lsmbusiness.LSDBusinessImpl.setToPrepStmtGetFieldsSetAllExt ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [virtual]

Set the value into the prepareStatement from Object for the set in GetFieldsSetAllExt

Parameters:
startrank The value to start from in the preparedStatement.setXXX call
preparedStatement 
Returns:
the next startrank or 0 if KO

Implements openlsd.database.business.LSDBusiness.

void openlsm.lsmbusiness.LSDBusinessImpl.clear (  )  [virtual]

Clear all data in the object

Implements openlsd.database.business.LSDBusiness.

LSDBusiness openlsm.lsmbusiness.LSDBusinessImpl.clone (  )  [virtual]

Clone the current object but only copy values

Returns:
The new object as a clone

Implements openlsd.database.business.LSDBusiness.

boolean openlsm.lsmbusiness.LSDBusinessImpl.setFromLSDBusiness ( LSDBusinessImpl  lsdb  ) 

Parameters:
lsdb 
Returns:
True if OK, else False
See also:
openlsd.database.business.LSDBusiness.setFromLSDBusiness(openlsd.database.business.LSDBusiness)

boolean openlsm.lsmbusiness.LSDBusinessImpl.equals ( LSDBusinessImpl  other  ) 

Comparison of two LSDBusinessImpl object on primary key (Business Index)

Parameters:
other 
Returns:
True if Business index are the same, else False

String openlsm.lsmbusiness.LSDBusinessImpl.toString (  )  [virtual]

Object to String

Returns:
the string that displays this object
See also:
java.lang.Object.toString()

Implements openlsd.database.business.LSDBusiness.

void openlsm.lsmbusiness.LSDBusinessImpl.setFromString ( String  line  )  [virtual]

int openlsm.lsmbusiness.LSDBusinessImpl.setFromStrings ( int  curargs,
String[]  args 
) [virtual]

(non-Javadoc)

See also:
openlsd.database.business.LSDBusiness.setFromStrings(int, java.lang.String[])

Implements openlsd.database.business.LSDBusiness.

String openlsm.lsmbusiness.LSDBusinessImpl.toCSV (  )  [virtual]

static LSDBusiness openlsd.database.business.LSDBusiness.newBusiness (  )  [static, inherited]

Create an empty LSDBusiness according to the registering implementation

Returns:
an empty LSDBusiness


Member Data Documentation

Business index : day-hour-sender-email_account-random

Sender

Recipients (from, to, cc, email account)

Subject and Keyword and Domain

Email Account

Mail Owner

Date of mail

Initial value:

 {"IDMETIER","SENDER",
        "RECIPIENTS","SUBJECT","EMACCOUNT","IDOWNER","MAILDATE"}
Extended fields for Business

Reimplemented from openlsd.database.business.LSDBusiness.

Index for extended fields for Business

Index for extended fields for Business

Index for extended fields for Business

Index for extended fields for Business

Index for extended fields for Business

Index for extended fields for Business

Index for extended fields for Business

Initial value:

Values to add to allfields (replace select *)

Reimplemented from openlsd.database.business.LSDBusiness.

Where condition in " condition " format which will be added to " WHERE Legacy = ? AND condition " and that must returns 1 unique document.

Reimplemented from openlsd.database.business.LSDBusiness.

Initial value:

 ","+fieldsext[rsender]+
        " = ?,"+fieldsext[rrecipients]+" = ?,"+fieldsext[rsubject]+" = ?,"+
        fieldsext[remaccount]+" = ?,"+fieldsext[ridowner]+" = ?,"+fieldsext[rmaildate]+" = ? "
Set for all fields except fields used in getWhereClause

Reimplemented from openlsd.database.business.LSDBusiness.

Initial value:

 ","+fieldsext[ridb]+" = ?,"+fieldsext[rsender]+
        " = ?,"+fieldsext[rrecipients]+" = ?,"+fieldsext[rsubject]+" = ?,"+
        fieldsext[remaccount]+"= ?,"+fieldsext[ridowner]+"= ?,"+fieldsext[rmaildate]+" = ? "
Set for all fields

Reimplemented from openlsd.database.business.LSDBusiness.

Initial value:

 ","+fieldsext[ridb]+" = NULL ,"+
        fieldsext[rsender]+" = NULL,"+fieldsext[rrecipients]+" = NULL,"+fieldsext[rsubject]+
        " = NULL,"+fieldsext[remaccount]+
        "= NULL,"+fieldsext[ridowner]+"= NULL,"+fieldsext[rmaildate]+" = NULL "
Set values as NULL (or empty) including where clause

Reimplemented from openlsd.database.business.LSDBusiness.


The documentation for this class was generated from the following file: