openlsd.database.data.LSDSpecific Class Reference

Collaboration diagram for openlsd.database.data.LSDSpecific:

Collaboration graph
[legend]

List of all members.


Detailed Description

Class for specific DB Request
Author:
Frederic Bregier LGPL

Static Public Member Functions

static LSDDbPreparedStatement ipport_findfirst (LSDDbAdmin admin)
static LSDDbPreparedStatement legacy_findfirst (LSDDbAdmin admin)
static long op_newindex (LSDDbAdmin admin)
static void op_createOpFromCheck (LSDDbAdmin admin, long lid, long sid, long did, String md5, int op, Timestamp opdate, long idip, long idipto)
static long op_createOpForDocument (LSDDbAdmin admin, long lid, long sid, long did, String md5, int op, Timestamp opdate, long idip)
static long op_createOpFromLegacyStorage (LSDDbAdmin admin, long lid, long sid, long idip)
static boolean op_refreshIdx (LSDDbAdmin admin)
static ArrayList< LSDDbOpop_validOps (LSDDbAdmin admin)
static LSDDbPreparedStatement getPrimaryOp (LSDDbAdmin admin)
static LSDDbPreparedStatement service_findfirst (LSDDbAdmin admin)
static LSDDbPreparedStatement storage_findfirstInNew (LSDDbAdmin admin, long lid)
static LSDDbPreparedStatement admin_get (LSDDbAdmin admin, long lid)
static String documents_findIndexCommit (LSDDbAdmin admin, long lid, long sumsize, int nb)
static String document_findIndexCommit (LSDDbAdmin admin, long lid, long filesize)
static String documents_findIndexCommitOp (LSDDbAdmin admin, long lid, long sumsize, int nb, long idip)
static String document_findIndexCommitOp (LSDDbAdmin admin, long lid, long filesize, long idip)
static String doc_hint ()
static String doc_hintLSDate ()
static LSDDbPreparedStatement check_get (LSDDbAdmin admin, LSDDbPreparedStatement prepstmt, long lid, long start, long end, Timestamp opdate)
static String check_getSQLDB (Timestamp opdate, boolean localcheckmd5, long newlid)
static String check_getSQLLSD (Timestamp opdate, boolean localcheckmd5, long newlid)
static String check_getSQLDBDual (Timestamp opdate, Timestamp limitdate, boolean localcheckmd5, long newlid)
static String check_getSQLLSDDual (Timestamp opdate, Timestamp limitdate, boolean localcheckmd5, long newlid)
static int check_load (LSDDbAdmin admin, String outputfile)
static LSDDbPreparedStatement getSizeDocument (LSDDbAdmin admin)

Static Public Attributes

static String userdb = null
static String passdb = null
static String serverdb = null
static String driverdb = null
static String siddb = null

Member Function Documentation

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.ipport_findfirst ( LSDDbAdmin  admin  )  [static]

IpPort FindFirst

Parameters:
admin 
Returns:
the LSDDbPreparedStatement

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.legacy_findfirst ( LSDDbAdmin  admin  )  [static]

Legacy FindFirst

Parameters:
admin 
Returns:
the LSDDbPreparedStatement

static long openlsd.database.data.LSDSpecific.op_newindex ( LSDDbAdmin  admin  )  [static]

Get a new index in Op Table. Does not commit so the caller needs to do commit.

Parameters:
admin 
Returns:
the new index

static void openlsd.database.data.LSDSpecific.op_createOpFromCheck ( LSDDbAdmin  admin,
long  lid,
long  sid,
long  did,
String  md5,
int  op,
Timestamp  opdate,
long  idip,
long  idipto 
) [static]

Create Op for Check for the Document and IDIP as source and IDIPTO as target

Parameters:
admin 
lid 
sid 
did 
md5 
op 
opdate 
idip (source or referent)
idipto (target)

static long openlsd.database.data.LSDSpecific.op_createOpForDocument ( LSDDbAdmin  admin,
long  lid,
long  sid,
long  did,
String  md5,
int  op,
Timestamp  opdate,
long  idip 
) [static]

Create Ops for Document and IDIP (Commit since Lock)

Parameters:
admin 
lid 
sid 
did 
md5 
op 
opdate 
idip 
Returns:
the new idop associated with all associated Ops

static long openlsd.database.data.LSDSpecific.op_createOpFromLegacyStorage ( LSDDbAdmin  admin,
long  lid,
long  sid,
long  idip 
) [static]

Create Op from Document for the specific Legacy and Storage and IDIP

Parameters:
admin 
lid 
sid 
idip 
Returns:
the number of created Op or (-1) if an error occurs

static boolean openlsd.database.data.LSDSpecific.op_refreshIdx ( LSDDbAdmin  admin  )  [static]

Update new index in Op Table.

Parameters:
admin 
Returns:
True if OK

static ArrayList<LSDDbOp> openlsd.database.data.LSDSpecific.op_validOps ( LSDDbAdmin  admin  )  [static]

Get list of Ops that are ready to be executed (only LSDConstants.NBLINEOP) using order of creation (idop Order)

Parameters:
admin 
Returns:
The ArrayList<LSDDbOp> or NULL in case of error

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.getPrimaryOp ( LSDDbAdmin  admin  )  [static]

Get the Primary Op object with status = OPStatusTodo in order of creation (idop Order)

Parameters:
admin 
Returns:
the LSDDbPrepareStatement

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.service_findfirst ( LSDDbAdmin  admin  )  [static]

Service FindFirst

Parameters:
admin 
Returns:
the LSDDbPreparedStatement

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.storage_findfirstInNew ( LSDDbAdmin  admin,
long  lid 
) [static]

Storage FindFirst

Parameters:
admin 
lid 
Returns:
the LSDDbPreparedStatement

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.admin_get ( LSDDbAdmin  admin,
long  lid 
) [static]

Admin Get

Parameters:
admin 
lid 
Returns:
the LSDDbPreparedStatement

static String openlsd.database.data.LSDSpecific.documents_findIndexCommit ( LSDDbAdmin  admin,
long  lid,
long  sumsize,
int  nb 
) [static]

Find index for several documents that will be in the same Storage.

Parameters:
admin 
lid 
sumsize 
nb 
Returns:
the result as "newsid newdids";

static String openlsd.database.data.LSDSpecific.document_findIndexCommit ( LSDDbAdmin  admin,
long  lid,
long  filesize 
) [static]

Find index for one document.

Parameters:
admin 
lid 
filesize 
Returns:
the result as "newsid newdid";

static String openlsd.database.data.LSDSpecific.documents_findIndexCommitOp ( LSDDbAdmin  admin,
long  lid,
long  sumsize,
int  nb,
long  idip 
) [static]

Find index for several documents that will be in the same Storage (only LSDConstants.NBLINEOP) and create temporary Op entries.

Parameters:
admin 
lid 
sumsize 
nb 
idip of the source
Returns:
the result as "newsid newdids newidops";

static String openlsd.database.data.LSDSpecific.document_findIndexCommitOp ( LSDDbAdmin  admin,
long  lid,
long  filesize,
long  idip 
) [static]

Find index for one document and create temporary Op entry.

Parameters:
admin 
lid 
filesize 
idip of the source
Returns:
the result as "newsid newdid newidop";

static String openlsd.database.data.LSDSpecific.doc_hint (  )  [static]

Returns the hint for DOC on PRIMARY KEY (Oracle specific for update BUG or SELECT MAX !)

Returns:
the String containing the hint to set after SELECT command

static String openlsd.database.data.LSDSpecific.doc_hintLSDate (  )  [static]

Returns the hint for DOC on LSDate Index

Returns:
the String containing the hint to set after SELECT command

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.check_get ( LSDDbAdmin  admin,
LSDDbPreparedStatement  prepstmt,
long  lid,
long  start,
long  end,
Timestamp  opdate 
) [static]

Check Get

Parameters:
admin 
prepstmt 
lid 
start 
end 
opdate 
Returns:
the LSDDbPreparedStatement

static String openlsd.database.data.LSDSpecific.check_getSQLDB ( Timestamp  opdate,
boolean  localcheckmd5,
long  newlid 
) [static]

Get the request string to check DB

Parameters:
opdate 
localcheckmd5 
newlid 
Returns:
the request string

static String openlsd.database.data.LSDSpecific.check_getSQLLSD ( Timestamp  opdate,
boolean  localcheckmd5,
long  newlid 
) [static]

Get the request string to check LSD

Parameters:
opdate 
localcheckmd5 
newlid 
Returns:
the request string

static String openlsd.database.data.LSDSpecific.check_getSQLDBDual ( Timestamp  opdate,
Timestamp  limitdate,
boolean  localcheckmd5,
long  newlid 
) [static]

Get the request string to check DB

Parameters:
opdate 
limitdate 
localcheckmd5 
newlid 
Returns:
the request string

static String openlsd.database.data.LSDSpecific.check_getSQLLSDDual ( Timestamp  opdate,
Timestamp  limitdate,
boolean  localcheckmd5,
long  newlid 
) [static]

Get the request string to check LSD

Parameters:
opdate 
limitdate 
localcheckmd5 
newlid 
Returns:
the request string

static int openlsd.database.data.LSDSpecific.check_load ( LSDDbAdmin  admin,
String  outputfile 
) [static]

Check Load

Parameters:
admin 
outputfile 
Returns:
the number of lines loaded

static LSDDbPreparedStatement openlsd.database.data.LSDSpecific.getSizeDocument ( LSDDbAdmin  admin  )  [static]

Return the Prepare Statement for get Size from Document in one Legacy/Storage

Parameters:
admin 
Returns:
the LSDDbPrepareStatement


Member Data Documentation

DB User

DB Password

DB Server

DB Driver

DB SID (Oracle)


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