Business components : Business components : Branch application components : Electronic Journal and Electronic Journal Viewer : Concepts
  
Concepts
See also
Electronic Journal table
Electronic Journal APIs
Electronic Journal and Electronic Journal Viewer
Electronic Journal table
EJ table is used to store the EJ records. All the transaction share the same table regardless of the types of the transaction. Five fields are fixed as the following table shows:
 
Type
Non-NULL
Key
Fields ID
1CHAR(32)
Yes
Yes
UserID
2CHAR(8)
Yes
Yes
Date
3INT
Yes
Yes
RecordSeqNum
4VARCHAR(200)
 
 
RestoreData
5BLOB
 
 
RestoreDetailData
The UserID, Date and RecordSeqNum are the primary keys. The RestoreData is the transaction data and RestoreDetailData is the GUI information. Both of them are needed for Electronic Journal Viewer's recurrence. The RestoreDetailData can be the path of the UDTT XUI file, the content of the XUI, the snapshot of the transaction UI, or some other kinds of GUI information.
In addition to the five fixed fields above, user can self-defined fields of journal in table:
 
HeaderNon_Null
Header
Header
1
BankID
CHAR(20)
2
BranchID
CHAR(20)
3
SectionID
CHAR(20)
4
AdminID
CHAR(20)
5
TxnType
CHAR(2)
6Yes
TxnID
CHAR(12)
7
Status
CHAR(8)
8
StartTime
CHAR(16)
9
EndTime
CHAR(16)
10
ErrorCode
CHAR(8)
11
ACCOUNT
CHAR(26)
12
ACCOUNT2
CHAR(26)
13
AMOUNT
DECIMAL(15,2)
14
AMOUNT2
DECIMAL(15,2)
15
CurrencyType
CHAR(8)
16
REMARK
CHAR(32)
17
Reserve1
CHAR(32)
18
Reserve2
CHAR(64)
See also
Concepts
Electronic Journal APIs
The following APIs are provided by the UNICOM® Digital Transformation Toolkit (UDTT™) Electronic Journal:
BTTEJ
EJRecord
Implementation of EJ interface
Validator for EJ Record
JDBC DAO for EJ
See also
BTTEJ
EJRecord
Implementation of EJ interface
Validator for EJ Record
JDBC DAO for EJ
Concepts
BTTEJ
BTTEJ is a common interface for all the EJ implementation. It contains the following APIs:
Add a record
public int addRecord(EJRecord record) throws BTTEJException
This method is used to add a record, and a record sequence number will be returned.
Query the records
public EJRecord[] queryRecord(EJQueryConditions queryConditions)throws BTTEJException
This method is used to query the EJ records. It uses the EJQueryConditions to construct a SQL sentence. The function returns the array of retrievied EJRecords
Retrieve the RestoreDetailData
public EJRecord getEJRecordRestoreDetailData(EJRecord record) throws BTTEJException
This method is used to retrieve the RestoreDetailData information of an EJRecord.
New record
public EJRecord getNewEJRecordInstance()
This method is used to get a new EJRecord instance. It serves as a factory method.
See also
Electronic Journal APIs
EJRecord
One instance of EJRecord corresponds to one transaction record. Before you insert a record to the database, each variable of the record should be initiated. You can set and get the information through the following methods. The name of the methods explains their function clearly.
public Object getFieldData (FieldDescriptor fd);
public void setFieldData (FieldDescriptor fd, Object value);
public Object getFieldData (String fieldName) throws BTTEJFieldNameNotDefinedException
public void setFieldData (String fieldName, Object value) throws BTTEJFieldNameNotDefinedException
See also
Electronic Journal APIs
Implementation of EJ interface
UNICOM® Digital Transformation Toolkit (UDTT™) provides the class BTTEJBase to implement the EJ interface. BTTEJBase is in charge of controlling record sequence number, validating the record value, access control and DAO access. And another class BTTEJBufferImpl, which extends from the BTTEJBase, provides a buffered EJ implementation as the following picture shows.
This graphic is described in the surrounding text.
See also
Electronic Journal APIs
Validator for EJ Record
The validator in UDTT EJ is also provided as interface, you should implement them as needed, because the table structure is not fixed. There are also two method declarations in the interface EJRecordValidator.
public void validateRecord(EJRecord record) throws BTTEJRecordInvalidException
The method is used to validate the record before adding or updating the corresponding record into the database.
public void validateQueryconditions(EJQueryConditions queryConditions) throws BTTEJQueryConditionsInvalidException
The method is used to validate queryCondtions before using its information in a SQL sentence.
See also
Electronic Journal APIs
JDBC DAO for EJ
UNICOM® Digital Transformation Toolkit (UDTT™) provides class EJDAOJdbcImpl to implements the JDBC DAO. It supports two types of runtime environment:
Data Source. It's managed by the server container and used by the DAO implementation directly.
JDBC1.0 Drive Manager.
See also
Electronic Journal APIs