Runtime components : Channels components : Key features : Concepts : Channel management : Channel data model : DAO API
  
DAO API
Channel data model provides a series of DAO API, and you can use them to operate the channel data.
The following figures are DAO APIs:
public interface ChannelPolicyBaseDAO {
public ChannelPolicyBase getChannelPolicyBase(ChannelPolicyBasePK id) ;
public void addChannelPolicyBase(ChannelPolicyBase channelPolicyBase) ;
public void deleteChannelPolicyBase(ChannelPolicyBasePK id) ;
public void updateChannelPolicyBase(ChannelPolicyBase channelPolicyBase) ;
public List<RegisteredAccounts> getRegisteredAccountsNumber(ChannelPolicyBasePK id) ;
public void addRegisteredAccountsNumber(ChannelPolicyBasePK id, String[] accountNumbers) ;
public void setAccountNumberAlias(ChannelPolicyBasePK id, String accountNumber, String accountAlias) ;
public void removeRegisteredAccountNumber(ChannelPolicyBasePK id, String[] accountNumbers) ;
}
An instance of ChannelPolicyBase is responding to a line in Channel Policy Base table. And ChannelPolicyBasePK is the key of ChannelPolicyBase, which including the fields:
custId
channelId
The interface to operation on ChannelRuntime entity:
public interface ChannelRuntimeDAO {
public ChannelRuntime getChannelRuntime(ChannelRuntimePK id) ;
public void addChannelRuntime(ChannelRuntime channelRuntime) ;
public void deleteChannelRuntime(ChannelRuntimePK id) ;
public void updateChannelRuntime(ChannelRuntime channelRuntime) ;
public void increaseTransferedAmount(ChannelRuntimePK id, Double amount) ;
public void increaseTransferedCount(ChannelRuntimePK id) ;
public void increasePasswordErrorCount(ChannelRuntimePK id ) ;
public void resetChannelRuntime(ChannelRuntimePK id ) ;
public void resetChannelRuntimeAll() ;
}
An instance of ChannelRuntime is responding to a line in Channel Runtime table. And ChannelRuntimePK is the key of ChannelRuntime, which including the fields:
custId
channelId
The following codes give an example to use these interfaces:
ChannelPolicyBaseDAO baseDao=new ChannelPolicyBaseDAOImpl();
ChannelPolicyBase policybase=new ChannelPolicyBase();
policybase.setId(new ChannelPolicyBasePK("user01", "InternetBanking"));
policybase.setLoginAlias("kkkk");

baseDao.addChannelPolicyBase(policybase);
In the example, a new ChannelPolicyBase instance is created in the DB. The class ChannelPolicyBaseDAOImpl is the implementation class of ChannelPolicyBaseDAO; the class ChannelRuntimeDAOImpl is the implementation class of ChannelRuntimeDAO.
Go up to
Channel data model