openlsd.database.business.LSDBusiness Class Reference

Inheritance diagram for openlsd.database.business.LSDBusiness:

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

Collaboration graph
[legend]

List of all members.


Detailed Description

Abstract Business Class that must be implemented to fit the needs of the target business.
See also:
openlsd.business.LSDBusinessImpl to see an example of basic Implementation.

openlsd.newbusiness.LSDBusinessImpl to see an extended example of Implementation.

Author:
Frederic BREGIER LGPL 2007

Public Member Functions

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

Static Public Member Functions

static LSDBusiness newBusiness ()

Static Public Attributes

static final String allFieldsExt = ""
static String getWhereClause = ""
static String getFieldsSetExt = ""
static String getFieldsSetAllExt = ""
static String getFieldsSetExtNULL = ""

Static Protected Attributes

static final String[] fieldsext = null

Constructor & Destructor Documentation

openlsd.database.business.LSDBusiness.LSDBusiness (  ) 

Must Be Extended in Implementation:
Default empty constructor

openlsd.database.business.LSDBusiness.LSDBusiness ( LSDBusiness  lsdb  ) 

Must Be Extended in Implementation:
Constructor from another LSDBusiness (same type)

Parameters:
lsdb 

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

Must Be Extended in Implementation:
Constructor from 1 int[] for rank and 1 String[] for value

Parameters:
ranks 
args 


Member Function Documentation

abstract String openlsd.database.business.LSDBusiness.getFieldsExt ( int  number  )  [pure virtual]

Extended fields for Business

Parameters:
number 
Returns:
The Extended fields for Business

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getAllFieldsExt (  )  [pure virtual]

Values to add to allfields (replace select *)

Returns:
Values to add to allfields (replace select *)

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getWhereClause (  )  [pure virtual]

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

Returns:
Where condition

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getFieldsSetExt (  )  [pure virtual]

Set for all fields except fields used in getWhereClause

Returns:
Set for all fields except fields used in getWhereClause

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getFieldsSetAllExt (  )  [pure virtual]

Set for all fields

Returns:
Set for all fields

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getFieldsSetExtNULL (  )  [pure virtual]

Set values as NULL (or empty) including where clause

Returns:
Set values as NULL (or empty) including where clause

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.doc_hintBusiness (  )  [pure virtual]

Returns the hint for DOC on Business Index

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract boolean openlsd.database.business.LSDBusiness.setFromLSDBusiness ( LSDBusiness  lsdb  )  [pure virtual]

Set the currect object to the values from the object as parameter

Parameters:
lsdb 
Returns:
True if OK, else False

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract boolean openlsd.database.business.LSDBusiness.setFromStringArray ( int[]  ranks,
String[]  args 
) [pure virtual]

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

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract boolean openlsd.database.business.LSDBusiness.getFromResultSet ( ResultSet  resultSet  )  [pure virtual]

Set internal value from ResultSet

Parameters:
resultSet 
Returns:
True if OK, else False

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.getFieldsValues (  )  [pure virtual]

Set Values for Insert command

Returns:
the String for Insert command Value part

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract int openlsd.database.business.LSDBusiness.setToPrepStmtGetWhereClause ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [pure 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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract int openlsd.database.business.LSDBusiness.setToPrepStmtGetFieldsSetExt ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [pure 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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract int openlsd.database.business.LSDBusiness.setToPrepStmtGetFieldsSetAllExt ( int  startrank,
LSDDbPreparedStatement  preparedStatement 
) [pure 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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract void openlsd.database.business.LSDBusiness.clear (  )  [pure virtual]

abstract boolean openlsd.database.business.LSDBusiness.equals ( LSDBusiness  other  )  [pure virtual]

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

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract LSDBusiness openlsd.database.business.LSDBusiness.clone (  )  [pure virtual]

Clone the current object but only copy values

Returns:
The clone object

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

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

Create an empty LSDBusiness according to the registering implementation

Returns:
an empty LSDBusiness

abstract void openlsd.database.business.LSDBusiness.setFromString ( String  line  )  [pure virtual]

Fill the object from the String for function that gets information of Business index from one line from a file

Parameters:
line 

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract int openlsd.database.business.LSDBusiness.setFromStrings ( int  curargs,
String[]  args 
) [pure virtual]

Fill the object from the String for Import function (an array containing from curargs position a set of values from one line with blank character as separator)

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.toString (  )  [pure virtual]

Object to String

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

abstract String openlsd.database.business.LSDBusiness.toCSV (  )  [pure virtual]

Object to CSV. This method is intend for helping the database replication in case of ML support, so it should export all information of the Document in order to allow the corresponding insert or delete operation on duplicated database.

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

Implemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.


Member Data Documentation

final String [] openlsd.database.business.LSDBusiness.fieldsext = null [static, protected]

Must Be Extended in Implementation:
Extended fields for Business

Reimplemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

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

Reimplemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

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 in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

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

Reimplemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

Must Be Extended in Implementation:
Set for all fields

Reimplemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.

Must Be Extended in Implementation:
Set values as NULL (or empty) including where clause

Reimplemented in openlsd.business.LSDBusinessImpl, openlsd.newbusiness.LSDBusinessImpl, and openlsm.lsmbusiness.LSDBusinessImpl.


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