Public Member Functions | |
LSDDbDocument () | |
LSDDbDocument (long lid, long sid, long did, long size) | |
void | assign (long lid, long sid, long did, long size) |
boolean | get (ResultSet resultSet) |
boolean | getFromLSD (ResultSet resultSet) |
LSDDbPreparedStatement | setPGet (LSDDbAdmin admin, long lid, long sid, long did) |
boolean | get (LSDDbAdmin admin, long lid, long sid, long did) |
boolean | isIdsKO () |
boolean | set (LSDDbAdmin admin) |
boolean | insert (LSDDbAdmin admin) |
boolean | update (LSDDbAdmin admin, String shash) |
boolean | updateFromLSD (LSDDbAdmin admin, boolean isCommit, boolean hasdate) |
boolean | del (LSDDbAdmin admin) |
boolean | delNoLock (LSDDbAdmin admin) |
String | toString () |
Static Public Member Functions | |
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) |
static boolean | alterIndex (LSDDbAdmin admin) |
Public Attributes | |
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 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 final String | allfields = allfields1 |
static String | getWhereClause |
static String | getFieldsSet1 |
static String | getFieldsSet = getFieldsSet1 |
static String | getWhereClauseMD5 = getWhereClause+" AND "+fields[rmd5]+" = ? " |
static String | getWhereEmpty |
static String | getFieldsSetNULL1 |
static String | getFieldsSetNULL = getFieldsSetNULL1 |
static final String | index1 |
static String | index = 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 = ") " |
static final String | insertfields |
openlsd.database.data.LSDDbDocument.LSDDbDocument | ( | ) |
Create an empty Document
openlsd.database.data.LSDDbDocument.LSDDbDocument | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size | |||
) |
Create an Document from args
lid | ||
sid | ||
did | ||
size |
void openlsd.database.data.LSDDbDocument.assign | ( | long | lid, | |
long | sid, | |||
long | did, | |||
long | size | |||
) |
Assign values to the object
lid | ||
sid | ||
did | ||
size |
boolean openlsd.database.data.LSDDbDocument.get | ( | ResultSet | resultSet | ) |
Get Values from ResultSet
resultSet |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.getFromLSD | ( | ResultSet | resultSet | ) |
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] |
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] |
Get String for Setting as Values
lid | ||
sid | ||
did | ||
size | ||
docdate | ||
md5 |
static String openlsd.database.data.LSDDbDocument.getWhereCondPils | ( | String | id | ) | [static] |
Get String for Where Condition
id |
LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPGet | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did | |||
) |
Create the PreparedStatement for Get
admin | ||
lid | ||
sid | ||
did |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
static LSDDbPreparedStatement openlsd.database.data.LSDDbDocument.setPGetCount | ( | LSDDbAdmin | admin, | |
long | lid, | |||
Timestamp | time | |||
) | [static] |
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] |
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] |
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] |
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] |
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] |
Create the PreparedStatement for Delete
admin | ||
lid | ||
sid | ||
did |
boolean openlsd.database.data.LSDDbDocument.get | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did | |||
) |
Get the Document object from DB
admin | ||
lid | ||
sid | ||
did |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.isIdsKO | ( | ) |
Check if the Ids (lid,sid,did) are KO or not
boolean openlsd.database.data.LSDDbDocument.set | ( | LSDDbAdmin | admin | ) |
Update or Insert data into DB from object
admin |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.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.
admin |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.update | ( | LSDDbAdmin | admin, | |
String | shash | |||
) |
Update some Values into BD
admin | ||
shash |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.updateFromLSD | ( | LSDDbAdmin | admin, | |
boolean | isCommit, | |||
boolean | hasdate | |||
) |
Update some Values into BD
admin | ||
isCommit | ||
hasdate | True if a new date should be set |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.eraseFromLSD | ( | LSDDbAdmin | admin, | |
boolean | isCommit | |||
) | [protected] |
Erase some Values into BD
admin | ||
isCommit |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.del | ( | LSDDbAdmin | admin | ) |
Del the Document object from DB and update the associated Storage in the DB (size of the document is removed)
admin |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
boolean openlsd.database.data.LSDDbDocument.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.
admin |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
static boolean openlsd.database.data.LSDDbDocument.alterIndex | ( | LSDDbAdmin | admin | ) | [static] |
Alter rebuild all index associated with this Table
admin |
Reimplemented in openlsd.database.business.LSDExtDbDocument.
String openlsd.database.data.LSDDbDocument.toString | ( | ) |
Object to String
Reimplemented in openlsd.database.business.LSDExtDbDocument.
Legacy index
Storage index
Document index
Size of the document
Timestamp openlsd.database.data.LSDDbDocument.docdate = null |
Date for insertion
String openlsd.database.data.LSDDbDocument.md5 = null |
MD5 for file
final String openlsd.database.data.LSDDbDocument.EMPTYMD5 = "XXXXXXXXXXXXXXXX" [static] |
Empty MD5 value
final String openlsd.database.data.LSDDbDocument.table = " lsddocument " [static] |
information for DB manipulation: Table name
final String [] openlsd.database.data.LSDDbDocument.fields [static] |
Initial value:
{"LID","SID","DID","SIZEDOC","DOCDATE","EMPREINT"}
final int openlsd.database.data.LSDDbDocument.rlid = 0 [static] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rsid = 1 [static] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rdid = 2 [static] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rsize = 3 [static] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rdocdate = 4 [static] |
DB field rank
final int openlsd.database.data.LSDDbDocument.rmd5 = 5 [static] |
DB field rank
final String openlsd.database.data.LSDDbDocument.allfields1 [static, protected] |
final String openlsd.database.data.LSDDbDocument.allfields = allfields1 [static] |
DB field for all fields in select command. This version is the final one. This one shall be override by an extending package such as example LSDExtDbDocument to take into account the business data.
Reimplemented in openlsd.database.business.LSDExtDbDocument.
final String openlsd.database.data.LSDDbDocument.insertfields1 [static, protected] |
Initial value:
" ("+allfields
final String openlsd.database.data.LSDDbDocument.insertfields2 = ") " [static, protected] |
DB field for all fields in insert command. This version is the last fields ")" only.
final String openlsd.database.data.LSDDbDocument.insertfields [static, protected] |
Initial value:
DB field for all fields in insert command. This version is the final one. This one shall be override by an extending package such as example LSDExtDbDocument to take into account the business data.Reimplemented in openlsd.database.business.LSDExtDbDocument.
String openlsd.database.data.LSDDbDocument.getWhereClause [static] |
String openlsd.database.data.LSDDbDocument.getFieldsSet1 [static] |
String openlsd.database.data.LSDDbDocument.getFieldsSet = getFieldsSet1 [static] |
Set for all fields except fields used in getWhereClause
Reimplemented in openlsd.database.business.LSDExtDbDocument.
String openlsd.database.data.LSDDbDocument.getWhereClauseMD5 = getWhereClause+" AND "+fields[rmd5]+" = ? " [static] |
Where condition in " WHERE condition " format which must returns 1 unique document and compares also MD5 value.
String openlsd.database.data.LSDDbDocument.getWhereEmpty [static] |
String openlsd.database.data.LSDDbDocument.getFieldsSetNULL1 [static] |
String openlsd.database.data.LSDDbDocument.getFieldsSetNULL = getFieldsSetNULL1 [static] |
Set values as NULL (or empty) including where clause
Reimplemented in openlsd.database.business.LSDExtDbDocument.
final String openlsd.database.data.LSDDbDocument.index1 [static] |
Initial value:
"PK_DOCUMENT"+ " IDX_DOC_LIDSIZEDOCMD5"+" IDX_DOC_LSDATE"
String openlsd.database.data.LSDDbDocument.index = index1 [static] |
Final Index in Table LSDDbDocument
Reimplemented in openlsd.database.business.LSDExtDbDocument.