src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java
changeset 54106 9a90236ab64c
parent 47216 71c04702a3d5
child 55422 c439c469e803
equal deleted inserted replaced
54105:d58599c7cdef 54106:9a90236ab64c
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    34 
    34 
    35 /**
    35 /**
    36  * The standard interface that all implementations of a {@code WebRowSet}
    36  * The standard interface that all implementations of a {@code WebRowSet}
    37  * must implement.
    37  * must implement.
    38  *
    38  *
    39  * <h3>1.0 Overview</h3>
    39  * <h2>1.0 Overview</h2>
    40  * The {@code WebRowSetImpl} provides the standard
    40  * The {@code WebRowSetImpl} provides the standard
    41  * reference implementation, which may be extended if required.
    41  * reference implementation, which may be extended if required.
    42  * <P>
    42  * <P>
    43  * The standard WebRowSet XML Schema definition is available at the following
    43  * The standard WebRowSet XML Schema definition is available at the following
    44  * URI:
    44  * URI:
    76  * a {@code WebRowSet} maintains the ability to synchronize changes
    76  * a {@code WebRowSet} maintains the ability to synchronize changes
    77  * in its data back to the originating data source.
    77  * in its data back to the originating data source.
    78  * </li>
    78  * </li>
    79  * </ul>
    79  * </ul>
    80  *
    80  *
    81  * <h3>2.0 WebRowSet States</h3>
    81  * <h2>2.0 WebRowSet States</h2>
    82  * The following sections demonstrates how a {@code WebRowSet} implementation
    82  * The following sections demonstrates how a {@code WebRowSet} implementation
    83  * should use the XML Schema to describe update, insert, and delete operations
    83  * should use the XML Schema to describe update, insert, and delete operations
    84  * and to describe the state of a {@code WebRowSet} object in XML.
    84  * and to describe the state of a {@code WebRowSet} object in XML.
    85  *
    85  *
    86  * <h4>2.1 State 1 - Outputting a {@code WebRowSet} Object to XML</h4>
    86  * <h2>2.1 State 1 - Outputting a {@code WebRowSet} Object to XML</h2>
    87  * In this example, a {@code WebRowSet} object is created and populated with a simple 2 column,
    87  * In this example, a {@code WebRowSet} object is created and populated with a simple 2 column,
    88  * 5 row table from a data source. Having the 5 rows in a {@code WebRowSet} object
    88  * 5 row table from a data source. Having the 5 rows in a {@code WebRowSet} object
    89  * makes it possible to describe them in XML. The
    89  * makes it possible to describe them in XML. The
    90  * metadata describing the various standard JavaBeans properties as defined
    90  * metadata describing the various standard JavaBeans properties as defined
    91  * in the RowSet interface plus the standard properties defined in
    91  * in the RowSet interface plus the standard properties defined in
   214  *                      4
   214  *                      4
   215  *              </columnValue>
   215  *              </columnValue>
   216  *      </currentRow>
   216  *      </currentRow>
   217  * </data>
   217  * </data>
   218  * }</PRE>
   218  * }</PRE>
   219  * <h4>2.2 State 2 - Deleting a Row</h4>
   219  * <h2>2.2 State 2 - Deleting a Row</h2>
   220  * Deleting a row in a {@code WebRowSet} object involves simply moving to the row
   220  * Deleting a row in a {@code WebRowSet} object involves simply moving to the row
   221  * to be deleted and then calling the method {@code deleteRow}, as in any other
   221  * to be deleted and then calling the method {@code deleteRow}, as in any other
   222  * {@code RowSet} object.  The following
   222  * {@code RowSet} object.  The following
   223  * two lines of code, in which <i>wrs</i> is a {@code WebRowSet} object, delete
   223  * two lines of code, in which <i>wrs</i> is a {@code WebRowSet} object, delete
   224  * the third row.
   224  * the third row.
   263  *                      4
   263  *                      4
   264  *              </columnValue>
   264  *              </columnValue>
   265  *      </currentRow>
   265  *      </currentRow>
   266  * </data>
   266  * </data>
   267  *} </PRE>
   267  *} </PRE>
   268  * <h4>2.3 State 3 - Inserting a Row</h4>
   268  * <h2>2.3 State 3 - Inserting a Row</h2>
   269  * A {@code WebRowSet} object can insert a new row by moving to the insert row,
   269  * A {@code WebRowSet} object can insert a new row by moving to the insert row,
   270  * calling the appropriate updater methods for each column in the row, and then
   270  * calling the appropriate updater methods for each column in the row, and then
   271  * calling the method {@code insertRow}.
   271  * calling the method {@code insertRow}.
   272  * <PRE>
   272  * <PRE>
   273  * {@code
   273  * {@code
   335  *                      4
   335  *                      4
   336  *              </columnValue>
   336  *              </columnValue>
   337  *      </currentRow>
   337  *      </currentRow>
   338  * </date>
   338  * </date>
   339  *} </PRE>
   339  *} </PRE>
   340  * <h4>2.4 State 4 - Modifying a Row</h4>
   340  * <h2>2.4 State 4 - Modifying a Row</h2>
   341  * Modifying a row produces specific XML that records both the new value and the
   341  * Modifying a row produces specific XML that records both the new value and the
   342  * value that was replaced.  The value that was replaced becomes the original value,
   342  * value that was replaced.  The value that was replaced becomes the original value,
   343  * and the new value becomes the current value. The following
   343  * and the new value becomes the current value. The following
   344  * code moves the cursor to a specific row, performs some modifications, and updates
   344  * code moves the cursor to a specific row, performs some modifications, and updates
   345  * the row when complete.
   345  * the row when complete.