Public Member Functions | |
LSDExtDbDocument () | |
LSDExtDbDocument (long lid, long sid, long did, long size, LSDBusiness lsdb) | |
boolean | get (ResultSet resultSet) |
boolean | getSimple (ResultSet resultSet) |
LSDDbPreparedStatement | setPGet (LSDDbAdmin admin, long lid, long sid, long did) |
LSDDbPreparedStatement | setPUpdate (LSDDbAdmin admin, long lid, long size, Timestamp docdate, String md5, LSDBusiness lsdb) |
LSDDbPreparedStatement | setPUpdate (LSDDbAdmin admin, long lid, long sid, long did, long size, Timestamp docdate, String md5, LSDBusiness lsdb) |
int | setPInsert (LSDDbAdmin admin, long lid, long sid, long did, long size, Timestamp docdate, String md5, LSDBusiness lsdb) |
LSDDbPreparedStatement | setPDel (LSDDbAdmin admin, long lid, LSDBusiness lsdb) |
boolean | get (LSDDbAdmin admin, long lid, LSDBusiness lsdb) |
boolean | get (LSDDbAdmin admin, long lid, long sid, long did) |
boolean | get (LSDDbAdmin admin, LSDDbPreparedStatement p_get_lsdB, long lid, long sid, long did) |
boolean | set (LSDDbAdmin admin) |
boolean | insert (LSDDbAdmin admin) |
boolean | update (LSDDbAdmin admin, String md5) |
boolean | update (LSDDbAdmin admin, boolean isCommit) |
boolean | updateFromLSD (LSDDbAdmin admin, boolean isCommit, boolean hasdate) |
boolean | del (LSDDbAdmin admin) |
boolean | delNoLock (LSDDbAdmin admin) |
String | toString () |
String | toCSV () |
void | assign (long lid, long sid, long did, long size) |
boolean | getFromLSD (ResultSet resultSet) |
boolean | isIdsKO () |
Static Public Member Functions | |
static boolean | initBusiness (String lsdbclassname) |
static String | getFieldsValues (long lid, long sid, long did, long size, Timestamp docdate, String md5, LSDBusiness lsdb) |
static LSDDbPreparedStatement | setPGetValid (LSDDbAdmin admin) |
static boolean | setPGetValidFill (LSDDbAdmin admin, LSDDbPreparedStatement p_get_lsd, long lid, long sid) |
static LSDDbPreparedStatement | setPGet (LSDDbAdmin admin, long lid, LSDBusiness lsdb) |
static LSDDbPreparedStatement | preparePGet (LSDDbAdmin admin) |
static LSDDbPreparedStatement | setPGetExists (LSDDbAdmin admin, long lid, LSDBusiness lsdb) |
static boolean | getExists (LSDDbAdmin admin, long lid, LSDBusiness lsdb) |
static boolean | isExists (LSDDbAdmin admin, long lid, long filesize, LSDBusiness lsdb) |
static boolean | alterIndex (LSDDbAdmin admin) |
static String | get1rstFieldsValues (long lid, long sid, long did, long size, Timestamp docdate, String md5) |
static String | getFieldsValues (long lid, long sid, long did, long size, Timestamp docdate, String md5) |
static String | getWhereCondPils (String id) |
static LSDDbPreparedStatement | setPGetCount (LSDDbAdmin admin, long lid, Timestamp time) |
static LSDDbPreparedStatement | setPGetCount (LSDDbAdmin admin, long lid, Timestamp timestart, Timestamp timestop) |
static LSDDbPreparedStatement | setPGetCount (LSDDbAdmin admin, long lid, long sid) |
static LSDDbPreparedStatement | setPUpdate (LSDDbAdmin admin, long lid, long sid, long did, long size, Timestamp docdate, String md5) |
static int | setPInsert (LSDDbAdmin admin, long lid, long sid, long did, long size, Timestamp docdate, String md5) |
static LSDDbPreparedStatement | setPDel (LSDDbAdmin admin, long lid, long sid, long did) |
Public Attributes | |
LSDBusiness | lsdb = null |
long | lid = LSDConstants.invalide_idx |
long | sid = LSDConstants.invalide_idx |
long | did = LSDConstants.invalide_idx |
long | size = 0 |
Timestamp | docdate = null |
String | md5 = null |
Static Public Attributes | |
static LSDBusiness | _lsdb = null |
static String | allfields = allfields1 |
static String | insertfields = " ("+allfields+insertfields2 |
static String | getWhereClauseBusiness = null |
static String | getFieldsSet = getFieldsSet1 |
static String | getFieldsSetAll = null |
static String | getFieldsSetNULL = getFieldsSetNULL1 |
static String | index = index1+" IDX_DOC_LIDMETIERDATE" |
static final String | EMPTYMD5 = "XXXXXXXXXXXXXXXX" |
static final String | table = " lsddocument " |
static final String[] | fields |
static final int | rlid = 0 |
static final int | rsid = 1 |
static final int | rdid = 2 |
static final int | rsize = 3 |
static final int | rdocdate = 4 |
static final int | rmd5 = 5 |
static String | getWhereClause |
static String | getFieldsSet1 |
static String | getWhereClauseMD5 = getWhereClause+" AND "+fields[rmd5]+" = ? " |
static String | getWhereEmpty |
static String | getFieldsSetNULL1 |
static final String | index1 |
Protected Member Functions | |
boolean | eraseFromLSD (LSDDbAdmin admin, boolean isCommit) |
Static Protected Attributes | |
static final String | allfields1 |
static final String | insertfields1 |
static final String | insertfields2 = ") " |
openlsd.database.business.LSDExtDbDocument.LSDExtDbDocument | ( | ) |
Create an empty ExtDocument
openlsd.database.business.LSDExtDbDocument.LSDExtDbDocument | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size, | |||
LSDBusiness | lsdb | |||
) |
Create an ExtDocument from args
lid | ||
sid | ||
did | ||
size | ||
lsdb |
static boolean openlsd.database.business.LSDExtDbDocument.initBusiness | ( | String | lsdbclassname | ) | [static] |
Initialize some default values in static mode from Business class name as argument
lsdbclassname |
boolean openlsd.database.business.LSDExtDbDocument.get | ( | ResultSet | resultSet | ) |
Get Values from ResultSet, initialized always a new business object as attribute
resultSet |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.getSimple | ( | ResultSet | resultSet | ) |
Get Values from ResultSet as LSDDbDocument without Business
resultSet |
static String openlsd.database.business.LSDExtDbDocument.getFieldsValues | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5, | |||
LSDBusiness | lsdb | |||
) | [static] |
Get String for Setting as Values (override)
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 | ||
lsdb |
static LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPGetValid | ( | LSDDbAdmin | admin | ) | [static] |
Create the PreparedStatement for Get all valid documents (used with setPGetValidFill)
admin |
static boolean openlsd.database.business.LSDExtDbDocument.setPGetValidFill | ( | LSDDbAdmin | admin, | |
LSDDbPreparedStatement | p_get_lsd, | |||
long | lid, | |||
long | sid | |||
) | [static] |
Fill the PreparedStatement for Get all valid documents from one legacy one storage
admin | ||
p_get_lsd | ||
lid | ||
sid |
static LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPGet | ( | LSDDbAdmin | admin, | |
long | lid, | |||
LSDBusiness | lsdb | |||
) | [static] |
Create the PreparedStatement for Get. lsdb object must contains unique index information. (override)
admin | ||
lid | ||
lsdb |
LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPGet | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did | |||
) |
Create the PreparedStatement for Get from L S D index (override)
admin | ||
lid | ||
sid | ||
did |
Reimplemented from openlsd.database.data.LSDDbDocument.
static LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.preparePGet | ( | LSDDbAdmin | admin | ) | [static] |
Create the PreparedStatement for Get from L S D index (override)
admin |
static LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPGetExists | ( | LSDDbAdmin | admin, | |
long | lid, | |||
LSDBusiness | lsdb | |||
) | [static] |
Create the PreparedStatement for Get Exists. lsdb object must contains unique index information.
admin | ||
lid | ||
lsdb |
LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPUpdate | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5, | |||
LSDBusiness | lsdb | |||
) |
Create the PreparedStatement for Update from Legacy and Business (override)
admin | ||
lid | ||
size | ||
docdate | ||
md5 | ||
lsdb |
LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPUpdate | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5, | |||
LSDBusiness | lsdb | |||
) |
Create the PreparedStatement for Update from Legacy, Storage and Document index (override)
admin | ||
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 | ||
lsdb |
int openlsd.database.business.LSDExtDbDocument.setPInsert | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5, | |||
LSDBusiness | lsdb | |||
) |
Create the PreparedStatement for Insert (override)
admin | ||
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 | ||
lsdb |
LSDDbPreparedStatement openlsd.database.business.LSDExtDbDocument.setPDel | ( | LSDDbAdmin | admin, | |
long | lid, | |||
LSDBusiness | lsdb | |||
) |
Create the PreparedStatement for Insert. lsdb object must contains unique index information. (override)
admin | ||
lid | ||
lsdb |
boolean openlsd.database.business.LSDExtDbDocument.get | ( | LSDDbAdmin | admin, | |
long | lid, | |||
LSDBusiness | lsdb | |||
) |
Get the Document object from DB. lsdb object must contains unique index information. (override)
admin | ||
lid | ||
lsdb |
boolean openlsd.database.business.LSDExtDbDocument.get | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did | |||
) |
Get the ExtDocument object from DB from L S D index (override)
admin | ||
lid | ||
sid | ||
did |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.get | ( | LSDDbAdmin | admin, | |
LSDDbPreparedStatement | p_get_lsdB, | |||
long | lid, | |||
long | sid, | |||
long | did | |||
) |
Get the ExtDocument object from DB from L S D index (override)
admin | ||
p_get_lsdB | ||
lid | ||
sid | ||
did |
static boolean openlsd.database.business.LSDExtDbDocument.getExists | ( | LSDDbAdmin | admin, | |
long | lid, | |||
LSDBusiness | lsdb | |||
) | [static] |
Returns if the Document object exists in DB. lsdb object must contains unique index information.
admin | ||
lid | ||
lsdb |
boolean openlsd.database.business.LSDExtDbDocument.set | ( | LSDDbAdmin | admin | ) |
Update or Insert data into DB from object (override)
admin |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.insert | ( | LSDDbAdmin | admin | ) |
Insert data into DB from object. Do not commit the result since it is intend only for findFirstIndex where update Storage will commit the result and release the lock on the row. (override)
admin |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.update | ( | LSDDbAdmin | admin, | |
String | md5 | |||
) |
Update MD5 Value into BD (override)
admin | ||
md5 |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.update | ( | LSDDbAdmin | admin, | |
boolean | isCommit | |||
) |
Update Values into BD with or without commit
admin | ||
isCommit |
boolean openlsd.database.business.LSDExtDbDocument.updateFromLSD | ( | LSDDbAdmin | admin, | |
boolean | isCommit, | |||
boolean | hasdate | |||
) |
Update some Values into BD from lsd indexes (override)
admin | ||
isCommit | ||
hasdate |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.eraseFromLSD | ( | LSDDbAdmin | admin, | |
boolean | isCommit | |||
) | [protected] |
Erase some Values into BD (override)
admin | ||
isCommit |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.del | ( | LSDDbAdmin | admin | ) |
Del the Document object from DB and update the associated Storage in the DB (size of the document is removed). lsdb is set to null. (override)
admin |
Reimplemented from openlsd.database.data.LSDDbDocument.
boolean openlsd.database.business.LSDExtDbDocument.delNoLock | ( | LSDDbAdmin | admin | ) |
Del the Document object from DB and update the associated Storage in the DB (size of the document is removed). Lock must be set outside. lsdb is set to null. (override)
admin |
Reimplemented from openlsd.database.data.LSDDbDocument.
static boolean openlsd.database.business.LSDExtDbDocument.isExists | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | filesize, | |||
LSDBusiness | lsdb | |||
) | [static] |
Find if the Document id exists in Legacy. lsdb object must contains unique index information.
admin | ||
lid | ||
filesize | ||
lsdb |
static boolean openlsd.database.business.LSDExtDbDocument.alterIndex | ( | LSDDbAdmin | admin | ) | [static] |
Alter rebuild all index associated with this Table
admin |
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.toString | ( | ) |
Object to String (override)
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.toCSV | ( | ) |
Object to CSV format
void openlsd.database.data.LSDDbDocument.assign | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size | |||
) | [inherited] |
Assign values to the object
lid | ||
sid | ||
did | ||
size |
boolean openlsd.database.data.LSDDbDocument.getFromLSD | ( | ResultSet | resultSet | ) | [inherited] |
Get Values from ResultSet
resultSet |
static String openlsd.database.data.LSDDbDocument.get1rstFieldsValues | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5 | |||
) | [static, inherited] |
Get 1rst part of String for Setting as Values. The extend function of getFieldsValues should add the fields with first "," then all fields separated by "," and eventually surrounded with quotes when necessary, and finaly end the string with ") ".
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 |
static String openlsd.database.data.LSDDbDocument.getFieldsValues | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5 | |||
) | [static, inherited] |
Get String for Setting as Values
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 |
static String openlsd.database.data.LSDDbDocument.getWhereCondPils | ( | String | id | ) | [static, inherited] |
Get String for Where Condition
id |
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPGetCount | ( | LSDDbAdmin | admin, | |
long | lid, | |||
Timestamp | time | |||
) | [static, inherited] |
Create the PreparedStatement for GetCount from Legacy and Time
admin | ||
lid | ||
time |
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPGetCount | ( | LSDDbAdmin | admin, | |
long | lid, | |||
Timestamp | timestart, | |||
Timestamp | timestop | |||
) | [static, inherited] |
Create the PreparedStatement for GetCount from Legacy and Time start and stop
admin | ||
lid | ||
timestart | ||
timestop |
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPGetCount | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) | [static, inherited] |
Create the PreparedStatement for GetCount from Legacy and Storage
admin | ||
lid | ||
sid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPUpdate | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5 | |||
) | [static, inherited] |
Create the PreparedStatement for Update
admin | ||
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 |
static int openlsd.database.data.LSDDbDocument.setPInsert | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
long | size, | |||
Timestamp | docdate, | |||
String | md5 | |||
) | [static, inherited] |
Create the PreparedStatement for Insert
admin | ||
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 |
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPDel | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did | |||
) | [static, inherited] |
Create the PreparedStatement for Delete
admin | ||
lid | ||
sid | ||
did |
boolean openlsd.database.data.LSDDbDocument.isIdsKO | ( | ) | [inherited] |
Check if the Ids (lid,sid,did) are KO or not
Business data
LSDBusiness openlsd.database.business.LSDExtDbDocument._lsdb = null [static] |
Business empty object initialized by initBusiness function
String openlsd.database.business.LSDExtDbDocument.allfields = allfields1 [static] |
New allfields (override)
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.insertfields = " ("+allfields+insertfields2 [static] |
New insertfields (override)
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.getWhereClauseBusiness = null [static] |
Where condition in " WHERE condition " format which must returns 1 unique document.
String openlsd.database.business.LSDExtDbDocument.getFieldsSet = getFieldsSet1 [static] |
Set for all fields except fields used in getWhereClause (override)
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.getFieldsSetAll = null [static] |
Set for all fields except fields used in getWhereClause (override)
String openlsd.database.business.LSDExtDbDocument.getFieldsSetNULL = getFieldsSetNULL1 [static] |
Set values as NULL (or empty) including where clause (override)
Reimplemented from openlsd.database.data.LSDDbDocument.
String openlsd.database.business.LSDExtDbDocument.index = index1+" IDX_DOC_LIDMETIERDATE" [static] |
Final Index in Table LSDExtDbDocument alter index "LSD"."IDX_DOC_LIDMETIERDATE" rebuild;
Reimplemented from openlsd.database.data.LSDDbDocument.
long openlsd.database.data.LSDDbDocument.lid = LSDConstants.invalide_idx [inherited] |
Legacy index
long openlsd.database.data.LSDDbDocument.sid = LSDConstants.invalide_idx [inherited] |
Storage index
long openlsd.database.data.LSDDbDocument.did = LSDConstants.invalide_idx [inherited] |
Document index
long openlsd.database.data.LSDDbDocument.size = 0 [inherited] |
Size of the document
Timestamp openlsd.database.data.LSDDbDocument.docdate = null [inherited] |
Date for insertion
String openlsd.database.data.LSDDbDocument.md5 = null [inherited] |
MD5 for file
final String openlsd.database.data.LSDDbDocument.EMPTYMD5 = "XXXXXXXXXXXXXXXX" [static, inherited] |
Empty MD5 value
final String openlsd.database.data.LSDDbDocument.table = " lsddocument " [static, inherited] |
information for DB manipulation: Table name
final String [] openlsd.database.data.LSDDbDocument.fields [static, inherited] |
Initial value:
{"LID","SID","DID","SIZEDOC","DOCDATE","EMPREINT"}
final int openlsd.database.data.LSDDbDocument.rlid = 0 [static, inherited] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rsid = 1 [static, inherited] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rdid = 2 [static, inherited] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rsize = 3 [static, inherited] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rdocdate = 4 [static, inherited] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rmd5 = 5 [static, inherited] |
DB field rank
final String openlsd.database.data.LSDDbDocument.allfields1 [static, protected, inherited] |
final String openlsd.database.data.LSDDbDocument.insertfields1 [static, protected, inherited] |
Initial value:
" ("+allfields
final String openlsd.database.data.LSDDbDocument.insertfields2 = ") " [static, protected, inherited] |
DB field for all fields in insert command. This version is the last fields ")" only.
String openlsd.database.data.LSDDbDocument.getWhereClause [static, inherited] |
String openlsd.database.data.LSDDbDocument.getFieldsSet1 [static, inherited] |
String openlsd.database.data.LSDDbDocument.getWhereClauseMD5 = getWhereClause+" AND "+fields[rmd5]+" = ? " [static, inherited] |
Where condition in " WHERE condition " format which must returns 1 unique document and compares also MD5 value.
String openlsd.database.data.LSDDbDocument.getWhereEmpty [static, inherited] |
String openlsd.database.data.LSDDbDocument.getFieldsSetNULL1 [static, inherited] |
final String openlsd.database.data.LSDDbDocument.index1 [static, inherited] |
Initial value:
"PK_DOCUMENT"+ " IDX_DOC_LIDSIZEDOCMD5"+" IDX_DOC_LSDATE"