openlsd.database.data.LSDDbControl Class Reference
List of all members.
Detailed Description
Class for Op(eration) manipulation
- Author:
- Frederic Bregier LGPL
|
Public Member Functions |
| LSDDbControl () |
| LSDDbControl (long lid, long idip, int op, long did, Timestamp opdate) |
boolean | get (ResultSet resultSet) |
boolean | insert (LSDDbAdmin admin, boolean isCommit) |
boolean | update (LSDDbAdmin admin, long did, boolean isCommit) |
boolean | getCheck (LSDDbAdmin admin, long lid, long idip) |
String | toString () |
Static Public Member Functions |
static boolean | setInitialOpHandler (LSDDbAdmin admin) |
static void | getLock (LSDDbAdmin admin) |
static void | unsetLock (LSDDbAdmin admin) |
static long | getLockSQL (LSDDbAdmin admin) |
static void | unsetLockSQL (LSDDbAdmin admin) |
static boolean | updateOpHandler (LSDDbAdmin admin, long newdid, boolean isCommit) |
Public Attributes |
long | lid = LSDConstants.invalide_idx |
long | idip = LSDConstants.invalide_idx |
int | op = 0 |
long | did = LSDConstants.invalide_idx |
Timestamp | opdate = null |
Static Public Attributes |
static final int | OPcontrol = -1 |
static final int | OPnoop = 0 |
static final int | OPcheck = 1 |
static final String | table = " lsdcontrol " |
static final String[] | fields |
static final int | rlid = 0 |
static final int | ridip = 1 |
static final int | rop = 2 |
static final int | rdid = 3 |
static final int | ropdate = 4 |
static final String | allfields |
static ReentrantLock | lock = new ReentrantLock() |
Static Private Attributes |
static final String | insertfields |
Constructor & Destructor Documentation
openlsd.database.data.LSDDbControl.LSDDbControl |
( |
|
) |
|
openlsd.database.data.LSDDbControl.LSDDbControl |
( |
long |
lid, |
|
|
long |
idip, |
|
|
int |
op, |
|
|
long |
did, |
|
|
Timestamp |
opdate | |
|
) |
| | |
Create a Control from args
- Parameters:
-
Member Function Documentation
boolean openlsd.database.data.LSDDbControl.get |
( |
ResultSet |
resultSet |
) |
|
Get Values from ResultSet
- Parameters:
-
- Returns:
- True if OK, else False
boolean openlsd.database.data.LSDDbControl.insert |
( |
LSDDbAdmin |
admin, |
|
|
boolean |
isCommit | |
|
) |
| | |
Insert data into DB from object.
- Parameters:
-
- Returns:
- True if OK, else False
boolean openlsd.database.data.LSDDbControl.update |
( |
LSDDbAdmin |
admin, |
|
|
long |
did, |
|
|
boolean |
isCommit | |
|
) |
| | |
Update opdate into BD if opdate not null
- Parameters:
-
- Returns:
- True if OK, else False
boolean openlsd.database.data.LSDDbControl.getCheck |
( |
LSDDbAdmin |
admin, |
|
|
long |
lid, |
|
|
long |
idip | |
|
) |
| | |
Get the Control object from DB for Check only
- Parameters:
-
- Returns:
- True if OK, else False
static boolean openlsd.database.data.LSDDbControl.setInitialOpHandler |
( |
LSDDbAdmin |
admin |
) |
[static] |
Initialize if needed the OpHandler control in Control Table.
- Parameters:
-
- Returns:
- True if OK
static void openlsd.database.data.LSDDbControl.getLock |
( |
LSDDbAdmin |
admin |
) |
[static] |
Get Lock for Control (JVM Only, since SQL should be done elsewhere)
- Parameters:
-
static void openlsd.database.data.LSDDbControl.unsetLock |
( |
LSDDbAdmin |
admin |
) |
[static] |
Set Unlock for Control (JVM Only, since SQL should be done elsewhere)
- Parameters:
-
static long openlsd.database.data.LSDDbControl.getLockSQL |
( |
LSDDbAdmin |
admin |
) |
[static] |
Get Lock for Control SQL only (PostGre/MySQL)
- Parameters:
-
- Returns:
- the next valid index or invalide_idx if error
static void openlsd.database.data.LSDDbControl.unsetLockSQL |
( |
LSDDbAdmin |
admin |
) |
[static] |
Set Unlock for Control SQL only (PostGre/MySQL)
- Parameters:
-
static boolean openlsd.database.data.LSDDbControl.updateOpHandler |
( |
LSDDbAdmin |
admin, |
|
|
long |
newdid, |
|
|
boolean |
isCommit | |
|
) |
| | [static] |
Set Unlock for Control SQL
- Parameters:
-
- Returns:
- True if updated
String openlsd.database.data.LSDDbControl.toString |
( |
|
) |
|
Object to String
- Returns:
- the string that displays this object
- See also:
- java.lang.Object.toString()
Member Data Documentation
Date (Timestamp) of this Control
Function: control line in database
information for DB manipulation: Table name
Initial value:
{"LID","IDIP","OP","DID","OPDATE"}
DB field names
Initial value:
DB field for all fields in select command.
Initial value:
DB field for insert
Lock for new Control test
The documentation for this class was generated from the following file:
- OpenLSD/ClientSupport/openlsd/database/data/LSDDbControl.java