/usr/share/doc/libpirl-java/api/PIRL/Database/Update_DB.html is in libpirl-java-doc 2.3.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_09) on Tue Nov 20 23:14:34 UTC 2012 -->
<title>Update_DB</title>
<meta name="date" content="2012-11-20">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Update_DB";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../PIRL/Database/SQL.Undoable_Edit_Listener.html" title="class in PIRL.Database"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?PIRL/Database/Update_DB.html" target="_top">Frames</a></li>
<li><a href="Update_DB.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">PIRL.Database</div>
<h2 title="Class Update_DB" class="title">Class Update_DB</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>PIRL.Database.Update_DB</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../PIRL/PVL/PVL_to_DB.html" title="class in PIRL.PVL">PVL_to_DB</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Update_DB</span>
extends <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><i>Update_DB</i> updates an existing database table record or inserts a
new record in a table.
<p>
Database update operations are based on references to one or more
tables to be affected plus, for each table reference, a list of
table field names paired with the values that they are to receive.
By attaching a key (SQL conditional expression) to a table
reference one or more records from the table can be selected to
have the specified field values updated. Without a key the field
values will be put in a new record inserted at the end of the
table.
<p>
An application <a href="../../PIRL/Database/Update_DB.html#main(java.lang.String[])"><code>main</code></a> is provided using a
<a href="../../PIRL/Database/Update_DB.html#Usage(boolean)"><code>command line user inteface</code></a> that will invoke the
update operations of this class.
<p></div>
<dl><dt><span class="strong">See Also:</span></dt><dd><code>PIRL.Database</code>,
<code>PIRL.Configuration</code></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#DEFAULT_CONFIGURATION_FILENAME">DEFAULT_CONFIGURATION_FILENAME</a></strong></code>
<div class="block">The default Configuration filename.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Delete">Delete</a></strong></code>
<div class="block">Flag for <a href="../../PIRL/Database/Update_DB.html#Delete(boolean)"><code>deleting</code></a> selected records instead
of updating them.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_CONFIGURATION_PROBLEM">EXIT_CONFIGURATION_PROBLEM</a></strong></code>
<div class="block">Application exit status when there is a Configuration file problem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_DATABASE_ERROR">EXIT_DATABASE_ERROR</a></strong></code>
<div class="block">Application exit status when there is a problem accessing the Database.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_ILLEGAL_ARGUMENT">EXIT_ILLEGAL_ARGUMENT</a></strong></code>
<div class="block">Application exit status when an illegal argument is encountered.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_INVALID_COMMAND_LINE_SYNTAX">EXIT_INVALID_COMMAND_LINE_SYNTAX</a></strong></code>
<div class="block">Application exit status when invalid command line syntax was encounterd.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_IO_ERROR">EXIT_IO_ERROR</a></strong></code>
<div class="block">Application exit status when an I/O error occured on an arguments file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#EXIT_STATUS_LIMIT">EXIT_STATUS_LIMIT</a></strong></code>
<div class="block">Application exit status limit indicating the number of records affected.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#ID">ID</a></strong></code>
<div class="block">The Class identification.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Ignore_Multiple_Updates">Ignore_Multiple_Updates</a></strong></code>
<div class="block">Flag for ignoring multiple updates, rather than throwing an exception,
when <a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only</code></a> is enabled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#KEY_DELIMITER">KEY_DELIMITER</a></strong></code>
<div class="block">Key delimiter for table/field references.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#NL">NL</a></strong></code>
<div class="block">System new line sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#The_Database">The_Database</a></strong></code>
<div class="block">The Database to be updated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_One_Only">Update_One_Only</a></strong></code>
<div class="block">Flag for limiting updates to one record.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#VALUE_DELIMITER">VALUE_DELIMITER</a></strong></code>
<div class="block">Delimiter for input field assignments' values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Verbose">Verbose</a></strong></code>
<div class="block">Flag for verbose operation.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_DB(PIRL.Database.Database)">Update_DB</a></strong>(<a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a> database)</code>
<div class="block">Constructs an Update_DB object from a Configuration with a
connection to a database server.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Database()">Database</a></strong>()</code>
<div class="block">Gets the Database being updated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Delete()">Delete</a></strong>()</code>
<div class="block">Tests if record deletion is enabled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Delete(boolean)">Delete</a></strong>(boolean enable)</code>
<div class="block">Enables or disables record deletion.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Ignore_Multiple_Updates()">Ignore_Multiple_Updates</a></strong>()</code>
<div class="block">Tests if multiple record updates will be ignored when only one
record is allowed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Ignore_Multiple_Updates(boolean)">Ignore_Multiple_Updates</a></strong>(boolean enable)</code>
<div class="block">Enables or disables ignoring multiple record updates, rather than
throwing an exception, when only one record is allowed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#main(java.lang.String[])">main</a></strong>(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] args)</code>
<div class="block">Runs the Update_DB application.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_Database(java.lang.String, java.lang.String, java.util.Vector, java.util.Vector)">Update_Database</a></strong>(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> table_reference,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_names,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_values)</code>
<div class="block">Updates the database.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_Database(java.lang.String, java.util.Vector)">Update_Database</a></strong>(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> table_reference,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_assignments)</code>
<div class="block">Updates the database using a table reference and field assignments.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_One_Only()">Update_One_Only</a></strong>()</code>
<div class="block">Tests if the single record update rule is enabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)">Update_One_Only</a></strong>(boolean enable)</code>
<div class="block">Enables or disables the single record update only rule.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Usage(boolean)">Usage</a></strong>(boolean verbose)</code>
<div class="block">Command line usage syntax.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Verbose()">Verbose</a></strong>()</code>
<div class="block">Tests if verbose mode is enabled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a></code></td>
<td class="colLast"><code><strong><a href="../../PIRL/Database/Update_DB.html#Verbose(boolean)">Verbose</a></strong>(boolean enable)</code>
<div class="block">Enables or disables verbose mode.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="ID">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ID</h4>
<pre>public static final <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ID</pre>
<div class="block">The Class identification.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.ID">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_CONFIGURATION_FILENAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CONFIGURATION_FILENAME</h4>
<pre>public static final <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_CONFIGURATION_FILENAME</pre>
<div class="block">The default Configuration filename.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.DEFAULT_CONFIGURATION_FILENAME">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="KEY_DELIMITER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_DELIMITER</h4>
<pre>public static final char KEY_DELIMITER</pre>
<div class="block">Key delimiter for table/field references.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.KEY_DELIMITER">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="VALUE_DELIMITER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VALUE_DELIMITER</h4>
<pre>public static final char VALUE_DELIMITER</pre>
<div class="block">Delimiter for input field assignments' values.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.VALUE_DELIMITER">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="The_Database">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>The_Database</h4>
<pre>protected <a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a> The_Database</pre>
<div class="block">The Database to be updated.</div>
</li>
</ul>
<a name="Verbose">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Verbose</h4>
<pre>protected boolean Verbose</pre>
<div class="block">Flag for verbose operation.</div>
</li>
</ul>
<a name="Update_One_Only">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Update_One_Only</h4>
<pre>protected boolean Update_One_Only</pre>
<div class="block">Flag for limiting updates to one record.</div>
</li>
</ul>
<a name="Ignore_Multiple_Updates">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Ignore_Multiple_Updates</h4>
<pre>protected boolean Ignore_Multiple_Updates</pre>
<div class="block">Flag for ignoring multiple updates, rather than throwing an exception,
when <a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only</code></a> is enabled.</div>
</li>
</ul>
<a name="Delete">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Delete</h4>
<pre>protected boolean Delete</pre>
<div class="block">Flag for <a href="../../PIRL/Database/Update_DB.html#Delete(boolean)"><code>deleting</code></a> selected records instead
of updating them.</div>
</li>
</ul>
<a name="EXIT_INVALID_COMMAND_LINE_SYNTAX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_INVALID_COMMAND_LINE_SYNTAX</h4>
<pre>public static final int EXIT_INVALID_COMMAND_LINE_SYNTAX</pre>
<div class="block">Application exit status when invalid command line syntax was encounterd.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_INVALID_COMMAND_LINE_SYNTAX">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EXIT_CONFIGURATION_PROBLEM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_CONFIGURATION_PROBLEM</h4>
<pre>public static final int EXIT_CONFIGURATION_PROBLEM</pre>
<div class="block">Application exit status when there is a Configuration file problem.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_CONFIGURATION_PROBLEM">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EXIT_DATABASE_ERROR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_DATABASE_ERROR</h4>
<pre>public static final int EXIT_DATABASE_ERROR</pre>
<div class="block">Application exit status when there is a problem accessing the Database.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_DATABASE_ERROR">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EXIT_ILLEGAL_ARGUMENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_ILLEGAL_ARGUMENT</h4>
<pre>public static final int EXIT_ILLEGAL_ARGUMENT</pre>
<div class="block">Application exit status when an illegal argument is encountered.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_ILLEGAL_ARGUMENT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EXIT_IO_ERROR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_IO_ERROR</h4>
<pre>public static final int EXIT_IO_ERROR</pre>
<div class="block">Application exit status when an I/O error occured on an arguments file.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_IO_ERROR">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EXIT_STATUS_LIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXIT_STATUS_LIMIT</h4>
<pre>public static final int EXIT_STATUS_LIMIT</pre>
<div class="block">Application exit status limit indicating the number of records affected.
This is the maxium number of records that can be specified through
the 8-bit exit status value.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#PIRL.Database.Update_DB.EXIT_STATUS_LIMIT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="NL">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NL</h4>
<pre>protected static final <a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> NL</pre>
<div class="block">System new line sequence.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Update_DB(PIRL.Database.Database)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Update_DB</h4>
<pre>public Update_DB(<a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a> database)</pre>
<div class="block">Constructs an Update_DB object from a Configuration with a
connection to a database server.
<p>
The Configuration object is expected to contain all the necessary
information Update_DB needs to connect to the database.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>database</code> - The Database to be updated.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="Verbose(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Verbose</h4>
<pre>public <a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a> Verbose(boolean enable)</pre>
<div class="block">Enables or disables verbose mode.
<p>
When verbose mode is enabled all operations are logged. Verbose
mode is disabled by default.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>enable</code> - true to enable the mode, false to disable.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This Update_DB object.</dd></dl>
</li>
</ul>
<a name="Verbose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Verbose</h4>
<pre>public boolean Verbose()</pre>
<div class="block">Tests if verbose mode is enabled.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if verbose mode is enabled, false if disabled.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Verbose(boolean)"><code>Verbose(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Update_One_Only(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Update_One_Only</h4>
<pre>public <a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a> Update_One_Only(boolean enable)</pre>
<div class="block">Enables or disables the single record update only rule.
<p>
When enabled only one record will be allowed to be updated for any
table reference/field assignments set. The table reference key is
first used to select the records specified by the key and, if more
that one record is selected, the update operation is aborted. When
disabled (the default) more than one record may be updated by each
update set.
<p>
<b>N.B.</b>: Enforcing the single record update rule by doing an
initial select is not very efficient, and would be better
implemented using transaction rollbacks. However, since not all
databases support transaction rollbacks the select first method is
guaranteed to work with all databases. The initial select is not
done if the single record update rule is disabled.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>enable</code> - true to enable the rule, false to disable.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This Update_DB object.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Ignore_Multiple_Updates(boolean)"><code>Ignore_Multiple_Updates(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Update_One_Only()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Update_One_Only</h4>
<pre>public boolean Update_One_Only()</pre>
<div class="block">Tests if the single record update rule is enabled.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the rule is enabled, false if disabled.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Ignore_Multiple_Updates(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Ignore_Multiple_Updates</h4>
<pre>public <a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a> Ignore_Multiple_Updates(boolean enable)</pre>
<div class="block">Enables or disables ignoring multiple record updates, rather than
throwing an exception, when only one record is allowed.
<p>
When enabled and <a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only</code></a>
is also enabled if a table reference key selects more than one
record the update will not be done. When disabled and Update_One_Only
is enabled an IllegalArgumentException will be thrown with a message
describing the situation.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>enable</code> - If true multiple record updates will be ignored when
only one record is allowed; otherwise an IllegalArgumentException
will be thrown in this case.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This Update_DB object.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Ignore_Multiple_Updates()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Ignore_Multiple_Updates</h4>
<pre>public boolean Ignore_Multiple_Updates()</pre>
<div class="block">Tests if multiple record updates will be ignored when only one
record is allowed.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if multiple record updates will be ignored when
only one record is allowed; otherwise an IllegalArgumentException
will be thrown in this case.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Ignore_Multiple_Updates(boolean)"><code>Ignore_Multiple_Updates(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Delete(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Delete</h4>
<pre>public <a href="../../PIRL/Database/Update_DB.html" title="class in PIRL.Database">Update_DB</a> Delete(boolean enable)</pre>
<div class="block">Enables or disables record deletion.
<p>
When delete is enabled and the table reference includes a key that
selects one or more records, the records will be deleted rather than
updated. If <a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>Update_One_Only</code></a> is also
enabled the check for a single record selection will be applied.
<p>
If no key is provided
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>enable</code> - If true selected records will be deleted; otherwise
selected records will be updated.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This Update_DB object.</dd></dl>
</li>
</ul>
<a name="Delete()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Delete</h4>
<pre>public boolean Delete()</pre>
<div class="block">Tests if record deletion is enabled.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if record deletion is enabled; false otherwise.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Delete(boolean)"><code>Delete(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="Database()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Database</h4>
<pre>public <a href="../../PIRL/Database/Database.html" title="class in PIRL.Database">Database</a> Database()</pre>
<div class="block">Gets the Database being updated.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The Database currently being used.</dd></dl>
</li>
</ul>
<a name="Update_Database(java.lang.String, java.util.Vector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Update_Database</h4>
<pre>public int Update_Database(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> table_reference,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_assignments)
throws <a href="../../PIRL/Database/Database_Exception.html" title="class in PIRL.Database">Database_Exception</a>,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Updates the database using a table reference and field assignments.
<p>
A key is split off from the table_reference (on the first occurance
of a <code><a href="../../PIRL/Database/Update_DB.html#KEY_DELIMITER"><code>KEY_DELIMITER</code></a> character)</code>,
if possible. The field_assignments are split (on the first
occurance of a <code><a href="../../PIRL/Database/Update_DB.html#VALUE_DELIMITER"><code>VALUE_DELIMITER</code></a>
character) into a list of field names and their corresponding
values. Then the alternate <code><a href="../../PIRL/Database/Update_DB.html#Update_Database(java.lang.String, java.lang.String, java.util.Vector, java.util.Vector)"><code>Update_Database</code></a> </code> method is invoked.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>table_reference</code> - The table reference, with optional key.</dd><dd><code>field_assignments</code> - The Vector of fields with assigned values.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The number of records affected.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If the table_reference is null, or
a field assignment is missing either a name or value.</dd>
<dd><code><a href="../../PIRL/Database/Database_Exception.html" title="class in PIRL.Database">Database_Exception</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Update_DB.html#Update_Database(java.lang.String, java.lang.String, java.util.Vector, java.util.Vector)"><code>Update_Database(String, String, Vector, Vector)</code></a></dd></dl>
</li>
</ul>
<a name="Update_Database(java.lang.String, java.lang.String, java.util.Vector, java.util.Vector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Update_Database</h4>
<pre>public int Update_Database(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> table_reference,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_names,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> field_values)
throws <a href="../../PIRL/Database/Database_Exception.html" title="class in PIRL.Database">Database_Exception</a>,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Updates the database.
<p>
The details of for the arguments is described in the command line
<code><a href="../../PIRL/Database/Update_DB.html#Usage(boolean)"><code>Usage</code></a></code>..
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>table_reference</code> - A Database table reference, without any key.</dd><dd><code>key</code> - The SQL conditional to select records for an update
operation; null if an insert operation is to be done.</dd><dd><code>field_names</code> - The names of the fields into which data
will be placed.</dd><dd><code>field_values</code> - The values of the fields for the
corresponding field_names.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The number of records affected.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If <a href="../../PIRL/Database/Update_DB.html#Update_One_Only(boolean)"><code>only one</code></a> record is to be updated (not
inserted) and the key selects more than one record. Also, if the
table_reference is null, or a field assignment is missing either
a name or value.</dd>
<dd><code><a href="../../PIRL/Database/Database_Exception.html" title="class in PIRL.Database">Database_Exception</a></code> - If there is a problem accessing the database.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../PIRL/Database/Database.html#Insert(java.lang.String, java.util.Vector, java.util.Vector)"><code>Database.Insert(String, Vector, Vector)</code></a>,
<a href="../../PIRL/Database/Database.html#Update(java.lang.String, java.util.Vector, java.util.Vector, java.lang.String)"><code>Database.Update(String, Vector, Vector, String)</code></a></dd></dl>
</li>
</ul>
<a name="main(java.lang.String[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>main</h4>
<pre>public static void main(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] args)</pre>
<div class="block">Runs the Update_DB application.
<p>
<b>N.B.</b>: If a Database connection is establshed it is always
Disconnected before the application exits for any reason.
<p>
Exit status values:
<p>
>=0 - Success: the number of records affected (to a maximum of 250).<br>
255 - Invalid command line syntax.<br>
254 - Configuration problem.<br>
253 - Database access error.<br>
252 - An illegal argument was encountered.<br>
251 - An I/O error occured while attempting to read an argument file.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>args</code> - The <a href="../../PIRL/Database/Update_DB.html#Usage(boolean)"><code>command line</code></a> arguments.</dd></dl>
</li>
</ul>
<a name="Usage(boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Usage</h4>
<pre>public static void Usage(boolean verbose)</pre>
<div class="block">Command line usage syntax.
<p>
<blockquote><pre>
Usage: <b>Update_DB</b> <<i>Switches</i>>
Switches -
[<b>-<u>C</u>onfiguration</b> [<<i>filename</i>>]]
[<b>-<u>D</u>atabase</b>|<b>-<u>S</u>erver</b> <<i>server name</i>>]
<b>-<u>T</u>able</b>|<b>-<u>R</u>eference</b> [<<i>catalog</i>><b>.</b>]<<i>table</i>>[<b>:</b><<i>key</i>>]
<<i>field_name</i>><b>=</b><<i>value</i>> [...]
[<b>-<u>1</u></b>[<b><u>+</u></b>]]
[<b>-<u>+</u></b>]
[<b>-</b>[<b><u>N</u>o_</b>]<b><u>DE</u>lete</b>>]
[<b>-<u>V</u>erbose</b>]
[<b>-<u>Q</u>uiet</b>]
[<b>-<u>H</u>elp</b>]
</pre></blockquote>
<p>
<h4>
Configuration:
</h4><p>
If the name of the <a href="../../PIRL/Configuration/Configuration.html" title="class in PIRL.Configuration"><code>Configuration</code></a> file is not specified the <a href="../../PIRL/Database/Update_DB.html#DEFAULT_CONFIGURATION_FILENAME"><code>DEFAULT_CONFIGURATION_FILENAME</code></a> will be used. If the configuration
file is not in the current working directory, it will be looked for
in the user's home directory. The configuration file must contain
the necessary information needed to identify and connect with the
database server (as required by the <a href="../../PIRL/Database/Database.html#Database(PIRL.Configuration.Configuration)"><code>Database</code></a> constructor
and its <a href="../../PIRL/Database/Database.html#Connect()"><code>Connect</code></a> method).
These are typically the server "Host" name and database "Type",
"User" and "Password" access values.
<p>
Only one configuration file may be used.
<p>
<h4>
Database server name:
</h4><p>
The Configuration file may contain connection information for more
than one database. The information for each database is organized
by <a href="../../PIRL/Database/Database.html#SERVER"><code>Server</code></a> name, which may be specified. If
no server name is provided, the Database will attempt to use the
default (first) Server specified in the Configuration.
<p>
Only one database server may be used.
<p>
<h4>
Table reference:
</h4><p>
A Table Reference specifies a <<i>table</i>>, and its
containing <<i>catalog</i>>, to be updated. If the catalog is
not specified the Database will attempt to use the configuration
Catalog parameter for the Server group, or a default Catalog
parameter. The optional <<i>key</i>> is an SQL conditional
expression that is used to select the record(s) to be updated.
<b>N.B.</b>: If the key specification contains spaces then it must be
quoted; if it contains quotes then these must be escaped from shell
interpretation (by a preceeding backslash) or the the specification
is already quoted then the specication quotes must be different from
the enclosing quotes (use double quotes to enclose the specification
and single quotes in the specification content). If the key is not
present, a new record will be inserted into the table.
<p>
<h4>
Field value assignments:
</h4><p>
The list of one or more <<i>field_name</i>>=<<i>value</i>>
pairs specifies the name of the record fields and the values they are
to receive. <b>N.B.</b>: There are no spaces around the '='
character, unless the entire assignment is quoted; if the value
contains spaces then it must be quoted and quotes in the value
specification must be escaped from the shell or be different from any
enclosing quotes. If an update is occuring, only the specified fields
will be modified. If a record is being inserted, any records of the
field that are not specified will automatically be given their
default values by the database server.
<p>
<h4>
One (1) record update:
</h4><p>
By default, more than one record may be updated for each table
reference and field assignment list. By specifying the -1 option,
only one record will be allowed to be updated for each set. In this
case, if more than one record would be updated as a result of the
key selection this will be prevented and processing will abort.
However, if '+' is appended to this option processing will not
abort though the update will not be done.
<p>
The -+ option will enable multiple record updates. This is useful
when multiple update sets are specified and a previous set disabled
multiple record updates but the following sets should allow it.
<p>
<h4>
Deletion:
</h4><p>
Instead of updating records in the table selected records may be deleted
from the table. By default, or if -no_delete is specified, table
records are updated. A record selection key is required when delete
mode is in effect, and any field value assignments will be ignored.
One record update checking applies to record deletion.
<p>
<h4>
Update sets:
</h4><p>
<p>
A table reference and its following field value assignments, plus
any preceeding mode switches, up to the next table reference, if
any, constitutes an update set. Multiple update sets may be
specified on a command line. Each update set will be processed
before any following command line arguments are processed. The
configuration file and modes in effect at that point will apply to
the update set processing. An error encountered in an update set
halts all further processing of the command line.
<p>
<h4>
Arguments files:
</h4><p>
At any point on the command line an argument of the form
"@<<i>filename</i>>" may be specified. The file specified will
be read for command line arguments that are processed in the order
they occur in the file. When the end of file has been reached
processing continues with the next argument on the command line. In
effect, the content of an argument file replaces the
@<<i>filename</i>> argument on the command line. If the dash
character ('-') is used for the <<i>filename</i>> the arguments
will be read from the standard input. Any argument in an argument
file may be an argument file argument. Circular references are
detected and cause an error exit.
<p>
<h4>
Verbose/Quiet:
</h4><p>
The verbose option provides a log of operations as they occur printed
to the standard output. The quiet option disables the verbose mode.
By default quiet mode is in effect.
<p>
<h4>
Help:
</h4><p>
The command line syntax usage is listed and the program exits.
<b>N.B.</b>: If the -Help option occurs anywhere on the command line
no other command line arguments will be used.
<p>
<b>N.B.</b>The usage is printed to stderr. This method always
results in a System.exit with a status of <code><a href="../../PIRL/Database/Update_DB.html#EXIT_INVALID_COMMAND_LINE_SYNTAX"><code>EXIT_INVALID_COMMAND_LINE_SYNTAX</code></a></code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>verbose</code> - If true the usage is printed, otherwise silence.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../PIRL/Database/SQL.Undoable_Edit_Listener.html" title="class in PIRL.Database"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?PIRL/Database/Update_DB.html" target="_top">Frames</a></li>
<li><a href="Update_DB.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|