openlsd.business.LSDBusinessImpl Class Reference

Inheritance diagram for openlsd.business.LSDBusinessImpl:

Inheritance graph
[legend]
Collaboration diagram for openlsd.business.LSDBusinessImpl:

Collaboration graph
[legend]

List of all members.


Detailed Description

This class contains all Business data and database relative functions

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)
void setFromString (String line)
int setFromStrings (int curargs, String[]args)
String toString ()
String toCSV ()

Static Public Member Functions

static LSDBusiness newBusiness ()

Public Attributes

String idb = null

Static Public Attributes

static final int ridb = 0
static final String allFieldsExt = ","+fieldsext[ridb]+" "
static String getWhereClause = fieldsext[ridb]+" = ? "
static String getFieldsSetExt = ""
static String getFieldsSetAllExt = ","+fieldsext[ridb]+" = ? "
static String getFieldsSetExtNULL = ","+fieldsext[ridb]+" = NULL "

Static Protected Attributes

static final String[] fieldsext = {"IDMETIER"}

Constructor & Destructor Documentation

openlsd.business.LSDBusinessImpl.LSDBusinessImpl (  ) 

Default empty constructor

openlsd.business.LSDBusinessImpl.LSDBusinessImpl ( LSDBusiness  lsdb  ) 

Constructor from data

Parameters:
lsdb 

openlsd.business.LSDBusinessImpl.LSDBusinessImpl ( int[]  ranks,
String[]  args 
)

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

Parameters:
ranks 
args 

openlsd.business.LSDBusinessImpl.LSDBusinessImpl ( LSDBusinessImpl  lsdb  ) 

Constructor from data

Parameters:
lsdb 


Member Function Documentation

String openlsd.business.LSDBusinessImpl.getAllFieldsExt (  )  [virtual]

String openlsd.business.LSDBusinessImpl.getFieldsExt ( int  number  )  [virtual]

String openlsd.business.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 openlsd.business.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 openlsd.business.LSDBusinessImpl.equals ( LSDBusiness  other  )  [virtual]

boolean openlsd.business.LSDBusinessImpl.setFromLSDBusiness ( LSDBusiness  lsdb  )  [virtual]

boolean openlsd.business.LSDBusinessImpl.getFromResultSet ( ResultSet  resultSet  )  [virtual]

Set internal value from ResultSet

Parameters:
resultSet 
Returns:
True if OK, else False

Implements openlsd.database.business.LSDBusiness.

String openlsd.business.LSDBusinessImpl.getFieldsValues (  )  [virtual]

Set Values for Insert command

Returns:
the String for Insert command Value part

Implements openlsd.database.business.LSDBusiness.

int openlsd.business.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 openlsd.business.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 openlsd.business.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 openlsd.business.LSDBusinessImpl.clear (  )  [virtual]

Clear all data in the object

Implements openlsd.database.business.LSDBusiness.

LSDBusiness openlsd.business.LSDBusinessImpl.clone (  )  [virtual]

Clone the current object but only copy values

Returns:
The new object as a clone

Implements openlsd.database.business.LSDBusiness.

boolean openlsd.business.LSDBusinessImpl.setFromLSDBusiness ( LSDBusinessImpl  lsdb  ) 

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

boolean openlsd.business.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

void openlsd.business.LSDBusinessImpl.setFromString ( String  line  )  [virtual]

Fill the object from the String for Delete function

Parameters:
line 

Implements openlsd.database.business.LSDBusiness.

int openlsd.business.LSDBusinessImpl.setFromStrings ( int  curargs,
String[]  args 
) [virtual]

Fill the object from the String for Import function

Parameters:
args 
curargs 
Returns:
The next args rank to read

Implements openlsd.database.business.LSDBusiness.

String openlsd.business.LSDBusinessImpl.toString (  )  [virtual]

Object to String

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

Implements openlsd.database.business.LSDBusiness.

String openlsd.business.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

Must Be Extended in Implementation:
Business index

final String [] openlsd.business.LSDBusinessImpl.fieldsext = {"IDMETIER"} [static, protected]

Must Be Extended in Implementation:
Extended fields for Business

Reimplemented from openlsd.database.business.LSDBusiness.

final int openlsd.business.LSDBusinessImpl.ridb = 0 [static]

Must Be Extended in Implementation:
Index for extended fields for Business

Must Be Extended in Implementation:
Values to add to allfields (replace select *)

Reimplemented from openlsd.database.business.LSDBusiness.

Must Be Extended in Implementation:
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.

Must Be Extended in Implementation:
Set for all fields except fields used in getWhereClause

Reimplemented from openlsd.database.business.LSDBusiness.

Must Be Extended in Implementation:
Set for all fields

Reimplemented from openlsd.database.business.LSDBusiness.

Must Be Extended in Implementation:
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: