| Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - | 
			Contents
			Index
			![]()  
		 | 
	
| Part 1 The Basic for Developing Application | > Chapter 6 Direct Access Function | > 6.5 Deleting Data by Direct Access Key | 
The deleteByKey method is used in the direct deletion for Java API.
The following figure shows the flow of the direct deletion for Java API.

Sample Code
ShunConnection con = new ShunConnection();
ShunPreparedKey preDkey = con.prepareDeleteKey("key1");           (1)
preDkey.add("20061101,00000001");                                 (2)
preDkey.add("20061101,00000002");                                 (2)
preDkey.add("20061101,00000003");                                 (2)
preDkey.setSearchType(ShunPreparedKey.SHUN_KEY_COMPLETE_MATCH);
preDkey.deleteByKey();                                            (3)
preDkey.close();                                                  (4)
con.close(); | 
(1) Create a ShunPreparedKey ObjectSpecify a direct access key name as parameters of the prepareDeleteKey method to create a ShunPreparedKey object by specifying.
(2) Set the Direct Access KeyUse the Add method to set the direct access key.
Multiple direct access keys can be set by using add method.

Specify multiple direct access keys with the add method to delete multiple XML documents at a time.
(3) Delete the DataExecute the delete process using the deleteByKey method.
(4) Release the ShunPreparedKey ObjectUse the close method of the ShunPreparedKey object to release the object when it is no longer required.

Refer to F.3.3 Delete Data Using Direct Access Key for the sample program of the direct access.
			Contents
			Index
			![]()  
		 |