Data interfaces used to access the database
The data interfaces are used to define the simple select, insert and update statements that are used to access the database.
The MDM Workbench generates the data interface and its DataImpl implementation class. The implementation class is where the actual SQL execution logic is generated.
Example
import java.util.Iterator;
import java.sql.Timestamp;
import com.ibm.pdq.annotation.Select;
import com.ibm.pdq.annotation.Update;
public interface EObjXContactData {
// Select XCONTACT by parameters
@Select(sql="select CONTIDPK, RISKSCORE, RISKRECORDEDDT, LASTUPDATEDT, LASTUPDATEUSER,
LASTUPDATETXID from XCONTACT where CONTIDPK = ? ")
Iterator<EObjXContact> getEObjXContact(Long ContIdPK);
// Create XCONTACT by EObjXContact Object
@Update(sql="insert into XCONTACT (CONTIDPK, RISKSCORE, RISKRECORDEDDT, LASTUPDATEDT,
LASTUPDATEUSER, LASTUPDATETXID) values( :ContIdPK, :Risk_Score, :Risk_Recorded_Dt,
:lastUpdateDt, :lastUpdateUser, :lastUpdateTxId)")
int createEObjXContact(EObjXContact e);
// Update one XCONTACT by EObjXContact object
@Update(sql="update XCONTACT set CONTIDPK = :ContIdPK, RISKSCORE = :Risk_Score,
RISKRECORDEDDT = :Risk_Recorded_Dt, LASTUPDATEDT = :lastUpdateDt,
LASTUPDATEUSER = :lastUpdateUser, LASTUPDATETXID = :lastUpdateTxId where CONTIDPK
= :ContIdPK and LASTUPDATEDT = :oldLastUpdateDt")
int updateEObjXContact(EObjXContact e);
// Delete XCONTACT by parameters
@Update(sql="delete from XCONTACT where CONTIDPK = ? ")
int deleteEObjXContact(Long ContIdPK);
}Note that the MDM Workbench generates this code slightly differently using constants to define the actual SQL statements.
These createEObjXContact and updateEObjXContact methods
are used in the component level methods to add and update the EObj.