Information Management IBM InfoSphere Master Data Management, Version 11.3

The pureQuery data access layer

The pureQuery® component is an IBM® data access layer implementation that is used by InfoSphere® MDM.

The pureQuery data access layer changes the way EObjs are added, updated and retrieved from the database. This changes the component level code for add, update and get. It also changes anywhere that the object is returned in the BObjQuery framework.

The EObj code is changed to include annotations which map the fields to columns in a database table.

EObj code examples

pureQuery Java™ annotations are used to map the EObj to its database table. For example:
@Table(name="XCONTACT") 
public class EObjXContactextends EObjCommon{
All the fields on the EObj should be annotated to map the field to the database column. For example:
@Id
@Column(name="CONTIDPK")
public LongContIdPK;

@Column(name="RISKSCORE")
public StringRisk_Score;
New methods setPrimaryKey and getPrimaryKey methods are used internally when generating primary keys for the EObj. For example:
public void setPrimaryKey(ObjectaUniqueId){
	//set primary key field here
	this.setContIdPK((Long)aUniqueId);
}
public Object getPrimaryKey(){
	//return Primary Key in string format 
	return this.getContIdPK();
}
Add any special processing required. If there is specialized processing that you require on this EObj before or after either an add or an update, you can add the following methods to your EObj:
  • beforeAddEx()
  • afterAddEx()
  • beforeUpdateEx()
  • afterUpdateEx()
For example:
protectedvoidbeforeAddEx(){
	if(getStartDt()==null){
		setStartDt(getCurrentTimestamp());
  }
}


Last updated: 27 June 2014