LexBuild Backend Logics

  1. Create logics:

    Create a new lexical record from scratch.

    StateDatabase tableSet LastActionDescriptions
    SubmitLEX_RECORD_TEMP check if the record with sepcified EUI is pending (exist in LEX_RECORD_TEMP)
    SubmitLEX_RECORD_TEMP1(create)insert record into LEX_RECORD_TEMP
    SubmitINFL_VARS_TEMP Generate unique (var, infl, cat, cit, eui, unInfl) inflVars and insert into INFL_VARS_TEMP
    ApproveLEX_RECORD_TEMP check if the record is Re-editing
    ApproveLEX_RECORD1insert record into LEX_RECORD
    ApproveLEX_RECORD_TEMP delete record from LEX_RECORD_TEMP with specified Eui & lastAction = 1
    ApproveINFL_VARS insert records with same eui into INFL_VARS
    ApproveINFL_VARS_TEMP delete records from INFL_VARS_TEMP with specified Eui
    DenyLEX_RECORD_TEMP check if the record is Re-editing
    DenyLEX_RECORD_TEMP delete record in LEX_RECORD_TEMP with specified eui and lastAction = 1
    DenyINFL_VARS_TEMP delete records in INFL_VARS_TEMP with specified eui
    ViewLEX_RECORD_TEMP select all records in LEX_RECORD_TEMP with lastAction = 1

  2. Modify logics:

    Modify an existing lexical record from LEXICON.

    StateDatabase tableSet LastActionDescriptions
    SubmitLEX_RECORD_TEMP check if the record with sepcified EUI is pending (exist in LEX_RECORD_TEMP)
    SubmitLEX_RECORD4 (Pending)update record with specified Eui
    SubmitLEX_RECORD_TEMP2 (modify)insert record into LEX_RECORD_TEMP
    SubmitINFL_VARS_TEMP Generate unique (var, infl, cat, cit, eui, unInfl) inflVars and insert into INFL_VARS_TEMP
    ApproveLEX_RECORD_TEMP check if the record is Re-editing
    ApproveLEX_RECORD2update record in LEX_RECORD
    ApproveLEX_RECORD_TEMP delete record from LEX_RECORD_TEMP with specified Eui & lastAction = 2
    ApproveINFL_VARS delete records from INFL_VARS with specified Eui
    ApproveINFL_VARS insert records to INFL_VARS from INFL_VARS_TEMP with specified Eui
    ApproveINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    DenyLEX_RECORD_TEMP check if the record is Re-editing
    DenyLEX_RECORD2update record with eui and lastAction = 4
    DenyLEX_RECORD_TEMP delete record in LEX_RECORD_TEMP with eui and lastAction = 2
    DenyINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    ViewLEX_RECORD_TEMP select all records in LEX_RECORD_TEMP with lastAction = 2

  3. Delete logics:

    Delete an existing record from LEXICON (mark the lastAction to delete).

    StateDatabase tableSet LastActionDescriptions
    SubmitLEX_RECORD_TEMP check if the record with sepcified EUI is pending (exist in LEX_RECORD_TEMP)
    SubmitLEX_RECORD4 (Pending)update record with specified Eui
    SubmitLEX_RECORD_TEMP3 (Delete)insert record into LEX_RECORD_TEMP
    SubmitINFL_VARS_TEMP insert inflVars records (from INFL_VARS) into INFL_VARS_TEMP
    ApproveLEX_RECORD3update this record in LEX_RECORD
    ApproveLEX_RECORD_TEMP delete record from LEX_RECORD_TEMP with specified Eui & lastAction = 3
    ApproveINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    DenyLEX_RECORD2update record with eui and lastAction = 4
    DenyLEX_RECORD_TEMP delete record in LEX_RECORD_TEMP with eui and lastAction = 3
    DenyINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    ViewLEX_RECORD_TEMP select all records in LEX_RECORD_TEMP with lastAction = 3

  4. Restore logics:

    Restore a deleted (lastAction is marked delete) record from LEXICON.

    StateDatabase tableSet LastActionDescriptions
    SubmitLEX_RECORD_TEMP check if the record with sepcified EUI is pending (exist in LEX_RECORD_TEMP)
    SubmitLEX_RECORD4 (Pending)update record with specified Eui
    SubmitLEX_RECORD_TEMP5 (restore)insert record into LEX_RECORD_TEMP
    SubmitINFL_VARS_TEMP insert inflVars records (from INFL_VARS) into INFL_VARS_TEMP
    ApproveLEX_RECORD5update record in LEX_RECORD
    ApproveLEX_RECORD_TEMP delete record from LEX_RECORD_TEMP with specified Eui & lastAction = 5
    ApproveINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    DenyLEX_RECORD3 (Delete)update record with eui and lastAction = 4
    DenyLEX_RECORD_TEMP delete record in LEX_RECORD_TEMP with eui and lastAction = 5
    DenyINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    ViewLEX_RECORD select all records in LEX_RECORD with lastAction = 3
    ViewLEX_RECORD_TEMP select all records in LEX_RECORD_TEMP with lastAction = 5

  5. Purge logics:

    Cancel submitted records (waiting for approval). User can only purge the records they submitted before (same sa Deny function from manager).

    StateDatabase tableSet LastActionDescriptions
    SubmitLEX_RECORD_TEMP delete record in LEX_RECORD_TEMP with specified eui
    SubmitLEX_RECORD
  6. 1 (create) -> do nothing
  7. 2 (modify) -> 2
  8. 3 (delete) -> 2
  9. 5 (restore) -> 3
  10. update record in LEX_RECORD with specified eui
    SubmitINFL_VARS_TEMP delete inflVars records from INFL_VARS_TEMP with specified Eui
    ViewLEX_RECORD_TEMP select all records in LEX_RECORD_TEMP with specified mSignature

  11. ReEdit logics:

    ReEdit submitted (created or modified) records. The reEdited records is lock during the reEditing.

    StateDatabase tableSet LastActionDescriptions
    ReEdit LockLEX_RECORD_TEMP
  12. 1 (create) -> 11 (lock + create)
  13. 2 (modify) -> 12 (lock + modify)
  14. Lock record with specified Eui
    SubmitLEX_RECORD_TEMP
  15. 11 (lock + create) -> 1 (create)
  16. 12 (lock + modify) -> 2 (modify)
  17. unlock and update record with specified Eui
    SubmitINFL_VARS_TEMP delete records from INFL_VARS_TEMP with specified Eui
    SubmitINFL_VARS_TEMP generate and insert inflVars records to INFL_VARS_TEMP with specified Eui
    ReEdit UnlockINFL_VARS_TEMP
  18. 11 (lock + create) -> 1 (create)
  19. 12 (lock + modify) -> 2 (modify)
  20. unlock records with specified Eui


Copyright and Privacy Policy