summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /examples
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-db-6.1.23.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'examples')
-rw-r--r--examples/c/csv/DbRecord.c2
-rw-r--r--examples/c/csv/README2
-rw-r--r--examples/c/csv/code.c13
-rw-r--r--examples/c/csv/csv.h2
-rw-r--r--examples/c/csv/csv_extern.h8
-rw-r--r--examples/c/csv/db.c12
-rw-r--r--examples/c/csv/load.c2
-rw-r--r--examples/c/csv/load_main.c18
-rw-r--r--examples/c/csv/query.c2
-rw-r--r--examples/c/csv/query_main.c2
-rw-r--r--examples/c/csv/util.c14
-rw-r--r--examples/c/ex_access.c2
-rw-r--r--examples/c/ex_apprec/ex_apprec.c2
-rw-r--r--examples/c/ex_apprec/ex_apprec.h2
-rw-r--r--examples/c/ex_apprec/ex_apprec.src2
-rw-r--r--examples/c/ex_apprec/ex_apprec_rec.c2
-rw-r--r--examples/c/ex_blob.c286
-rw-r--r--examples/c/ex_btrec.c2
-rw-r--r--examples/c/ex_bulk.c328
-rw-r--r--examples/c/ex_env.c28
-rw-r--r--examples/c/ex_heap.c10
-rw-r--r--examples/c/ex_lock.c2
-rw-r--r--examples/c/ex_mpool.c2
-rw-r--r--examples/c/ex_rep/base/rep_base.c4
-rw-r--r--examples/c/ex_rep/base/rep_base.h7
-rw-r--r--examples/c/ex_rep/base/rep_msg.c66
-rw-r--r--examples/c/ex_rep/base/rep_net.c52
-rw-r--r--examples/c/ex_rep/common/rep_common.c76
-rw-r--r--examples/c/ex_rep/common/rep_common.h30
-rw-r--r--examples/c/ex_rep/mgr/rep_mgr.c19
-rw-r--r--examples/c/ex_rep_chan/rep_chan.c2
-rw-r--r--examples/c/ex_rep_chan/rep_chan.h2
-rw-r--r--examples/c/ex_rep_chan/rep_chan_util.c14
-rw-r--r--examples/c/ex_rep_gsg/rep_mgr_gsg.c2
-rw-r--r--examples/c/ex_rep_gsg/simple_txn.c2
-rw-r--r--examples/c/ex_sequence.c2
-rw-r--r--examples/c/ex_stream.c2
-rw-r--r--examples/c/ex_thread.c2
-rw-r--r--examples/c/ex_tpcb.c2
-rw-r--r--examples/c/getting_started/example_database_load.c32
-rw-r--r--examples/c/getting_started/example_database_read.c17
-rw-r--r--examples/c/getting_started/gettingstarted_common.c12
-rw-r--r--examples/c/getting_started/gettingstarted_common.h4
-rw-r--r--examples/c/txn_guide/txn_guide.c2
-rw-r--r--examples/c/txn_guide/txn_guide_inmemory.c2
-rw-r--r--examples/csharp/excs_access/Properties/AssemblyInfo.cs4
-rw-r--r--examples/csharp/excs_access/excs_access.cs2
-rw-r--r--examples/csharp/excs_btrec/Properties/AssemblyInfo.cs4
-rw-r--r--examples/csharp/excs_btrec/excs_btrec.cs2
-rw-r--r--examples/csharp/excs_bulk/Properties/AssemblyInfo.cs2
-rw-r--r--examples/csharp/excs_bulk/excs_bulk.cs2
-rw-r--r--examples/csharp/excs_env/Properties/AssemblyInfo.cs4
-rw-r--r--examples/csharp/excs_env/excs_env.cs2
-rw-r--r--examples/csharp/excs_getting_started/DatabaseExample.cs2
-rw-r--r--examples/csharp/excs_getting_started/DatabaseLoader.cs2
-rw-r--r--examples/csharp/excs_getting_started/DatabaseReader.cs2
-rw-r--r--examples/csharp/excs_getting_started/Inventory.cs2
-rw-r--r--examples/csharp/excs_getting_started/MyDbs.cs2
-rw-r--r--examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs2
-rw-r--r--examples/csharp/excs_getting_started/Vendor.cs2
-rw-r--r--examples/csharp/excs_lock/Properties/AssemblyInfo.cs4
-rw-r--r--examples/csharp/excs_lock/excs_lock.cs2
-rw-r--r--examples/csharp/excs_repquote/Properties/AssemblyInfo.cs2
-rw-r--r--examples/csharp/excs_repquote/RepConfig.cs2
-rw-r--r--examples/csharp/excs_repquote/RepQuoteEnvironment.cs2
-rw-r--r--examples/csharp/excs_repquote/RepQuoteExample.cs2
-rw-r--r--examples/csharp/excs_sequence/Properties/AssemblyInfo.cs4
-rw-r--r--examples/csharp/excs_sequence/excs_sequence.cs2
-rw-r--r--examples/csharp/excs_txn/PayloadData.cs2
-rw-r--r--examples/csharp/excs_txn/Properties/AssemblyInfo.cs2
-rw-r--r--examples/csharp/excs_txn/excs_txn.cs2
-rw-r--r--examples/cxx/AccessExample.cpp2
-rw-r--r--examples/cxx/BtRecExample.cpp2
-rw-r--r--examples/cxx/BulkExample.cpp910
-rw-r--r--examples/cxx/EnvExample.cpp33
-rw-r--r--examples/cxx/LockExample.cpp2
-rw-r--r--examples/cxx/MpoolExample.cpp2
-rw-r--r--examples/cxx/SequenceExample.cpp2
-rw-r--r--examples/cxx/TpcbExample.cpp2
-rw-r--r--examples/cxx/excxx_repquote/RepConfigInfo.cpp2
-rw-r--r--examples/cxx/excxx_repquote/RepConfigInfo.h2
-rw-r--r--examples/cxx/excxx_repquote/RepQuoteExample.cpp2
-rw-r--r--examples/cxx/excxx_repquote/dbc_auto.h2
-rw-r--r--examples/cxx/excxx_repquote_gsg/RepConfigInfo.h2
-rw-r--r--examples/cxx/excxx_repquote_gsg/RepMgrGSG.cpp2
-rw-r--r--examples/cxx/excxx_repquote_gsg/SimpleConfigInfo.h2
-rw-r--r--examples/cxx/excxx_repquote_gsg/SimpleTxn.cpp2
-rw-r--r--examples/cxx/getting_started/MyDb.cpp2
-rw-r--r--examples/cxx/getting_started/MyDb.hpp2
-rw-r--r--examples/cxx/getting_started/excxx_example_database_load.cpp2
-rw-r--r--examples/cxx/getting_started/excxx_example_database_read.cpp2
-rw-r--r--examples/cxx/getting_started/gettingStartedCommon.hpp2
-rw-r--r--examples/cxx/txn_guide/TxnGuide.cpp2
-rw-r--r--examples/cxx/txn_guide/TxnGuideInMemory.cpp2
-rw-r--r--examples/cxx/wce_tpcb/TpcbExample.cpp2
-rw-r--r--examples/cxx/wce_tpcb/TpcbExample.h2
-rw-r--r--examples/cxx/wce_tpcb/TpcbUI.cpp2
-rw-r--r--examples/cxx/wce_tpcb/newres.h2
-rw-r--r--examples/cxx/wce_tpcb/resource.h2
-rw-r--r--examples/java/src/collections/access/AccessExample.java2
-rw-r--r--examples/java/src/collections/hello/HelloDatabaseWorld.java2
-rw-r--r--examples/java/src/collections/ship/basic/PartData.java2
-rw-r--r--examples/java/src/collections/ship/basic/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/basic/Sample.java2
-rw-r--r--examples/java/src/collections/ship/basic/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/basic/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/basic/ShipmentData.java2
-rw-r--r--examples/java/src/collections/ship/basic/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/basic/SupplierData.java2
-rw-r--r--examples/java/src/collections/ship/basic/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/basic/Weight.java2
-rw-r--r--examples/java/src/collections/ship/entity/Part.java2
-rw-r--r--examples/java/src/collections/ship/entity/PartData.java2
-rw-r--r--examples/java/src/collections/ship/entity/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/entity/Sample.java2
-rw-r--r--examples/java/src/collections/ship/entity/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/entity/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/entity/Shipment.java2
-rw-r--r--examples/java/src/collections/ship/entity/ShipmentData.java2
-rw-r--r--examples/java/src/collections/ship/entity/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/entity/Supplier.java2
-rw-r--r--examples/java/src/collections/ship/entity/SupplierData.java2
-rw-r--r--examples/java/src/collections/ship/entity/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/entity/Weight.java2
-rw-r--r--examples/java/src/collections/ship/factory/Part.java2
-rw-r--r--examples/java/src/collections/ship/factory/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/factory/Sample.java2
-rw-r--r--examples/java/src/collections/ship/factory/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/factory/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/factory/Shipment.java2
-rw-r--r--examples/java/src/collections/ship/factory/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/factory/Supplier.java2
-rw-r--r--examples/java/src/collections/ship/factory/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/factory/Weight.java2
-rw-r--r--examples/java/src/collections/ship/index/PartData.java2
-rw-r--r--examples/java/src/collections/ship/index/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/index/Sample.java2
-rw-r--r--examples/java/src/collections/ship/index/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/index/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/index/ShipmentData.java2
-rw-r--r--examples/java/src/collections/ship/index/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/index/SupplierData.java2
-rw-r--r--examples/java/src/collections/ship/index/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/index/Weight.java2
-rw-r--r--examples/java/src/collections/ship/marshal/MarshalledEnt.java2
-rw-r--r--examples/java/src/collections/ship/marshal/MarshalledKey.java2
-rw-r--r--examples/java/src/collections/ship/marshal/Part.java2
-rw-r--r--examples/java/src/collections/ship/marshal/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/marshal/Sample.java2
-rw-r--r--examples/java/src/collections/ship/marshal/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/marshal/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/marshal/Shipment.java2
-rw-r--r--examples/java/src/collections/ship/marshal/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/marshal/Supplier.java2
-rw-r--r--examples/java/src/collections/ship/marshal/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/marshal/Weight.java2
-rw-r--r--examples/java/src/collections/ship/sentity/Part.java2
-rw-r--r--examples/java/src/collections/ship/sentity/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/sentity/Sample.java2
-rw-r--r--examples/java/src/collections/ship/sentity/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/sentity/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/sentity/Shipment.java2
-rw-r--r--examples/java/src/collections/ship/sentity/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/sentity/Supplier.java2
-rw-r--r--examples/java/src/collections/ship/sentity/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/sentity/Weight.java2
-rw-r--r--examples/java/src/collections/ship/tuple/Part.java2
-rw-r--r--examples/java/src/collections/ship/tuple/PartData.java2
-rw-r--r--examples/java/src/collections/ship/tuple/PartKey.java2
-rw-r--r--examples/java/src/collections/ship/tuple/Sample.java2
-rw-r--r--examples/java/src/collections/ship/tuple/SampleDatabase.java2
-rw-r--r--examples/java/src/collections/ship/tuple/SampleViews.java2
-rw-r--r--examples/java/src/collections/ship/tuple/Shipment.java2
-rw-r--r--examples/java/src/collections/ship/tuple/ShipmentData.java2
-rw-r--r--examples/java/src/collections/ship/tuple/ShipmentKey.java2
-rw-r--r--examples/java/src/collections/ship/tuple/Supplier.java2
-rw-r--r--examples/java/src/collections/ship/tuple/SupplierData.java2
-rw-r--r--examples/java/src/collections/ship/tuple/SupplierKey.java2
-rw-r--r--examples/java/src/collections/ship/tuple/Weight.java2
-rw-r--r--examples/java/src/db/AccessExample.java2
-rw-r--r--examples/java/src/db/BtRecExample.java2
-rw-r--r--examples/java/src/db/BulkAccessExample.java2
-rw-r--r--examples/java/src/db/BulkAccessNIOExample.java2
-rw-r--r--examples/java/src/db/BulkExample.java2
-rw-r--r--examples/java/src/db/EnvExample.java2
-rw-r--r--examples/java/src/db/GettingStarted/ExampleDatabaseLoad.java2
-rw-r--r--examples/java/src/db/GettingStarted/ExampleDatabaseRead.java2
-rw-r--r--examples/java/src/db/GettingStarted/Inventory.java2
-rw-r--r--examples/java/src/db/GettingStarted/InventoryBinding.java2
-rw-r--r--examples/java/src/db/GettingStarted/ItemNameKeyCreator.java2
-rw-r--r--examples/java/src/db/GettingStarted/MyDbs.java2
-rw-r--r--examples/java/src/db/GettingStarted/Vendor.java2
-rw-r--r--examples/java/src/db/LockExample.java2
-rw-r--r--examples/java/src/db/SequenceExample.java2
-rw-r--r--examples/java/src/db/TpcbExample.java2
-rw-r--r--examples/java/src/db/repquote/RepConfig.java2
-rw-r--r--examples/java/src/db/repquote/RepQuoteEnvironment.java2
-rw-r--r--examples/java/src/db/repquote/RepQuoteExample.java2
-rw-r--r--examples/java/src/db/repquote/RepRemoteHost.java2
-rw-r--r--examples/java/src/db/repquote_gsg/RepConfig.java2
-rw-r--r--examples/java/src/db/repquote_gsg/RepQuoteEnvironment.java2
-rw-r--r--examples/java/src/db/repquote_gsg/RepQuoteExampleGSG.java12
-rw-r--r--examples/java/src/db/repquote_gsg/SimpleConfig.java2
-rw-r--r--examples/java/src/db/repquote_gsg/SimpleTxn.java2
-rw-r--r--examples/java/src/db/txn/DBWriter.java2
-rw-r--r--examples/java/src/db/txn/PayloadData.java2
-rw-r--r--examples/java/src/db/txn/TxnGuide.java2
-rw-r--r--examples/java/src/db/txn/TxnGuideInMemory.java2
-rw-r--r--examples/java/src/persist/CustomKeyOrderExample.java2
-rw-r--r--examples/java/src/persist/DplDump.java2
-rw-r--r--examples/java/src/persist/EventExample.java2
-rw-r--r--examples/java/src/persist/EventExampleDPL.java2
-rw-r--r--examples/java/src/persist/PersonExample.java2
-rw-r--r--examples/java/src/persist/gettingStarted/SimpleDA.java2
-rw-r--r--examples/java/src/persist/gettingStarted/SimpleEntityClass.java2
-rw-r--r--examples/java/src/persist/gettingStarted/SimpleStoreGet.java2
-rw-r--r--examples/java/src/persist/gettingStarted/SimpleStorePut.java2
-rw-r--r--examples/java/src/persist/txn/PayloadDataEntity.java2
-rw-r--r--examples/java/src/persist/txn/StoreWriter.java2
-rw-r--r--examples/java/src/persist/txn/TxnGuideDPL.java2
-rw-r--r--examples/sql/adf/EX_ADF/.adf/META-INF/adf-config.xml20
-rw-r--r--examples/sql/adf/EX_ADF/.adf/META-INF/connections.xml21
-rw-r--r--examples/sql/adf/EX_ADF/EX_ADF.jws87
-rw-r--r--examples/sql/adf/EX_ADF/Model/Model.jpr212
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/dbschema/ForeignKeysCoffees.java90
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/dbschema/PrimaryKeysSuppliers.java74
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/Model.jpx51
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties6
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml84
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java281
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml79
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java302
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml45
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/am/AppModule.xml34
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/am/TestClient.java179
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/am/common/bc4j.xcfg15
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/view/CoffeesVO.xml94
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVO.xml74
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVOToCoffeesVOLink.xml44
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/ViewController.jpr472
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/adfc-config.xml2
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/faces-config.xml6
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/trinidad-config.xml5
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/web.xml137
-rw-r--r--examples/sql/adf/EX_ADF/ViewController/src/META-INF/adf-settings.xml2
-rw-r--r--examples/sql/adf/EX_ADF/src/META-INF/jps-config.xml18
-rw-r--r--examples/sql/adf/EX_ADF/src/META-INF/weblogic-application.xml14
-rw-r--r--examples/sql/adf/README117
-rw-r--r--examples/sql/c/ex_sql_binding.c2
-rw-r--r--examples/sql/c/ex_sql_fts3.c2
-rw-r--r--examples/sql/c/ex_sql_index.c2
-rw-r--r--examples/sql/c/ex_sql_load.c2
-rw-r--r--examples/sql/c/ex_sql_multi_thread.c2
-rw-r--r--examples/sql/c/ex_sql_query.c2
-rw-r--r--examples/sql/c/ex_sql_rtree.c2
-rw-r--r--examples/sql/c/ex_sql_savepoint.c2
-rw-r--r--examples/sql/c/ex_sql_statement.c2
-rw-r--r--examples/sql/c/ex_sql_transaction.c2
-rw-r--r--examples/sql/c/ex_sql_utils.c2
-rw-r--r--examples/sql/c/ex_sql_utils.h2
-rw-r--r--examples/sql/wce_sql/excxx_wce_sql.cpp2
-rw-r--r--examples/sql/wce_sql/excxx_wce_sql.h2
-rw-r--r--examples/sql/wce_sql/excxx_wce_sqlDlg.cpp2
-rw-r--r--examples/sql/wce_sql/excxx_wce_sqlDlg.h2
-rw-r--r--examples/sql/wce_sql/resourceppc.h2
-rw-r--r--examples/sql/wce_sql/stdafx.cpp2
-rw-r--r--examples/sql/wce_sql/stdafx.h2
-rw-r--r--examples/stl/StlAccessExample.cpp2
-rw-r--r--examples/stl/StlAdvancedFeatures.cpp2
-rw-r--r--examples/stl/StlAdvancedFeatures.h2
-rw-r--r--examples/stl/StlTpcbExample.cpp2
-rw-r--r--examples/stl/StlTransactionGuideExample.cpp2
-rw-r--r--examples/stl/repquote/StlRepConfigInfo.cpp2
-rw-r--r--examples/stl/repquote/StlRepConfigInfo.h2
-rw-r--r--examples/stl/repquote/StlRepQuoteExample.cpp2
275 files changed, 4569 insertions, 457 deletions
diff --git a/examples/c/csv/DbRecord.c b/examples/c/csv/DbRecord.c
index b25aeadc..d3c975b4 100644
--- a/examples/c/csv/DbRecord.c
+++ b/examples/c/csv/DbRecord.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/README b/examples/c/csv/README
index 6d5eb878..1da48a36 100644
--- a/examples/c/csv/README
+++ b/examples/c/csv/README
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/code.c b/examples/c/csv/code.c
index 24aaac81..85c6c792 100644
--- a/examples/c/csv/code.c
+++ b/examples/c/csv/code.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -26,7 +26,8 @@ int usage(void);
* Globals
*/
FILE *cfp; /* C source file */
-FILE *hfp; /* C source file */
+FILE *ffp; /* CSV file */
+FILE *hfp; /* C header file */
char *progname; /* Program name */
int verbose; /* Verbose flag */
@@ -45,6 +46,8 @@ main(int argc, char *argv[])
else
++progname;
+ ffp = NULL;
+
/* Initialize arguments. */
cfile = "csv_local.c"; /* Default header/source files */
hfile = "csv_local.h";
@@ -55,8 +58,8 @@ main(int argc, char *argv[])
case 'c':
cfile = optarg;
break;
- case 'f':
- if (freopen(optarg, "r", stdin) == NULL) {
+ case 'f': /* Required argument */
+ if ((ffp = freopen(optarg, "r", stdin)) == NULL) {
fprintf(stderr,
"%s: %s\n", optarg, strerror(errno));
return (EXIT_FAILURE);
@@ -75,7 +78,7 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (*argv != NULL)
+ if (*argv != NULL || ffp == NULL)
return (usage());
/* Load records from the input file. */
diff --git a/examples/c/csv/csv.h b/examples/c/csv/csv.h
index ac9fac2a..beb67cbc 100644
--- a/examples/c/csv/csv.h
+++ b/examples/c/csv/csv.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/csv_extern.h b/examples/c/csv/csv_extern.h
index a541bb5c..59b468f0 100644
--- a/examples/c/csv/csv_extern.h
+++ b/examples/c/csv/csv_extern.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,9 +17,9 @@ extern void DbRecord_print(DbRecord *, FILE *);
extern int DbRecord_read(u_long, DbRecord *);
extern int DbRecord_search_field_name(char *, char *, OPERATOR);
extern int DbRecord_search_field_number(u_int, char *, OPERATOR);
-extern int compare_double(DB *, const DBT *, const DBT *);
-extern int compare_string(DB *, const DBT *, const DBT *);
-extern int compare_ulong(DB *, const DBT *, const DBT *);
+extern int compare_double(DB *, const DBT *, const DBT *, size_t *);
+extern int compare_string(DB *, const DBT *, const DBT *, size_t *);
+extern int compare_ulong(DB *, const DBT *, const DBT *, size_t *);
extern int csv_env_close(void);
extern int csv_env_open(const char *, int);
extern int csv_secondary_close(void);
diff --git a/examples/c/csv/db.c b/examples/c/csv/db.c
index dc72f0d8..e138d5b8 100644
--- a/examples/c/csv/db.c
+++ b/examples/c/csv/db.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -10,7 +10,7 @@
#include "csv_local.h"
#include "csv_extern.h"
-static int compare_uint32(DB *, const DBT *, const DBT *);
+static int compare_uint32(DB *, const DBT *, const DBT *, size_t *);
/*
* csv_env_init --
@@ -138,7 +138,7 @@ csv_secondary_open()
{
DB *sdb;
DbField *f;
- int ret, (*fcmp)(DB *, const DBT *, const DBT *);
+ int ret, (*fcmp)(DB *, const DBT *, const DBT *, size_t *);
/*
* Create secondary database handles.
@@ -232,11 +232,13 @@ csv_secondary_close()
* Compare two keys.
*/
static int
-compare_uint32(DB *db_arg, const DBT *a_arg, const DBT *b_arg)
+compare_uint32(DB *db_arg, const DBT *a_arg, const DBT *b_arg, size_t *locp)
{
u_int32_t a, b;
- db_arg = db_arg; /* Quiet compiler. */
+ /* Quiet compiler. */
+ db_arg = db_arg;
+ locp = NULL;
memcpy(&a, a_arg->data, sizeof(u_int32_t));
memcpy(&b, b_arg->data, sizeof(u_int32_t));
diff --git a/examples/c/csv/load.c b/examples/c/csv/load.c
index 74fadfe0..708fd0ea 100644
--- a/examples/c/csv/load.c
+++ b/examples/c/csv/load.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/load_main.c b/examples/c/csv/load_main.c
index 1caeda00..5e42e406 100644
--- a/examples/c/csv/load_main.c
+++ b/examples/c/csv/load_main.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -15,11 +15,12 @@ static int usage(void);
/*
* Globals
*/
-DB_ENV *dbenv; /* Database environment */
-DB *db; /* Primary database */
+DB_ENV *dbenv; /* Database environment */
+DB *db; /* Primary database */
DB **secondary; /* Secondaries */
-int verbose; /* Program verbosity */
-char *progname; /* Program name */
+int verbose; /* Program verbosity */
+char *progname; /* Program name */
+FILE *ffp; /* CSV file */
int
main(int argc, char *argv[])
@@ -37,6 +38,7 @@ main(int argc, char *argv[])
else
++progname;
verbose = 0;
+ ffp = NULL;
/* Initialize arguments. */
home = NULL;
@@ -46,8 +48,8 @@ main(int argc, char *argv[])
/* Process arguments. */
while ((ch = getopt(argc, argv, "F:f:h:V:v")) != EOF)
switch (ch) {
- case 'f':
- if (freopen(optarg, "r", stdin) == NULL) {
+ case 'f': /* Required argument */
+ if ((ffp = freopen(optarg, "r", stdin)) == NULL) {
fprintf(stderr,
"%s: %s\n", optarg, db_strerror(errno));
return (EXIT_FAILURE);
@@ -76,7 +78,7 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (*argv != NULL)
+ if (*argv != NULL || ffp == NULL)
return (usage());
/*
diff --git a/examples/c/csv/query.c b/examples/c/csv/query.c
index f41dc560..e2c4e223 100644
--- a/examples/c/csv/query.c
+++ b/examples/c/csv/query.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/query_main.c b/examples/c/csv/query_main.c
index ed22283e..eb156367 100644
--- a/examples/c/csv/query_main.c
+++ b/examples/c/csv/query_main.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/csv/util.c b/examples/c/csv/util.c
index c8cfa6c0..bcc280cc 100644
--- a/examples/c/csv/util.c
+++ b/examples/c/csv/util.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -156,11 +156,13 @@ secondary_callback(DB *db_arg, const DBT *key, const DBT *data, DBT *result)
* Compare two keys.
*/
int
-compare_double(DB *db_arg, const DBT *a_arg, const DBT *b_arg)
+compare_double(DB *db_arg, const DBT *a_arg, const DBT *b_arg, size_t *locp)
{
double a, b;
- db_arg = db_arg; /* Quiet compiler. */
+ /* Quiet compiler. */
+ db_arg = db_arg;
+ locp = NULL;
memcpy(&a, a_arg->data, sizeof(double));
memcpy(&b, b_arg->data, sizeof(double));
@@ -172,11 +174,13 @@ compare_double(DB *db_arg, const DBT *a_arg, const DBT *b_arg)
* Compare two keys.
*/
int
-compare_ulong(DB *db_arg, const DBT *a_arg, const DBT *b_arg)
+compare_ulong(DB *db_arg, const DBT *a_arg, const DBT *b_arg, size_t *locp)
{
u_long a, b;
- db_arg = db_arg; /* Quiet compiler. */
+ /* Quiet compiler. */
+ db_arg = db_arg;
+ locp = NULL;
memcpy(&a, a_arg->data, sizeof(u_long));
memcpy(&b, b_arg->data, sizeof(u_long));
diff --git a/examples/c/ex_access.c b/examples/c/ex_access.c
index 67d248fe..8f3b5896 100644
--- a/examples/c/ex_access.c
+++ b/examples/c/ex_access.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_apprec/ex_apprec.c b/examples/c/ex_apprec/ex_apprec.c
index 0c19341f..81089355 100644
--- a/examples/c/ex_apprec/ex_apprec.c
+++ b/examples/c/ex_apprec/ex_apprec.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_apprec/ex_apprec.h b/examples/c/ex_apprec/ex_apprec.h
index b7e0da03..3ac65401 100644
--- a/examples/c/ex_apprec/ex_apprec.h
+++ b/examples/c/ex_apprec/ex_apprec.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_apprec/ex_apprec.src b/examples/c/ex_apprec/ex_apprec.src
index 91618c00..6c6893d4 100644
--- a/examples/c/ex_apprec/ex_apprec.src
+++ b/examples/c/ex_apprec/ex_apprec.src
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_apprec/ex_apprec_rec.c b/examples/c/ex_apprec/ex_apprec_rec.c
index 70eab4a5..7ed786f4 100644
--- a/examples/c/ex_apprec/ex_apprec_rec.c
+++ b/examples/c/ex_apprec/ex_apprec_rec.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_blob.c b/examples/c/ex_blob.c
new file mode 100644
index 00000000..1c074f7a
--- /dev/null
+++ b/examples/c/ex_blob.c
@@ -0,0 +1,286 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ * $Id$
+ */
+
+#include <sys/types.h>
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define CMD_LEN 25
+#ifdef _WIN32
+extern int getopt(int, char * const *, const char *);
+#else
+#include <unistd.h>
+#endif
+
+#include <db.h>
+
+int db_setup __P((const char *, FILE *, const char *));
+int db_teardown __P((const char *, FILE *, const char *));
+static int usage __P((void));
+
+const char *progname = "ex_blob"; /* Program name. */
+
+/*
+ * An example of a program that stores data items in Berkeley DB blob
+ * files.
+ */
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ extern char *optarg;
+ extern int optind;
+ char *cmd;
+ const char *home;
+
+ int ch;
+ home = "EX_BLOBDIR";
+ while ((ch = getopt(argc, argv, "h:")) != EOF)
+ switch (ch) {
+ case 'h':
+ home = optarg;
+ break;
+ case '?':
+ default:
+ return (usage());
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (argc != 0)
+ return (usage());
+
+ if ((cmd = malloc(strlen(home) + CMD_LEN)) == NULL)
+ return (EXIT_FAILURE);
+
+#ifdef _WIN32
+ sprintf(cmd, "rmdir %s /q/s", home);
+#else
+ sprintf(cmd, "rm -rf %s", home);
+#endif
+ system(cmd);
+ sprintf(cmd, "mkdir %s", home);
+ system(cmd);
+ free(cmd);
+
+ printf("Setup env\n");
+ if (db_setup(home, stderr, progname) != 0)
+ return (EXIT_FAILURE);
+
+ return (EXIT_SUCCESS);
+}
+
+int
+db_setup(home, errfp, progname)
+ const char *home, *progname;
+ FILE *errfp;
+{
+ DBC *dbc;
+ DB_ENV *dbenv;
+ DB *dbp;
+ DB_STREAM *dbs;
+ DB_TXN *txn;
+ DBT data, key;
+ int ret;
+ db_off_t size;
+ unsigned int i;
+
+ dbc = NULL;
+ dbenv = NULL;
+ dbp = NULL;
+ dbs = NULL;
+ txn = NULL;
+ memset (&data, 0, sizeof(DBT));
+
+ /*
+ * Create an environment object and initialize it for error
+ * reporting.
+ */
+ if ((ret = db_env_create(&dbenv, 0)) != 0) {
+ fprintf(errfp, "%s: %s\n", progname, db_strerror(ret));
+ return (1);
+ }
+ dbenv->set_errfile(dbenv, errfp);
+ dbenv->set_errpfx(dbenv, progname);
+
+ /*
+ * We want to specify the shared memory buffer pool cachesize.
+ */
+ if ((ret = dbenv->set_cachesize(dbenv, 0, 64 * 1024 *1024, 0)) != 0) {
+ dbenv->err(dbenv, ret, "set_cachesize");
+ goto err;
+ }
+
+ /* Enable blob files and set the size threshold. */
+ if ((ret = dbenv->set_blob_threshold(dbenv, 1000, 0)) != 0) {
+ dbenv->err(dbenv, ret, "set_blob_threshold");
+ goto err;
+ }
+
+ /* Open the environment with full transactional support. */
+ if ((ret = dbenv->open(dbenv, home,
+ DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
+ DB_INIT_TXN, 0644)) != 0) {
+ dbenv->err(dbenv, ret, "environment open: %s", home);
+ goto err;
+ }
+
+ /* Open a database in the environment. */
+ if ((ret = db_create(&dbp, dbenv, 0)) != 0) {
+ dbenv->err(dbenv, ret, "database create");
+ goto err;
+ }
+
+ /* Open a database with btree access method. */
+ if ((ret = dbp->open(dbp, NULL, "exblob_db1.db", NULL,
+ DB_BTREE, DB_CREATE|DB_AUTO_COMMIT,0644)) != 0) {
+ dbenv->err(dbenv, ret, "database open");
+ goto err;
+ }
+
+ /* Insert an item that will overflow. */
+ memset(&key, 0, sizeof(DBT));
+ memset(&data, 0, sizeof(DBT));
+ key.ulen = key.size = sizeof(int);
+ key.flags = DB_DBT_USERMEM;
+
+ data.size = data.ulen = 4000;
+ data.data = malloc(data.size);
+ for (i = 0; i < data.size; i++)
+ ((char *)data.data)[i] = 'a' + (i % 26);
+ data.flags = DB_DBT_USERMEM;
+
+#define COUNT 5000
+ for (i = 1; i < COUNT; i++) {
+ key.data = &i;
+ /* Use a mixture of blob and onpage items. */
+ if (i%23 == 0)
+ data.size = 20;
+ if ((ret = dbp->put(dbp, NULL, &key, &data, 0)) != 0) {
+ dbenv->err(dbenv, ret, "blob put");
+ goto err;
+ }
+ if (i%23 == 0)
+ data.size = data.ulen;
+ }
+
+ for (i = 1; i < COUNT; i += 2) {
+ key.data = &i;
+ memset(data.data, 0, data.size);
+ if ((ret = dbp->get(dbp, NULL, &key, &data, 0)) != 0) {
+ dbenv->err(dbenv, ret, "blob get");
+ goto err;
+ }
+ if (strncmp((char *)data.data, "abcdefghijklmno", 15) != 0)
+ printf("blob data mismatch\n");
+ }
+
+ /* Blobs can also be accessed using the DB_STREAM API. */
+ if ((ret = dbenv->txn_begin(dbenv, NULL, &txn, 0)) != 0){
+ dbenv->err(dbenv, ret, "txn");
+ goto err;
+ }
+
+ if ((ret = dbp->cursor(dbp, txn, &dbc, 0)) != 0) {
+ dbenv->err(dbenv, ret, "cursor");
+ goto err;
+ }
+
+ /*
+ * Set the cursor to a blob. Use DB_DBT_PARTIAL with
+ * dlen == 0 to avoid getting any blob data.
+ */
+ data.flags = DB_DBT_USERMEM | DB_DBT_PARTIAL;
+ data.dlen = 0;
+ if ((ret = dbc->get(dbc, &key, &data, DB_FIRST)) != 0) {
+ dbenv->err(dbenv, ret, "Not a blob");
+ goto err;
+ }
+ data.flags = DB_DBT_USERMEM;
+
+ /* Create a stream on the blob the cursor points to. */
+ if ((ret = dbc->db_stream(dbc, &dbs, DB_STREAM_WRITE)) != 0) {
+ dbenv->err(dbenv, 0, "Creating stream.");
+ goto err;
+ }
+ /* Get the size of the blob. */
+ if ((ret = dbs->size(dbs, &size, 0)) != 0) {
+ dbenv->err(dbenv, 0, "Stream size.");
+ goto err;
+ }
+ /* Read from the blob. */
+ if ((ret = dbs->read(dbs, &data, 0, (u_int32_t)size, 0)) != 0) {
+ dbenv->err(dbenv, 0, "Stream read.");
+ goto err;
+ }
+ /* Write data to the blob, increasing its size. */
+ if ((ret = dbs->write(dbs, &data, size/2, 0)) != 0) {
+ dbenv->err(dbenv, 0, "Stream write.");
+ goto err;
+ }
+ /* Close the stream. */
+ if ((ret = dbs->close(dbs, 0)) != 0) {
+ dbenv->err(dbenv, 0, "Stream close.");
+ goto err;
+ }
+ dbs = NULL;
+ dbc->close(dbc);
+ dbc = NULL;
+ txn->commit(txn, 0);
+ txn = NULL;
+ free(data.data);
+ data.data = NULL;
+
+ for (i = 3; i < COUNT; i += 2) {
+ key.data = &i;
+ if ((ret = dbp->del(dbp, NULL, &key, 0)) != 0) {
+ dbenv->err(dbenv, ret, "blob del");
+ goto err;
+ }
+ }
+
+ /* Close the database handle. */
+ if ((ret = dbp->close(dbp, 0)) != 0) {
+ fprintf(stderr, "database close: %s\n", db_strerror(ret));
+ return (1);
+ }
+
+ /* Close the environment handle. */
+ if ((ret = dbenv->close(dbenv, 0)) != 0) {
+ fprintf(stderr, "DB_ENV->close: %s\n", db_strerror(ret));
+ return (1);
+ }
+ return (0);
+
+err: if (data.data != NULL)
+ free(data.data);
+ if (dbs != NULL)
+ dbs->close(dbs, 0);
+ if (txn != NULL)
+ txn->abort(txn);
+ if (dbc != NULL)
+ dbc->close(dbc);
+ if (dbp != NULL)
+ dbp->close(dbp, 0);
+ if (dbenv != NULL)
+ dbenv->close(dbenv, 0);
+
+ return (ret);
+}
+
+static int
+usage()
+{
+ (void)fprintf(stderr,
+ "usage: %s [-h home] \n", progname);
+ return (EXIT_FAILURE);
+}
diff --git a/examples/c/ex_btrec.c b/examples/c/ex_btrec.c
index 85a910d9..817229b6 100644
--- a/examples/c/ex_btrec.c
+++ b/examples/c/ex_btrec.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id: ex_btrec.c,v 0f73af5ae3da 2010/05/10 05:38:40 alexander $
*/
diff --git a/examples/c/ex_bulk.c b/examples/c/ex_bulk.c
index bc3ec26e..5120fbec 100644
--- a/examples/c/ex_bulk.c
+++ b/examples/c/ex_bulk.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -16,6 +16,7 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#define DATABASE "ex_bulk.db" /* Database name */
#define DATALEN 20 /* The length of data */
@@ -54,8 +55,9 @@ int bulk_delete(DB_ENV *, DB *, int, int, int *, int *, int);
int bulk_delete_sec(DB_ENV *, DB *, int, int, int *, int *, int);
int bulk_fill(DB_ENV *, DB *, int, int, int *, int *, int);
int bulk_get(DB_ENV *, DB *, int, int, int, int *, int);
-int compare_int(DB *, const DBT *, const DBT *);
-DB_ENV *db_init(char *, char *, u_int);
+int compare_int(DB *, const DBT *, const DBT *, size_t *);
+int db_init(DB_ENV *, DB **, DB**, int, int, int);
+DB_ENV *env_init(char *, char *, u_int);
int get_first_str(DB *, const DBT *, const DBT *, DBT *);
int get_string(const char *, char *, int);
int main(int, char *[]);
@@ -82,25 +84,27 @@ main(argc, argv)
struct timeval start_time, end_time;
double secs;
u_int cache, pagesize;
- int biter, ch, count, dups, init, iter, num;
- int ret, rflag, sflag, bulk, delete, pair, verbose;
+ int biter, ch, count, delete, dups, init, iter, num;
+ int pair, ret, rflag, sflag, verbose;
dbp = sdbp = NULL;
dbenv = NULL;
txnp = NULL;
iter = num = 1000000;
- dups = init = rflag = sflag = bulk = delete = verbose = 0;
+ delete = dups = init = rflag = sflag = verbose = 0;
pagesize = 65536;
cache = 1000 * pagesize;
- while ((ch = getopt(argc, argv, "c:d:i:n:p:vDIRSU")) != EOF)
+ while ((ch = getopt(argc, argv, "c:d:i:n:p:vDIRS")) != EOF)
switch (ch) {
case 'c':
cache = (u_int)atoi(optarg);
break;
case 'd':
dups = atoi(optarg);
+ if (dups < 0)
+ usage();
break;
case 'i':
iter = atoi(optarg);
@@ -126,9 +130,6 @@ main(argc, argv)
case 'S':
sflag = 1;
break;
- case 'U':
- bulk = 1;
- break;
case '?':
default:
usage();
@@ -142,78 +143,16 @@ main(argc, argv)
system("mkdir EX_BULK");
}
- if ((dbenv = db_init("EX_BULK", "ex_bulk", cache)) == NULL)
+ if ((dbenv = env_init("EX_BULK", "ex_bulk", cache)) == NULL)
return (-1);
if (init)
exit(0);
/* Create and initialize database object, open the database. */
- if ((ret = db_create(&dbp, dbenv, 0)) != 0) {
- fprintf(stderr,
- "%s: db_create: %s\n", progname, db_strerror(ret));
- exit(EXIT_FAILURE);
- }
- dbp->set_errfile(dbp, stderr);
- dbp->set_errpfx(dbp, progname);
- if ((ret = dbp->set_bt_compare(dbp, compare_int)) != 0) {
- dbp->err(dbp, ret, "set_bt_compare");
- goto err;
- }
- if ((ret = dbp->set_pagesize(dbp, pagesize)) != 0) {
- dbp->err(dbp, ret, "set_pagesize");
- goto err;
- }
- if (dups && (ret = dbp->set_flags(dbp, DB_DUP)) != 0) {
- dbp->err(dbp, ret, "set_flags");
- goto err;
- }
-
- if ((ret = dbenv->txn_begin(dbenv, NULL, &txnp, 0)) != 0)
- goto err;
-
- if ((ret = dbp->open(dbp, txnp, DATABASE, "primary", DB_BTREE,
- DB_CREATE , 0664)) != 0) {
- dbp->err(dbp, ret, "%s: open", DATABASE);
- if (txnp != NULL)
- (void)txnp->abort(txnp);
- goto err;
- }
-
- if (sflag) {
- /*
- * Open secondary database. The keys in secondary database
- * are the first charactor in str of struct data in data
- * field of primary database.
- */
- if ((ret = db_create(&sdbp, dbenv, 0)) != 0) {
- fprintf(stderr, "%s: db_create: %s\n",
- progname, db_strerror(ret));
- exit(EXIT_FAILURE);
- }
- if ((ret = sdbp->set_flags(sdbp, DB_DUPSORT)) != 0) {
- sdbp->err(sdbp, ret, "set_flags");
- goto err;
- }
- if ((ret = sdbp->open(sdbp, txnp, DATABASE, "secondary",
- DB_BTREE, DB_CREATE, 0664)) != 0) {
- sdbp->err(sdbp, ret, "%s: secondary open", DATABASE);
- if (txnp != NULL)
- (void)txnp->abort(txnp);
- goto err;
- }
- if ((ret = dbp->associate(dbp, txnp, sdbp, get_first_str,
- 0)) != 0) {
- dbp->err(dbp, ret, "%s: associate", DATABASE);
- if (txnp != NULL)
- (void)txnp->abort(txnp);
- goto err;
- }
- }
-
- if ((ret = txnp->commit(txnp, 0)) != 0)
- goto err;
- txnp = NULL;
+ if ((ret = db_init(dbenv, &dbp, &sdbp, dups, sflag, pagesize)) != 0)
+ return (-1);
+ srand((int)time(NULL));
if (rflag) {
/* Time the get loop. */
(void)gettimeofday(&start_time, NULL);
@@ -334,10 +273,9 @@ bulk_delete(dbenv, dbp, num, dups, countp, iterp, verbose)
j = rand() % num;
/*
- * Need to account for proper buffer size, the buffer must be at
- * least as large as the page size of the underlying database,
- * aligned for unsigned integer access, and be a multiple of 1024
- * bytes in size.
+ * The buffer must be at least as large as the page size of the
+ * underlying database and aligned for unsigned integer access.
+ * Its size must be a multiple of 1024 bytes.
*/
key.ulen = (u_int32_t)UPDATES_PER_BULK_PUT *
(sizeof(u_int32_t) + DATALEN) * 1024;
@@ -348,22 +286,23 @@ bulk_delete(dbenv, dbp, num, dups, countp, iterp, verbose)
memset(data_val, 0, DATALEN);
/*
- * If DB_MULTIPLE, delete all records with a specified set of keys
- * in a DBT. The DBT is constructed by DB_MULTIPLE_WRITE_NEXT. If
- * DB_MULTIPLE_KEY, delete a specific set of key/data pairs in the
- * DBT constructed by DB_MULTIPLE_KEY_WRITE_NEXT. Here, delete
- * keys before the random key, if there are duplicate records,
- * delete duplicate pairs with DB_MULTIPLE_KEY, unless, delete keys
- * with DB_MULTIPLE.
+ * Bulk delete all records of a specific set of keys which includes all
+ * non-negative integers smaller than the random key. The random key is
+ * a random non-negative integer smaller than "num".
+ * If DB_MULTIPLE, construct the key DBT by the DB_MULTIPLE_WRITE_NEXT
+ * with the specific set of keys. If DB_MULTIPLE_KEY, construct the key
+ * DBT by the DB_MULTIPLE_KEY_WRITE_NEXT with all key/data pairs of the
+ * specific set of keys.
*/
- flag |= (dups) ? DB_MULTIPLE : DB_MULTIPLE_KEY;
+ flag |= (dups) ? DB_MULTIPLE_KEY : DB_MULTIPLE;
DB_MULTIPLE_WRITE_INIT(ptrk, &key);
for (i = 0; i < j; i++) {
if (i % UPDATES_PER_BULK_PUT == 0) {
if (txnp != NULL) {
- if ((ret = txnp->commit(txnp, 0)) != 0)
- goto err;
+ ret = txnp->commit(txnp, 0);
txnp = NULL;
+ if (ret != 0)
+ goto err;
}
if ((ret =
dbenv->txn_begin(dbenv, NULL, &txnp, 0)) != 0)
@@ -371,24 +310,24 @@ bulk_delete(dbenv, dbp, num, dups, countp, iterp, verbose)
}
if (dups) {
- DB_MULTIPLE_WRITE_NEXT(ptrk, &key, &i, sizeof(i));
- assert(ptrk != NULL);
- count++;
- if (verbose)
- printf("Delete key: %d\n", i);
- } else {
data_val->id = 0;
+ get_string(tstring, data_val->str, i);
do {
- get_string(tstring, data_val->str, i);
DB_MULTIPLE_KEY_WRITE_NEXT(ptrk, &key, &i,
sizeof(i), data_val, DATALEN);
assert(ptrk != NULL);
count++;
if (verbose)
printf(
-"Delete key: %d, \tdata: (id %d, str %s)\n",
+"Delete key: %d, \tdata: (id %d, str %s)\n",
i, data_val->id, data_val->str);
- } while (++data_val->id < dups);
+ } while (data_val->id++ < dups);
+ } else {
+ DB_MULTIPLE_WRITE_NEXT(ptrk, &key, &i, sizeof(i));
+ assert(ptrk != NULL);
+ count++;
+ if (verbose)
+ printf("Delete key: %d\n", i);
}
if ((i + 1) % UPDATES_PER_BULK_PUT == 0) {
@@ -452,10 +391,9 @@ bulk_delete_sec(dbenv, dbp, num, pair, countp, iterp, verbose)
rc = rand() % (STRLEN - 1);
/*
- * Need to account for proper buffer size, the buffer must be at
- * least as large as the page size of the underlying database,
- * aligned for unsigned integer access, and be a multiple of
- * 1024 bytes in size.
+ * The buffer must be at least as large as the page size of the
+ * underlying database and aligned for unsigned integer access.
+ * Its size must be a multiple of 1024 bytes.
*/
key.ulen = (u_int32_t)UPDATES_PER_BULK_PUT *
(sizeof(u_int32_t) + DATALEN) * 1024;
@@ -464,19 +402,23 @@ bulk_delete_sec(dbenv, dbp, num, pair, countp, iterp, verbose)
memset(key.data, 0, key.ulen);
/*
- * Bulk delete records from a random key, which is one of charaters
- * in tstring. If DB_MULTIPLE, delete all characters before the random
- * key in the tstring. If DB_MULTIPLE_KEY, get duplicate data to the
- * specified keys and delete key/data pairs.
+ * Bulk delete all records of a specific set of keys which includes all
+ * characters before the random key in the tstring. The random key is
+ * one of the characters in the tstring.
+ * If DB_MULTIPLE, construct the key DBT by the DB_MULTIPLE_WRITE_NEXT
+ * with the specific set of keys. If DB_MULTIPLE_KEY, construct the key
+ * DBT by the DB_MULTIPLE_KEY_WRITE_NEXT with all key/data pairs of the
+ * specific set of keys.
*/
flag |= (pair) ? DB_MULTIPLE_KEY : DB_MULTIPLE;
DB_MULTIPLE_WRITE_INIT(ptrk, &key);
for (i = 0; i <= rc; i++) {
if (i % UPDATES_PER_BULK_PUT == 0) {
if (txnp != NULL) {
- if ((ret = txnp->commit(txnp, 0)) != 0)
- goto err;
+ ret = txnp->commit(txnp, 0);
txnp = NULL;
+ if (ret != 0)
+ goto err;
}
if ((ret = dbenv->txn_begin(
dbenv, NULL, &txnp, 0)) != 0)
@@ -570,11 +512,10 @@ bulk_fill(dbenv, dbp, num, dups, countp, iterp, verbose)
memset(&key, 0, sizeof(DBT));
memset(&data, 0, sizeof(DBT));
- /*
- * Need to account for proper buffer size,
+ /*
* The buffer must be at least as large as the page size of
- * the underlying database, aligned for unsigned integer
- * access, and be a multiple of 1024 bytes in size.
+ * the underlying database and aligned for unsigned integer
+ * access. Its size must be a multiple of 1024 bytes.
*/
key.ulen = (u_int32_t) UPDATES_PER_BULK_PUT *
(sizeof(u_int32_t) + DATALEN) * 1024;
@@ -589,12 +530,11 @@ bulk_fill(dbenv, dbp, num, dups, countp, iterp, verbose)
memset(data.data, 0, data.ulen);
/*
- * We could bulk insert with either DB_MULTIPLE in two buffers or
- * DB_MULTIPLE_KEY in one buffer. With DB_MULTIPLE, all keys are
- * constructed in key DBT, all data is constructed in data DBT.
- * With DB_MULTIPLE_KEY, all key/data pairs are constructed in
- * the key DBT. Here, we use DB_MULTIPLE mode when there are
- * duplicate records.
+ * Bulk insert with either DB_MULTIPLE in two buffers or
+ * DB_MULTIPLE_KEY in a single buffer. With DB_MULTIPLE, all keys are
+ * constructed in the key DBT, and all data is constructed in the data
+ * DBT. With DB_MULTIPLE_KEY, all key/data pairs are constructed in the
+ * key Dbt. We use DB_MULTIPLE mode when there are duplicate records.
*/
flag |= (dups) ? DB_MULTIPLE : DB_MULTIPLE_KEY;
DB_MULTIPLE_WRITE_INIT(ptrk, &key);
@@ -603,17 +543,18 @@ bulk_fill(dbenv, dbp, num, dups, countp, iterp, verbose)
for (i = 0; i < num; i++) {
if (i % UPDATES_PER_BULK_PUT == 0) {
if (txnp != NULL) {
- if ((ret = txnp->commit(txnp, 0)) != 0)
- goto err;
+ ret = txnp->commit(txnp, 0);
txnp = NULL;
+ if (ret != 0)
+ goto err;
}
if ((ret =
dbenv->txn_begin(dbenv, NULL, &txnp, 0)) != 0)
goto err;
}
data_val->id = 0;
+ get_string(tstring, data_val->str, i);
do {
- get_string(tstring, data_val->str, i);
if (dups) {
DB_MULTIPLE_WRITE_NEXT(ptrk, &key,
&i, sizeof(i));
@@ -622,7 +563,7 @@ bulk_fill(dbenv, dbp, num, dups, countp, iterp, verbose)
data_val, DATALEN);
assert(ptrd != NULL);
} else {
- DB_MULTIPLE_KEY_WRITE_NEXT(ptrk,
+ DB_MULTIPLE_KEY_WRITE_NEXT(ptrk,
&key, &i, sizeof(i), data_val, DATALEN);
assert(ptrk != NULL);
}
@@ -631,7 +572,7 @@ bulk_fill(dbenv, dbp, num, dups, countp, iterp, verbose)
"Insert key: %d, \t data: (id %d, str %s)\n",
i, data_val->id, data_val->str);
count++;
- } while (++data_val->id < dups);
+ } while (data_val->id++ < dups);
if ((i + 1) % UPDATES_PER_BULK_PUT == 0) {
switch (ret = dbp->put(dbp, txnp, &key, &data, flag)) {
case 0:
@@ -698,7 +639,6 @@ bulk_get(dbenv, dbp, num, dups, iter, countp, verbose)
/* Initialize key DBT and data DBT, malloc bulk buffer. */
memset(&key, 0, sizeof(key));
memset(&data, 0, sizeof(data));
- key.data = &j;
key.size = sizeof(j);
data.flags = DB_DBT_USERMEM;
data.data = malloc(DATALEN * 16 * 1024);
@@ -715,13 +655,18 @@ bulk_get(dbenv, dbp, num, dups, iter, countp, verbose)
goto err;
/*
- * Bulk retrieve from a random key. Use DB_MULTIPLE_INIT to
- * initialize variables for bulk retrieval. If there are
- * duplicate records, use DB_MULTIPLE_NEXT to iterate them
- * in the buffer. Unless, use DB_MULTIPLE_KEY_NEXT to iterate
- * records after the random key.
+ * Bulk retrieve by a random key which is a random
+ * non-negative integer smaller than "num".
+ * If there are duplicates in the database, retrieve
+ * with DB_MULTIPLE and use the DB_MULTIPLE_NEXT
+ * to iterate the data of the random key in the data
+ * DBT. Otherwise retrieve with DB_MULTIPLE_KEY and use
+ * the DB_MULTIPLE_KEY_NEXT to iterate the
+ * key/data pairs of the specific set of keys which
+ * includes all integers >= the random key and < "num".
*/
j = rand() % num;
+ key.data = &j;
if ((ret = dbcp->get(dbcp, &key, &data, flags)) != 0)
goto err;
DB_MULTIPLE_INIT(pointer, &data);
@@ -751,15 +696,23 @@ bulk_get(dbenv, dbp, num, dups, iter, countp, verbose)
}
}
- if ((ret = dbcp->close(dbcp)) != 0)
+ ret = dbcp->close(dbcp);
+ dbcp = NULL;
+ if (ret != 0)
goto err;
- if ((ret = txnp->commit(txnp, 0)) != 0)
+
+ ret = txnp->commit(txnp, 0);
+ txnp = NULL;
+ if (ret != 0)
goto err;
}
*countp = count;
-err:
+err: if (dbcp != NULL)
+ (void)dbcp->close(dbcp);
+ if (txnp != NULL)
+ (void)txnp->abort(txnp);
if (ret != 0)
dbp->err(dbp, ret, "get");
free(data.data);
@@ -767,13 +720,15 @@ err:
}
int
-compare_int(dbp, a, b)
+compare_int(dbp, a, b, locp)
DB *dbp;
const DBT *a, *b;
+ size_t *locp;
{
int ai, bi;
dbp = NULL;
+ locp = NULL;
/*
* Returns:
@@ -788,10 +743,102 @@ compare_int(dbp, a, b)
/*
* db_init --
+ * Open the database.
+ */
+int
+db_init(dbenv, dbpp, sdbpp, dups, sflag, pagesize)
+ DB_ENV *dbenv;
+ DB **dbpp, **sdbpp;
+ int dups, sflag, pagesize;
+{
+ DB *dbp, *sdbp;
+ DB_TXN *txnp;
+ int ret;
+
+ dbp = sdbp = NULL;
+ txnp = NULL;
+ ret = 0;
+
+ if ((ret = db_create(&dbp, dbenv, 0)) != 0) {
+ fprintf(stderr,
+ "%s: db_create: %s\n", progname, db_strerror(ret));
+ return (ret);
+ }
+ dbp->set_errfile(dbp, stderr);
+ dbp->set_errpfx(dbp, progname);
+ if ((ret = dbp->set_bt_compare(dbp, compare_int)) != 0) {
+ dbp->err(dbp, ret, "set_bt_compare");
+ goto err;
+ }
+ if ((ret = dbp->set_pagesize(dbp, pagesize)) != 0) {
+ dbp->err(dbp, ret, "set_pagesize");
+ goto err;
+ }
+ if (dups && (ret = dbp->set_flags(dbp, DB_DUP)) != 0) {
+ dbp->err(dbp, ret, "set_flags");
+ goto err;
+ }
+
+ if ((ret = dbenv->txn_begin(dbenv, NULL, &txnp, 0)) != 0)
+ goto err;
+
+ if ((ret = dbp->open(dbp, txnp, DATABASE, "primary", DB_BTREE,
+ DB_CREATE , 0664)) != 0) {
+ dbp->err(dbp, ret, "%s: open", DATABASE);
+ goto err;
+ }
+ *dbpp = dbp;
+
+ if (sflag) {
+ /*
+ * Open secondary database. The keys in secondary database
+ * are the first charactor in str of struct data in data
+ * field of primary database.
+ */
+ if ((ret = db_create(&sdbp, dbenv, 0)) != 0) {
+ fprintf(stderr, "%s: db_create: %s\n",
+ progname, db_strerror(ret));
+ goto err;
+ }
+ if ((ret = sdbp->set_flags(sdbp, DB_DUPSORT)) != 0) {
+ sdbp->err(sdbp, ret, "set_flags");
+ goto err;
+ }
+ if ((ret = sdbp->open(sdbp, txnp, DATABASE, "secondary",
+ DB_BTREE, DB_CREATE, 0664)) != 0) {
+ sdbp->err(sdbp, ret, "%s: secondary open", DATABASE);
+ goto err;
+ }
+ if ((ret = dbp->associate(dbp, txnp, sdbp, get_first_str,
+ 0)) != 0) {
+ dbp->err(dbp, ret, "%s: associate", DATABASE);
+ goto err;
+ }
+ }
+ *sdbpp = sdbp;
+
+ ret = txnp->commit(txnp, 0);
+ txnp = NULL;
+ if (ret != 0)
+ goto err;
+
+ return (0);
+
+err: if (txnp != NULL)
+ (void)txnp->abort(0);
+ if (sdbp != NULL)
+ (void)sdbp->close(sdbp, 0);
+ if (dbp != NULL)
+ (void)dbp->close(dbp, 0);
+ return (ret);
+}
+
+/*
+ * env_init --
* Initialize the environment.
*/
DB_ENV *
-db_init(home, prefix, cachesize)
+env_init(home, prefix, cachesize)
char *home, *prefix;
u_int cachesize;
{
@@ -804,8 +851,10 @@ db_init(home, prefix, cachesize)
}
dbenv->set_errfile(dbenv, stderr);
dbenv->set_errpfx(dbenv, prefix);
- (void)dbenv->set_cachesize(dbenv, 0,
- cachesize == 0 ? 50 * 1024 * 1024 : (u_int32_t)cachesize, 0);
+ if ((ret = dbenv->set_cachesize(dbenv, 0, cachesize, 0)) != 0) {
+ dbenv->err(dbenv, ret, "DB_ENV->set_cachesize");
+ return (NULL);
+ }
if ((ret = dbenv->open(dbenv, home, DB_CREATE | DB_INIT_MPOOL |
DB_INIT_TXN | DB_INIT_LOCK, 0)) != 0) {
@@ -857,11 +906,10 @@ usage()
-n number of keys [1000000] \n\
-p pagesize [65536] \n\
-v verbose output \n\
- -D perform bulk delete \n\
+ -D perform bulk delete \n\
-I just initialize the environment \n\
-R perform bulk read \n\
- -S perform bulk read in secondary database \n\
- -U perform bulk update \n",
+ -S perform bulk operation in secondary database \n",
progname);
exit(EXIT_FAILURE);
}
diff --git a/examples/c/ex_env.c b/examples/c/ex_env.c
index dfc436d6..80c66e89 100644
--- a/examples/c/ex_env.c
+++ b/examples/c/ex_env.c
@@ -1,13 +1,14 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
#include <sys/types.h>
+#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -25,6 +26,8 @@ int db_teardown __P((const char *, const char *, FILE *, const char *));
static int usage __P((void));
const char *progname = "ex_env"; /* Program name. */
+int EnvFlags =
+ DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN;
/*
* An example of a program creating/configuring a Berkeley DB environment.
@@ -37,15 +40,15 @@ main(argc, argv)
extern char *optarg;
extern int optind;
const char *data_dir, *home;
-
int ch;
+
/*
* All of the shared database files live in home, but
* data files will live in data_dir.
*/
home = "TESTDIR";
data_dir = "data";
- while ((ch = getopt(argc, argv, "h:d:")) != EOF)
+ while ((ch = getopt(argc, argv, "h:d:l")) != EOF)
switch (ch) {
case 'h':
home = optarg;
@@ -53,6 +56,9 @@ main(argc, argv)
case 'd':
data_dir = optarg;
break;
+ case 'l':
+ EnvFlags |= DB_LOCKDOWN;
+ break;
case '?':
default:
return (usage());
@@ -108,10 +114,12 @@ db_setup(home, data_dir, errfp, progname)
(void)dbenv->set_data_dir(dbenv, data_dir);
/* Open the environment with full transactional support. */
- if ((ret = dbenv->open(dbenv, home,
- DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
- DB_INIT_TXN, 0644)) != 0) {
+ if ((ret = dbenv->open(dbenv, home, EnvFlags, 0644)) != 0) {
dbenv->err(dbenv, ret, "environment open: %s", home);
+ if (ret == ENOENT) {
+ printf("Please check whether home dir \"%s\" existed.\n",
+ home);
+ }
dbenv->close(dbenv, 0);
return (1);
}
@@ -129,8 +137,12 @@ db_setup(home, data_dir, errfp, progname)
/* Open a database with DB_BTREE access method. */
if ((ret = dbp->open(dbp, NULL, "exenv_db1.db", NULL,
- DB_BTREE, DB_CREATE,0644)) != 0) {
+ DB_BTREE, DB_CREATE, 0644)) != 0) {
fprintf(stderr, "database open: %s\n", db_strerror(ret));
+ if (ret == ENOENT) {
+ printf("Please check whether data dir \"%s\" "
+ "exists under \"%s\".\n", data_dir, home);
+ }
return (1);
}
@@ -178,6 +190,6 @@ static int
usage()
{
(void)fprintf(stderr,
- "usage: %s [-h home] [-d data_dir]\n", progname);
+ "usage: %s [-l] [-h home] [-d data_dir]\n", progname);
return (EXIT_FAILURE);
}
diff --git a/examples/c/ex_heap.c b/examples/c/ex_heap.c
index 990c9365..474be909 100644
--- a/examples/c/ex_heap.c
+++ b/examples/c/ex_heap.c
@@ -1,7 +1,7 @@
/*
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*
@@ -24,7 +24,7 @@
#ifndef lint
static const char copyright[] =
- "Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.\n";
+ "Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.\n";
#endif
#define BUFFER_LEN 30 /* Buffer size to hold data */
@@ -66,7 +66,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
#include <unistd.h>
#endif
-int compare_int(DB *, const DBT *, const DBT *);
+int compare_int(DB *, const DBT *, const DBT *, size_t *);
int delete_recs __P((DB *, DB_ENV *, int));
int file_size __P((DB *, DBTYPE, int *));
int generate_data __P((char [], int, int));
@@ -622,13 +622,15 @@ err:
}
int
-compare_int(dbp, a, b)
+compare_int(dbp, a, b, locp)
DB *dbp;
const DBT *a, *b;
+ size_t *locp;
{
int ai, bi;
dbp = NULL;
+ locp = NULL;
/*
* Returns:
diff --git a/examples/c/ex_lock.c b/examples/c/ex_lock.c
index 32e22b0e..259d5057 100644
--- a/examples/c/ex_lock.c
+++ b/examples/c/ex_lock.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_mpool.c b/examples/c/ex_mpool.c
index c7a24283..c13e8962 100644
--- a/examples/c/ex_mpool.c
+++ b/examples/c/ex_mpool.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_rep/base/rep_base.c b/examples/c/ex_rep/base/rep_base.c
index c9443e4d..56662220 100644
--- a/examples/c/ex_rep/base/rep_base.c
+++ b/examples/c/ex_rep/base/rep_base.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -169,6 +169,8 @@ main(argc, argv)
goto err;
}
+ machtab_destroy(machtab);
+
/* Finish checkpoint and log archive threads. */
if ((ret = finish_support_threads(&ckp_thr, &lga_thr)) != 0)
goto err;
diff --git a/examples/c/ex_rep/base/rep_base.h b/examples/c/ex_rep/base/rep_base.h
index 27901349..48d5d3ac 100644
--- a/examples/c/ex_rep/base/rep_base.h
+++ b/examples/c/ex_rep/base/rep_base.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -71,6 +71,8 @@ typedef SOCKET socket_t;
#define readsocket(s, buf, sz) recv((s), (buf), (int)(sz), 0)
#define writesocket(s, buf, sz) send((s), (const char *)(buf), (int)(sz), 0)
#define net_errno WSAGetLastError()
+#undef SHUT_RDWR
+#define SHUT_RDWR SD_BOTH
#else /* !_WIN32 */
@@ -104,9 +106,10 @@ socket_t get_accepted_socket __P((const char *, int));
socket_t get_connected_socket
__P((machtab_t *, const char *, const char *, int, int *, int *));
int get_next_message __P((socket_t, DBT *, DBT *));
-socket_t listen_socket_init __P((const char *, int));
+socket_t listen_socket_init __P((const char *, int, machtab_t *));
socket_t listen_socket_accept
__P((machtab_t *, const char *, socket_t, int *));
+int machtab_destroy __P((machtab_t *));
int machtab_getinfo __P((machtab_t *, int, u_int32_t *, int *));
int machtab_init __P((machtab_t **, int));
void machtab_parm __P((machtab_t *, int *, u_int32_t *));
diff --git a/examples/c/ex_rep/base/rep_msg.c b/examples/c/ex_rep/base/rep_msg.c
index 8ed45f7f..bbcaed45 100644
--- a/examples/c/ex_rep/base/rep_msg.c
+++ b/examples/c/ex_rep/base/rep_msg.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -80,6 +80,10 @@ hm_loop(args)
for (ret = 0; ret == 0;) {
if ((ret = get_next_message(fd, &rec, &control)) != 0) {
+ if (app->shared_data.app_finished) {
+ ret = 0;
+ goto netclose;
+ }
/*
* Close this connection; if it's the master call
* for an election.
@@ -183,6 +187,7 @@ hm_loop(args)
"thread join failure");
goto out;
}
+ free(ea);
ea = NULL;
}
if ((ea = calloc(sizeof(elect_args), 1)) == NULL) {
@@ -219,15 +224,21 @@ hm_loop(args)
out: if ((t_ret = machtab_rem(tab, eid, 1)) != 0 && ret == 0)
ret = t_ret;
-
+netclose:
/* Don't close the environment before any children exit. */
- if (ea != NULL && thread_join(elect_thr, &status) != 0)
- dbenv->errx(dbenv, "can't join election thread");
+ if (ea != NULL) {
+ if (thread_join(elect_thr, &status) != 0)
+ dbenv->errx(dbenv, "can't join election thread");
+ free(ea);
+ ea = NULL;
+ }
- if (site_thrs != NULL)
+ if (site_thrs != NULL) {
while (--nsites >= 0)
if (thread_join(site_thrs[nsites], &status) != 0)
dbenv->errx(dbenv, "can't join site thread");
+ free(site_thrs);
+ }
return ((void *)(uintptr_t)ret);
}
@@ -242,6 +253,7 @@ connect_thread(args)
void *args;
{
DB_ENV *dbenv;
+ APP_DATA *app;
const char *home, *progname;
hm_loop_args *ha;
connect_args *cargs;
@@ -252,18 +264,20 @@ connect_thread(args)
socket_t fd, ns;
ha = NULL;
+ i = 0;
cargs = (connect_args *)args;
dbenv = cargs->dbenv;
home = cargs->home;
progname = cargs->progname;
machtab = cargs->machtab;
port = cargs->port;
+ app = dbenv->app_private;
/*
* Loop forever, accepting connections from new machines,
* and forking off a thread to handle each.
*/
- if ((fd = listen_socket_init(progname, port)) < 0) {
+ if ((fd = listen_socket_init(progname, port, machtab)) < 0) {
ret = errno;
goto err;
}
@@ -271,7 +285,10 @@ connect_thread(args)
for (i = 0; i < MAX_THREADS; i++) {
if ((ns = listen_socket_accept(machtab,
progname, fd, &eid)) == SOCKET_CREATION_FAILURE) {
- ret = errno;
+ if (app->shared_data.app_finished)
+ ret = 0;
+ else
+ ret = errno;
goto err;
}
if ((ha = calloc(sizeof(hm_loop_args), 1)) == NULL) {
@@ -285,7 +302,7 @@ connect_thread(args)
ha->eid = eid;
ha->tab = machtab;
ha->dbenv = dbenv;
- if ((ret = thread_create(&hm_thrs[i++], NULL,
+ if ((ret = thread_create(&hm_thrs[i], NULL,
hm_loop, (void *)ha)) != 0) {
dbenv->errx(dbenv, "can't create thread for site");
goto err;
@@ -297,12 +314,13 @@ connect_thread(args)
dbenv->errx(dbenv, "Too many threads");
ret = ENOMEM;
+err:
/* Do not return until all threads have exited. */
while (--i >= 0)
if (thread_join(hm_thrs[i], &status) != 0)
dbenv->errx(dbenv, "can't join site thread");
-err: return (ret == 0 ? (void *)EXIT_SUCCESS : (void *)EXIT_FAILURE);
+ return (ret == 0 ? (void *)EXIT_SUCCESS : (void *)EXIT_FAILURE);
}
/*
@@ -314,15 +332,15 @@ connect_all(args)
void *args;
{
DB_ENV *dbenv;
+ APP_DATA *app;
all_args *aa;
const char *home, *progname;
- hm_loop_args *ha;
int failed, i, nsites, open, ret, *success;
machtab_t *machtab;
- thread_t *hm_thr;
+ thread_t empty_id, *hm_thr;
repsite_t *sites;
+ void *status;
- ha = NULL;
aa = (all_args *)args;
dbenv = aa->dbenv;
progname = aa->progname;
@@ -330,6 +348,9 @@ connect_all(args)
machtab = aa->machtab;
nsites = aa->nsites;
sites = aa->sites;
+ status = NULL;
+ app = dbenv->app_private;
+ memset(&empty_id, 0, sizeof(thread_t));
ret = 0;
hm_thr = NULL;
@@ -353,6 +374,9 @@ connect_all(args)
if (success[i])
continue;
+ if (app->shared_data.app_finished)
+ goto err;
+
ret = connect_site(dbenv, machtab,
progname, &sites[i], &open, &hm_thr[i]);
@@ -378,7 +402,15 @@ connect_all(args)
sleep(1);
}
-err: if (success != NULL)
+err:
+ for (i = 0; i < nsites; i++) {
+ if (!success[i] ||
+ memcmp(&hm_thr[i], &empty_id, sizeof(thread_t)) == 0)
+ continue;
+ if (thread_join(hm_thr[i], &status) != 0)
+ dbenv->errx(dbenv, "can't join site thread");
+ }
+ if (success != NULL)
free(success);
if (hm_thr != NULL)
free(hm_thr);
@@ -453,12 +485,16 @@ elect_thread(args)
machtab_parm(machtab, &n, &timeout);
(void)dbenv->rep_set_timeout(dbenv, DB_REP_ELECTION_TIMEOUT, timeout);
- while ((ret = dbenv->rep_elect(dbenv, n, (n/2+1), 0)) != 0)
+ while ((ret = dbenv->rep_elect(dbenv, n, (n/2+1), 0)) != 0) {
+ if (app->shared_data.app_finished)
+ return (NULL);
sleep(2);
+ }
if (app->elected) {
app->elected = 0;
- if ((ret = dbenv->rep_start(dbenv, NULL, DB_REP_MASTER)) != 0)
+ if ((ret = dbenv->rep_start(dbenv, NULL,
+ DB_REP_MASTER)) != 0 && !app->shared_data.app_finished)
dbenv->err(dbenv, ret,
"can't start as master in election thread");
}
diff --git a/examples/c/ex_rep/base/rep_net.c b/examples/c/ex_rep/base/rep_net.c
index 29012536..e57e3af8 100644
--- a/examples/c/ex_rep/base/rep_net.c
+++ b/examples/c/ex_rep/base/rep_net.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -70,6 +70,7 @@ struct __machtab {
int current;
int max;
int nsites;
+ socket_t listenfd;
};
/* Data structure that describes each entry in the machtab. */
@@ -113,6 +114,7 @@ machtab_init(machtabp, nsites)
machtab->timeout_time = 2 * 1000000; /* 2 seconds. */
machtab->current = machtab->max = 0;
machtab->nsites = nsites;
+ machtab->listenfd = SOCKET_CREATION_FAILURE;
ret = mutex_init(&machtab->mtmutex, NULL);
*machtabp = machtab;
@@ -265,6 +267,47 @@ machtab_rem(machtab, eid, lock)
return (ret);
}
+/*
+ * machtab_destroy --
+ * Close the listening socket and all connecting sockets,
+ * So that all threads blocked on 'accept' and 'read' will be
+ * unblocked.
+ */
+int machtab_destroy(machtab)
+ machtab_t *machtab;
+{
+ int ret;
+ socket_t listenfd;
+ member_t *member;
+
+ if ((ret = mutex_lock(&machtab->mtmutex)) != 0) {
+ fprintf(stderr, "can't lock mutex\n");
+ return (ret);
+ }
+
+ listenfd = machtab->listenfd;
+ machtab->listenfd = SOCKET_CREATION_FAILURE;
+ for (member = LIST_FIRST(&machtab->machlist);
+ member != NULL;
+ member = LIST_FIRST(&machtab->machlist)) {
+ LIST_REMOVE(member, links);
+ shutdown(member->fd, SHUT_RDWR);
+ (void)closesocket(member->fd);
+ free(member);
+ machtab->current--;
+ }
+ shutdown(listenfd, SHUT_RDWR);
+ (void)closesocket(listenfd);
+ machtab->nextid = 2;
+ machtab->current = machtab->max = 0;
+
+ if ((ret = mutex_unlock(&machtab->mtmutex)) != 0) {
+ fprintf(stderr, "can't unlock mutex\n");
+ return (ret);
+ }
+ return (ret);
+}
+
void
machtab_parm(machtab, nump, timeoutp)
machtab_t *machtab;
@@ -310,9 +353,10 @@ machtab_print(machtab)
* in a thread that we're happy to let block.
*/
socket_t
-listen_socket_init(progname, port)
+listen_socket_init(progname, port, machtab)
const char *progname;
int port;
+ machtab_t *machtab;
{
socket_t s;
int sockopt;
@@ -349,6 +393,7 @@ listen_socket_init(progname, port)
goto err;
}
+ machtab->listenfd = s;
return (s);
err: closesocket(s);
@@ -380,7 +425,8 @@ accept_wait:
si_len = sizeof(si);
ns = accept(s, (struct sockaddr *)&si, &si_len);
if (ns == SOCKET_CREATION_FAILURE) {
- fprintf(stderr, "can't accept incoming connection\n");
+ if (machtab->listenfd != SOCKET_CREATION_FAILURE)
+ fprintf(stderr, "can't accept incoming connection\n");
return ns;
}
host = ntohl(si.sin_addr.s_addr);
diff --git a/examples/c/ex_rep/common/rep_common.c b/examples/c/ex_rep/common/rep_common.c
index a091adda..d7d2585a 100644
--- a/examples/c/ex_rep/common/rep_common.c
+++ b/examples/c/ex_rep/common/rep_common.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -19,6 +19,18 @@
#define DATABASE "quote.db"
#define SLEEPTIME 3
+/*
+ * Definition of thread-specific data key for PERM_FAILED structure
+ * stored in thread local storage.
+ */
+#ifdef _WIN32
+/* Windows style. */
+DWORD permfail_key;
+#else
+/* Posix style. */
+pthread_key_t permfail_key;
+#endif
+
static int print_stocks __P((DB *));
/*
@@ -346,15 +358,27 @@ doloop(dbenv, shared_data)
{
DB *dbp;
DBT key, data;
+ permfail_t *pfinfo;
char buf[BUFSIZE], *first, *price;
u_int32_t flags;
int ret;
dbp = NULL;
+ pfinfo = NULL;
ret = 0;
memset(&key, 0, sizeof(key));
memset(&data, 0, sizeof(data));
+ /* Allocate put/commit thread's PERM_FAILED structure. */
+ if (shared_data->is_repmgr) {
+ if ((pfinfo = malloc(sizeof(permfail_t))) == NULL)
+ goto err;
+ if ((ret = thread_setspecific(permfail_key, pfinfo)) != 0)
+ goto err;
+ pfinfo->thread_name = "PutCommit";
+ pfinfo->flag = 0;
+ }
+
for (;;) {
printf("QUOTESERVER%s> ",
shared_data->is_master ? "" : " (read-only)");
@@ -431,6 +455,16 @@ doloop(dbenv, shared_data)
dbenv->err(dbenv, ret, "DB->open");
goto err;
}
+ /* Check this thread's PERM_FAILED indicator. */
+ if (shared_data->is_repmgr) {
+ pfinfo = (permfail_t *)thread_getspecific(
+ permfail_key);
+ if (pfinfo->flag)
+ printf(
+ "%s Thread: dbopen not durable.\n",
+ pfinfo->thread_name);
+ pfinfo->flag = 0;
+ }
}
if (first == NULL) {
@@ -470,11 +504,23 @@ doloop(dbenv, shared_data)
dbp->err(dbp, ret, "DB->put");
goto err;
}
+ /* Check this thread's PERM_FAILED indicator. */
+ if (shared_data->is_repmgr) {
+ pfinfo = (permfail_t *)thread_getspecific(
+ permfail_key);
+ if (pfinfo->flag)
+ printf(
+ "%s Thread: put %s %s not durable.\n",
+ pfinfo->thread_name, first, price);
+ pfinfo->flag = 0;
+ }
}
}
err: if (dbp != NULL)
(void)dbp->close(dbp, DB_NOSYNC);
+ if (pfinfo != NULL)
+ free(pfinfo);
return (ret);
}
@@ -575,12 +621,24 @@ checkpoint_thread(args)
{
DB_ENV *dbenv;
SHARED_DATA *shared;
+ permfail_t *pfinfo;
supthr_args *ca;
int i, ret;
ca = (supthr_args *)args;
dbenv = ca->dbenv;
shared = ca->shared;
+ pfinfo = NULL;
+
+ /* Allocate checkpoint thread's PERM_FAILED structure. */
+ if (shared->is_repmgr) {
+ if ((pfinfo = malloc(sizeof(permfail_t))) == NULL)
+ return ((void *)EXIT_FAILURE);
+ if ((ret = thread_setspecific(permfail_key, pfinfo)) != 0)
+ return ((void *)EXIT_FAILURE);
+ pfinfo->thread_name = "Checkpoint";
+ pfinfo->flag = 0;
+ }
for (;;) {
/*
@@ -590,16 +648,30 @@ checkpoint_thread(args)
*/
for (i = 0; i < 60; i++) {
sleep(1);
- if (shared->app_finished == 1)
+ if (shared->app_finished == 1) {
+ if (pfinfo != NULL)
+ free(pfinfo);
return ((void *)EXIT_SUCCESS);
+ }
}
/* Perform a checkpoint. */
if ((ret = dbenv->txn_checkpoint(dbenv, 0, 0, 0)) != 0) {
dbenv->err(dbenv, ret,
"Could not perform checkpoint.\n");
+ if (pfinfo != NULL)
+ free(pfinfo);
return ((void *)EXIT_FAILURE);
}
+ /* Check this thread's PERM_FAILED indicator. */
+ if (shared->is_repmgr) {
+ pfinfo = (permfail_t *)thread_getspecific(
+ permfail_key);
+ if (pfinfo->flag)
+ printf("%s Thread: checkpoint not durable.\n",
+ pfinfo->thread_name);
+ pfinfo->flag = 0;
+ }
}
}
diff --git a/examples/c/ex_rep/common/rep_common.h b/examples/c/ex_rep/common/rep_common.h
index edf3b67d..8f7d1348 100644
--- a/examples/c/ex_rep/common/rep_common.h
+++ b/examples/c/ex_rep/common/rep_common.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -33,6 +33,7 @@ typedef struct {
int is_master;
int app_finished;
int in_client_sync;
+ int is_repmgr;
} SHARED_DATA;
/* Arguments for support threads. */
@@ -41,6 +42,15 @@ typedef struct {
SHARED_DATA *shared;
} supthr_args;
+/*
+ * Per-thread Replication Manager structure to associate a PERM_FAILED event
+ * with its originating transaction.
+ */
+typedef struct {
+ char *thread_name;
+ int flag;
+} permfail_t;
+
/* Portability macros for basic threading & timing */
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@@ -59,6 +69,16 @@ typedef HANDLE thread_t;
((WaitForSingleObject((thr), INFINITE) == WAIT_OBJECT_0) && \
GetExitCodeThread((thr), (LPDWORD)(statusp)) ? 0 : -1)
+/* Thread-specific data key for PERM_FAILED structure for Windows. */
+extern DWORD permfail_key;
+/* Thread local storage routine definitions for Windows. */
+#define thread_key_create(keyp) ((*keyp = TlsAlloc()) == \
+ TLS_OUT_OF_INDEXES ? (int)GetLastError() : 0)
+#define thread_key_delete(key) (TlsFree(key) ? 0 : (int)GetLastError())
+#define thread_setspecific(key, value) (TlsSetValue(key, value) ? 0 : \
+ (int)GetLastError())
+#define thread_getspecific(key) TlsGetValue(key)
+
#else /* !_WIN32 */
#include <sys/time.h>
#include <pthread.h>
@@ -68,6 +88,14 @@ typedef pthread_t thread_t;
pthread_create((thrp), (attr), (func), (arg))
#define thread_join(thr, statusp) pthread_join((thr), (statusp))
+/* Thread-specific data key for PERM_FAILED structure for Posix. */
+extern pthread_key_t permfail_key;
+/* Thread local storage routine definitions for Posix. */
+#define thread_key_create(keyp) pthread_key_create(keyp, NULL)
+#define thread_key_delete(key) pthread_key_delete(key)
+#define thread_setspecific(key, value) pthread_setspecific(key, value)
+#define thread_getspecific(key) pthread_getspecific(key)
+
#endif
void *checkpoint_thread __P((void *));
diff --git a/examples/c/ex_rep/mgr/rep_mgr.c b/examples/c/ex_rep/mgr/rep_mgr.c
index 0eaf1971..5c6d15f5 100644
--- a/examples/c/ex_rep/mgr/rep_mgr.c
+++ b/examples/c/ex_rep/mgr/rep_mgr.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -115,6 +115,10 @@ main(argc, argv)
dbenv->err(dbenv, ret,
"Could not set heartbeat monitor timeout.\n");
+ /* Create thread-specific data key for PERM_FAILED structure. */
+ if ((ret = thread_key_create(&permfail_key)) != 0)
+ goto err;
+
/*
* The following repmgr features may also be useful to your
* application. See Berkeley DB documentation for more details.
@@ -133,6 +137,7 @@ main(argc, argv)
/* Start checkpoint and log archive threads. */
sup_args.dbenv = dbenv;
sup_args.shared = &my_app_data.shared_data;
+ my_app_data.shared_data.is_repmgr = 1;
if ((ret = start_support_threads(dbenv, &sup_args, &ckp_thr,
&lga_thr)) != 0)
goto err;
@@ -163,6 +168,10 @@ main(argc, argv)
goto err;
}
+ /* Delete thread-specific data key for PERM_FAILED structure. */
+ if ((ret = thread_key_delete(permfail_key)) != 0)
+ goto err;
+
err:
if (dbenv != NULL &&
(t_ret = dbenv->close(dbenv, 0)) != 0) {
@@ -183,8 +192,10 @@ event_callback(dbenv, which, info)
{
APP_DATA *app = dbenv->app_private;
SHARED_DATA *shared = &app->shared_data;
+ permfail_t *pfinfo;
int err;
+ pfinfo = NULL;
switch (which) {
case DB_EVENT_PANIC:
@@ -213,8 +224,12 @@ event_callback(dbenv, which, info)
* transaction will be flushed to the master site's
* local disk storage for durability.
*/
+ /* Set this thread's PERM_FAILED indicator. */
+ pfinfo = (permfail_t *)thread_getspecific(permfail_key);
+ printf("%s Thread: ", pfinfo->thread_name);
+ pfinfo->flag = 1;
printf(
- "Insufficient acknowledgements to guarantee transaction durability.\n");
+ "Insufficient acknowledgements for transaction durability.\n");
break;
case DB_EVENT_REP_STARTUPDONE:
diff --git a/examples/c/ex_rep_chan/rep_chan.c b/examples/c/ex_rep_chan/rep_chan.c
index f5638264..1c661746 100644
--- a/examples/c/ex_rep_chan/rep_chan.c
+++ b/examples/c/ex_rep_chan/rep_chan.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_rep_chan/rep_chan.h b/examples/c/ex_rep_chan/rep_chan.h
index 9eff740d..7f46b5ff 100644
--- a/examples/c/ex_rep_chan/rep_chan.h
+++ b/examples/c/ex_rep_chan/rep_chan.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
* $Id$
*/
diff --git a/examples/c/ex_rep_chan/rep_chan_util.c b/examples/c/ex_rep_chan/rep_chan_util.c
index 07758152..b915e58d 100644
--- a/examples/c/ex_rep_chan/rep_chan_util.c
+++ b/examples/c/ex_rep_chan/rep_chan_util.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -622,7 +622,7 @@ open_dbp(dbenv, is_master, dbpp)
{
DB *dbp;
u_int32_t flags;
- int ret;
+ int ret, t_ret;
if ((ret = db_create(dbpp, dbenv, 0)) != 0)
return (ret);
@@ -647,13 +647,13 @@ open_dbp(dbenv, is_master, dbpp)
if ((ret = dbp->open(dbp,
NULL, DATABASE, NULL, DB_BTREE, flags, 0)) != 0) {
if (ret == ENOENT) {
- printf( "No stock database yet available.\n");
- if ((ret = dbp->close(dbp, 0)) != 0) {
- dbenv->err(dbenv, ret,
- "DB->close");
+ printf("No stock database yet available.\n");
+ *dbpp = NULL;
+ if ((t_ret = dbp->close(dbp, 0)) != 0) {
+ ret = t_ret;
+ dbenv->err(dbenv, ret, "DB->close");
goto err;
}
- *dbpp = NULL;
}
if (ret == DB_REP_HANDLE_DEAD ||
ret == DB_LOCK_DEADLOCK) {
diff --git a/examples/c/ex_rep_gsg/rep_mgr_gsg.c b/examples/c/ex_rep_gsg/rep_mgr_gsg.c
index aea8a05f..879a1c9d 100644
--- a/examples/c/ex_rep_gsg/rep_mgr_gsg.c
+++ b/examples/c/ex_rep_gsg/rep_mgr_gsg.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_rep_gsg/simple_txn.c b/examples/c/ex_rep_gsg/simple_txn.c
index c8feb16d..54406f4a 100644
--- a/examples/c/ex_rep_gsg/simple_txn.c
+++ b/examples/c/ex_rep_gsg/simple_txn.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_sequence.c b/examples/c/ex_sequence.c
index 28f0e199..dd01ec33 100644
--- a/examples/c/ex_sequence.c
+++ b/examples/c/ex_sequence.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_stream.c b/examples/c/ex_stream.c
index 209d6279..5bc0f0ed 100644
--- a/examples/c/ex_stream.c
+++ b/examples/c/ex_stream.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_thread.c b/examples/c/ex_thread.c
index 7b39c8eb..00e0c368 100644
--- a/examples/c/ex_thread.c
+++ b/examples/c/ex_thread.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/ex_tpcb.c b/examples/c/ex_tpcb.c
index 16807d2c..89a9210c 100644
--- a/examples/c/ex_tpcb.c
+++ b/examples/c/ex_tpcb.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/getting_started/example_database_load.c b/examples/c/getting_started/example_database_load.c
index 52127421..e09a1096 100644
--- a/examples/c/getting_started/example_database_load.c
+++ b/examples/c/getting_started/example_database_load.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*/
#include "gettingstarted_common.h"
@@ -77,7 +77,7 @@ main(int argc, char *argv[])
/* Open all databases */
ret = databases_setup(&my_stock, "example_database_load", stderr);
if (ret) {
- fprintf(stderr, "Error opening databases\n");
+ fprintf(stderr, "Error opening databases.\n");
databases_close(&my_stock);
return (ret);
}
@@ -121,6 +121,7 @@ load_vendors_database(STOCK_DBS my_stock, char *vendor_file)
return (-1);
}
+ /* Iterate over the vendor file */
while (fgets(buf, MAXLINE, ifp) != NULL) {
/* zero out the structure */
memset(&my_vendor, 0, sizeof(VENDOR));
@@ -164,6 +165,7 @@ load_vendors_database(STOCK_DBS my_stock, char *vendor_file)
my_stock.vendor_dbp->put(my_stock.vendor_dbp, 0, &key, &data, 0);
} /* end vendors database while loop */
+ /* Close the vendor.txt file */
fclose(ifp);
return (0);
}
@@ -220,6 +222,10 @@ load_inventory_database(STOCK_DBS my_stock, char *inventory_file)
return (-1);
}
+ /*
+ * Read the inventory.txt file line by line, saving each line off to
+ * the database as we go.
+ */
while (fgets(buf, MAXLINE, ifp) != NULL) {
/*
* Scan the line into the appropriate buffers and variables.
@@ -238,10 +244,22 @@ load_inventory_database(STOCK_DBS my_stock, char *inventory_file)
bufLen = 0;
dataLen = 0;
+ /*
+ * We first store the fixed-length elements. This makes our code
+ * to retrieve this data from the database a little bit easier.
+ */
+
+ /* First discover how long the data element is. */
dataLen = sizeof(float);
+ /* Then copy it to our buffer */
memcpy(databuf, &price, dataLen);
+ /*
+ * Then figure out how much data is actually in our buffer.
+ * We repeat this pattern for all the data we want to store.
+ */
bufLen += dataLen;
+ /* Rinse, lather, repeat. */
dataLen = sizeof(int);
memcpy(databuf + bufLen, &quantity, dataLen);
bufLen += dataLen;
@@ -251,11 +269,19 @@ load_inventory_database(STOCK_DBS my_stock, char *inventory_file)
bufLen = pack_string(databuf, category, bufLen);
bufLen = pack_string(databuf, vendor, bufLen);
+ /*
+ * Now actually save the contents of the buffer off
+ * to our database.
+ */
+
/* Zero out the DBTs */
memset(&key, 0, sizeof(DBT));
memset(&data, 0, sizeof(DBT));
- /* The key is the item's SKU */
+ /*
+ * The key is the item's SKU. This is a unique value, so we need
+ * not support duplicates for this database.
+ */
key.data = sku;
key.size = (u_int32_t)strlen(sku) + 1;
diff --git a/examples/c/getting_started/example_database_read.c b/examples/c/getting_started/example_database_read.c
index 79a9fc2c..0e8486ff 100644
--- a/examples/c/getting_started/example_database_read.c
+++ b/examples/c/getting_started/example_database_read.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*/
#include "gettingstarted_common.h"
@@ -72,6 +72,10 @@ main(int argc, char *argv[])
return (ret);
}
+ /*
+ * Show either a single item or all items, depending
+ * on whether itemname is set to a value.
+ */
if (itemname == NULL)
ret = show_all_records(&my_stock);
else
@@ -197,23 +201,33 @@ show_inventory_item(void *vBuf)
char *category, *name, *sku, *vendor_name;
char *buf = (char *)vBuf;
+ /* Get the price. */
price = *((float *)buf);
buf_pos = sizeof(float);
+ /* Get the quantity. */
quantity = *((int *)(buf + buf_pos));
buf_pos += sizeof(int);
+ /* Get the inventory item's name */
name = buf + buf_pos;
buf_pos += strlen(name) + 1;
+ /* Get the inventory item's sku */
sku = buf + buf_pos;
buf_pos += strlen(sku) + 1;
+ /*
+ * Get the category (fruits, vegetables, desserts) that this
+ * item belongs to.
+ */
category = buf + buf_pos;
buf_pos += strlen(category) + 1;
+ /* Get the vendor's name */
vendor_name = buf + buf_pos;
+ /* Display all this information */
printf("name: %s\n", name);
printf("\tSKU: %s\n", sku);
printf("\tCategory: %s\n", category);
@@ -221,6 +235,7 @@ show_inventory_item(void *vBuf)
printf("\tQuantity: %i\n", quantity);
printf("\tVendor:\n");
+ /* Return the vendor's name */
return (vendor_name);
}
diff --git a/examples/c/getting_started/gettingstarted_common.c b/examples/c/getting_started/gettingstarted_common.c
index 86faa1c0..f388b13d 100644
--- a/examples/c/getting_started/gettingstarted_common.c
+++ b/examples/c/getting_started/gettingstarted_common.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*/
#include "gettingstarted_common.h"
@@ -49,9 +49,11 @@ get_item_name(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey)
/* Opens a database */
int
-open_database(DB **dbpp, const char *file_name,
- const char *program_name, FILE *error_file_pointer,
- int is_secondary)
+open_database(DB **dbpp, /* The DB handle that we are opening */
+ const char *file_name, /* The file in which the db lives */
+ const char *program_name, /* Name of the program */
+ FILE *error_file_pointer,
+ int is_secondary)
{
DB *dbp; /* For convenience */
u_int32_t open_flags;
@@ -173,8 +175,8 @@ initialize_stockdbs(STOCK_DBS *my_stock)
my_stock->inventory_dbp = NULL;
my_stock->vendor_dbp = NULL;
my_stock->itemname_sdbp = NULL;
- my_stock->vendor_db_name = NULL;
my_stock->inventory_db_name = NULL;
+ my_stock->vendor_db_name = NULL;
my_stock->itemname_db_name = NULL;
}
diff --git a/examples/c/getting_started/gettingstarted_common.h b/examples/c/getting_started/gettingstarted_common.h
index 7365fc7f..90c12e6e 100644
--- a/examples/c/getting_started/gettingstarted_common.h
+++ b/examples/c/getting_started/gettingstarted_common.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*/
#include <db.h>
@@ -52,8 +52,8 @@ typedef struct vendor {
} VENDOR;
/* Function prototypes */
-int databases_close(STOCK_DBS *);
int databases_setup(STOCK_DBS *, const char *, FILE *);
+int databases_close(STOCK_DBS *);
void initialize_stockdbs(STOCK_DBS *);
int open_database(DB **, const char *, const char *, FILE *, int);
void set_db_filenames(STOCK_DBS *my_stock);
diff --git a/examples/c/txn_guide/txn_guide.c b/examples/c/txn_guide/txn_guide.c
index e278120e..813244fd 100644
--- a/examples/c/txn_guide/txn_guide.c
+++ b/examples/c/txn_guide/txn_guide.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/c/txn_guide/txn_guide_inmemory.c b/examples/c/txn_guide/txn_guide_inmemory.c
index 621bb2ae..d15397ad 100644
--- a/examples/c/txn_guide/txn_guide_inmemory.c
+++ b/examples/c/txn_guide/txn_guide_inmemory.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/csharp/excs_access/Properties/AssemblyInfo.cs b/examples/csharp/excs_access/Properties/AssemblyInfo.cs
index 0411dea9..82d04dc5 100644
--- a/examples/csharp/excs_access/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_access/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_access")]
-[assembly: AssemblyCopyright("Copyright © 2008, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2008, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_access/excs_access.cs b/examples/csharp/excs_access/excs_access.cs
index f5b9021c..687b6fbf 100644
--- a/examples/csharp/excs_access/excs_access.cs
+++ b/examples/csharp/excs_access/excs_access.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_btrec/Properties/AssemblyInfo.cs b/examples/csharp/excs_btrec/Properties/AssemblyInfo.cs
index 670f908d..b2ac194e 100644
--- a/examples/csharp/excs_btrec/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_btrec/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_btrec")]
-[assembly: AssemblyCopyright("Copyright © 2008, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2008, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_btrec/excs_btrec.cs b/examples/csharp/excs_btrec/excs_btrec.cs
index 5cf5da62..012bdb7d 100644
--- a/examples/csharp/excs_btrec/excs_btrec.cs
+++ b/examples/csharp/excs_btrec/excs_btrec.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_bulk/Properties/AssemblyInfo.cs b/examples/csharp/excs_bulk/Properties/AssemblyInfo.cs
index f4f58434..31d91ed1 100644
--- a/examples/csharp/excs_bulk/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_bulk/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_bulk")]
-[assembly: AssemblyCopyright("Copyright ? 2009, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright ? 2009, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_bulk/excs_bulk.cs b/examples/csharp/excs_bulk/excs_bulk.cs
index d5c68cdd..bd19b218 100644
--- a/examples/csharp/excs_bulk/excs_bulk.cs
+++ b/examples/csharp/excs_bulk/excs_bulk.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_env/Properties/AssemblyInfo.cs b/examples/csharp/excs_env/Properties/AssemblyInfo.cs
index 096ce69c..a5351b60 100644
--- a/examples/csharp/excs_env/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_env/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_env")]
-[assembly: AssemblyCopyright("Copyright © 2008, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2008, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_env/excs_env.cs b/examples/csharp/excs_env/excs_env.cs
index 5040c886..27a45c42 100644
--- a/examples/csharp/excs_env/excs_env.cs
+++ b/examples/csharp/excs_env/excs_env.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/DatabaseExample.cs b/examples/csharp/excs_getting_started/DatabaseExample.cs
index 5327c27c..0c2b594f 100644
--- a/examples/csharp/excs_getting_started/DatabaseExample.cs
+++ b/examples/csharp/excs_getting_started/DatabaseExample.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/DatabaseLoader.cs b/examples/csharp/excs_getting_started/DatabaseLoader.cs
index 4f1d0e8f..eaf4883b 100644
--- a/examples/csharp/excs_getting_started/DatabaseLoader.cs
+++ b/examples/csharp/excs_getting_started/DatabaseLoader.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/DatabaseReader.cs b/examples/csharp/excs_getting_started/DatabaseReader.cs
index 84fe5256..592e6af7 100644
--- a/examples/csharp/excs_getting_started/DatabaseReader.cs
+++ b/examples/csharp/excs_getting_started/DatabaseReader.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/Inventory.cs b/examples/csharp/excs_getting_started/Inventory.cs
index 783d2780..26b83718 100644
--- a/examples/csharp/excs_getting_started/Inventory.cs
+++ b/examples/csharp/excs_getting_started/Inventory.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/MyDbs.cs b/examples/csharp/excs_getting_started/MyDbs.cs
index 3e460849..1895a85c 100644
--- a/examples/csharp/excs_getting_started/MyDbs.cs
+++ b/examples/csharp/excs_getting_started/MyDbs.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs b/examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs
index 5f592bd8..d8d8b157 100644
--- a/examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_getting_started")]
-[assembly: AssemblyCopyright("Copyright © 2009, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2009, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_getting_started/Vendor.cs b/examples/csharp/excs_getting_started/Vendor.cs
index a5220436..646c785e 100644
--- a/examples/csharp/excs_getting_started/Vendor.cs
+++ b/examples/csharp/excs_getting_started/Vendor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_lock/Properties/AssemblyInfo.cs b/examples/csharp/excs_lock/Properties/AssemblyInfo.cs
index d0698374..606e0840 100644
--- a/examples/csharp/excs_lock/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_lock/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_lock")]
-[assembly: AssemblyCopyright("Copyright © 2008, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2008, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_lock/excs_lock.cs b/examples/csharp/excs_lock/excs_lock.cs
index 6df976f1..90386050 100644
--- a/examples/csharp/excs_lock/excs_lock.cs
+++ b/examples/csharp/excs_lock/excs_lock.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/csharp/excs_repquote/Properties/AssemblyInfo.cs b/examples/csharp/excs_repquote/Properties/AssemblyInfo.cs
index 22e54459..85a2a5cc 100644
--- a/examples/csharp/excs_repquote/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_repquote/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_repquote")]
-[assembly: AssemblyCopyright("Copyright © 2009, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2009, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_repquote/RepConfig.cs b/examples/csharp/excs_repquote/RepConfig.cs
index 6471fcd7..11503141 100644
--- a/examples/csharp/excs_repquote/RepConfig.cs
+++ b/examples/csharp/excs_repquote/RepConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_repquote/RepQuoteEnvironment.cs b/examples/csharp/excs_repquote/RepQuoteEnvironment.cs
index 344f5c4f..fed9df31 100644
--- a/examples/csharp/excs_repquote/RepQuoteEnvironment.cs
+++ b/examples/csharp/excs_repquote/RepQuoteEnvironment.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_repquote/RepQuoteExample.cs b/examples/csharp/excs_repquote/RepQuoteExample.cs
index 311e0518..b31dd51f 100644
--- a/examples/csharp/excs_repquote/RepQuoteExample.cs
+++ b/examples/csharp/excs_repquote/RepQuoteExample.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_sequence/Properties/AssemblyInfo.cs b/examples/csharp/excs_sequence/Properties/AssemblyInfo.cs
index 9107d345..241c9b82 100644
--- a/examples/csharp/excs_sequence/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_sequence/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_sequence")]
-[assembly: AssemblyCopyright("Copyright © 2008, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2008, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_sequence/excs_sequence.cs b/examples/csharp/excs_sequence/excs_sequence.cs
index ce74f880..ee7409fa 100644
--- a/examples/csharp/excs_sequence/excs_sequence.cs
+++ b/examples/csharp/excs_sequence/excs_sequence.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_txn/PayloadData.cs b/examples/csharp/excs_txn/PayloadData.cs
index 7549de71..1c8aadea 100644
--- a/examples/csharp/excs_txn/PayloadData.cs
+++ b/examples/csharp/excs_txn/PayloadData.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/csharp/excs_txn/Properties/AssemblyInfo.cs b/examples/csharp/excs_txn/Properties/AssemblyInfo.cs
index 8ad1d1f6..a8823aac 100644
--- a/examples/csharp/excs_txn/Properties/AssemblyInfo.cs
+++ b/examples/csharp/excs_txn/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle Corporation")]
[assembly: AssemblyProduct("excs_txn")]
-[assembly: AssemblyCopyright("Copyright © 2009, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2009, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/examples/csharp/excs_txn/excs_txn.cs b/examples/csharp/excs_txn/excs_txn.cs
index 9876e7b8..a2784aae 100644
--- a/examples/csharp/excs_txn/excs_txn.cs
+++ b/examples/csharp/excs_txn/excs_txn.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/examples/cxx/AccessExample.cpp b/examples/cxx/AccessExample.cpp
index 48683188..431b6c60 100644
--- a/examples/cxx/AccessExample.cpp
+++ b/examples/cxx/AccessExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/BtRecExample.cpp b/examples/cxx/BtRecExample.cpp
index 807b46f5..4cd6f948 100644
--- a/examples/cxx/BtRecExample.cpp
+++ b/examples/cxx/BtRecExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/BulkExample.cpp b/examples/cxx/BulkExample.cpp
new file mode 100644
index 00000000..0cd79f64
--- /dev/null
+++ b/examples/cxx/BulkExample.cpp
@@ -0,0 +1,910 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ * $Id$
+ */
+#include <errno.h>
+#include <iostream>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+
+#include <db_cxx.h>
+
+#define DATABASE "excxx_bulk.db" /* Database name */
+#define DATALEN 20 /* The length of data */
+#define NS_PER_MS 1000000 /* Nanoseconds in a millisecond */
+#define NS_PER_US 1000 /* Nanoseconds in a microsecond */
+#define STRLEN DATALEN - sizeof(int) /* The length of string */
+#define UPDATES_PER_BULK_PUT 100
+
+#ifdef _WIN32
+#include <sys/timeb.h>
+extern "C" {
+ int getopt(int, char * const *, const char *);
+ char *optarg;
+}
+/* Implement a basic high res timer with a POSIX interface for Windows. */
+struct timeval {
+ time_t tv_sec;
+ long tv_usec;
+};
+int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ struct _timeb now;
+ _ftime(&now);
+ tv->tv_sec = now.time;
+ tv->tv_usec = now.millitm * NS_PER_US;
+ return (0);
+}
+#define CLEANUP_CMD "rmdir EXCXX_BULK /q/s"
+#else
+#include <sys/time.h>
+#include <unistd.h>
+#define CLEANUP_CMD "rm -rf EXCXX_BULK"
+#endif
+
+int compare_int(Db *, const Dbt *, const Dbt *, size_t *);
+int get_first_str(Db *, const Dbt *, const Dbt *, Dbt *);
+int get_string(const char *, char *, int);
+static void usage();
+
+const char *progname = "BulkExample";
+const char tstring[STRLEN] = "0123456789abcde";
+
+struct data {
+ int id;
+ char str[STRLEN];
+};
+
+using std::cin;
+using std::cout;
+using std::cerr;
+using std::endl;
+
+class BulkExample
+{
+public:
+ BulkExample();
+ ~BulkExample();
+ void bulkDelete(
+ int num, int dups, int *countp, int *iterp, int verbose);
+ void bulkRead(int num, int dups, int iter, int *countp, int verbose);
+ void bulkSecondaryDelete(
+ int num, int pair, int *countp, int *iterp, int verbose);
+ void bulkUpdate(
+ int num, int dups, int *countp, int *iterp, int verbose);
+ void initDb(int, int, int);
+ void initDbenv(const char *, u_int);
+ void run(int, char *[]);
+ void throwException(DbEnv *, DbTxn *, int, const char *);
+private:
+ DbEnv *dbenv;
+ Db *dbp, *sdbp;
+ struct data *data_val;
+ void *dbuf, *kbuf;
+ u_int32_t dlen, klen;
+};
+
+void BulkExample::throwException(
+ DbEnv *dbenvp, DbTxn *txn, int ret, const char *msg)
+{
+ if (txn != NULL) {
+ (void)txn->abort();
+ txn = NULL;
+ }
+ if (dbenvp != NULL && msg != NULL)
+ dbenvp->err(ret, msg);
+ throw DbException(ret);
+}
+
+void BulkExample::run(int argc, char *argv[])
+{
+ struct timeval start_time, end_time;
+ double secs;
+ int biter, ch, count, dflag, dups, init, iter, num, pair;
+ int rflag, sflag, verbose;
+ u_int32_t cachesize, pagesize;
+
+ dflag = dups = init = rflag = sflag = verbose = 0;
+ iter = num = 1000000;
+ pagesize = 65536;
+ cachesize = 1000 * pagesize;
+
+ while ((ch = getopt(argc, argv, "c:Dd:Ii:n:p:RSv")) != EOF)
+ switch (ch) {
+ case 'c':
+ cachesize = (u_int32_t)atoi(optarg);
+ break;
+ case 'D':
+ dflag = 1;
+ break;
+ case 'd':
+ dups = atoi(optarg);
+ if (dups < 0)
+ usage();
+ break;
+ case 'I':
+ init = 1;
+ break;
+ case 'i':
+ iter = atoi(optarg);
+ break;
+ case 'n':
+ num = atoi(optarg);
+ break;
+ case 'p':
+ pagesize = (u_int32_t)atoi(optarg);
+ break;
+ case 'R':
+ rflag = 1;
+ break;
+ case 'S':
+ sflag = 1;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case '?':
+ default:
+ usage();
+ }
+
+ /* Remove the previous environment and database(s). */
+ if (!rflag) {
+ system(CLEANUP_CMD);
+ system("mkdir EXCXX_BULK");
+ }
+
+ initDbenv("EXCXX_BULK", cachesize);
+
+ if (init)
+ return;
+
+ initDb(dups, sflag, pagesize);
+
+ srand((int)time(NULL));
+ if (rflag) {
+ /* Time the get loop. */
+ (void)gettimeofday(&start_time, NULL);
+ bulkRead(num, dups, iter, &count, verbose);
+ (void)gettimeofday(&end_time, NULL);
+ secs =
+ (((double)end_time.tv_sec * 1000000 +
+ end_time.tv_usec) -
+ ((double)start_time.tv_sec * 1000000 +
+ start_time.tv_usec)) / 1000000;
+ printf("[STAT] Read %d records read using %d batches",
+ count, iter);
+ printf(" in %.2f seconds: ", secs);
+ printf("%.0f records/second\n", (double)count / secs);
+ } else {
+ /* Time the fill loop. */
+ (void)gettimeofday(&start_time, NULL);
+ bulkUpdate(num, dups, &count, &biter, verbose);
+ (void)gettimeofday(&end_time, NULL);
+ secs = (((double)end_time.tv_sec * 1000000 +
+ end_time.tv_usec) -
+ ((double)start_time.tv_sec * 1000000 +
+ start_time.tv_usec)) / 1000000;
+ printf("[STAT] Insert %d records using %d batches",
+ count, biter);
+ printf(" in %.2f seconds: ", secs);
+ printf("%.0f records/second\n", (double)count / secs);
+ if (dflag) {
+ if (sflag) {
+ pair = rand() % 2;
+ /* Time the delete loop in secondary db */
+ (void)gettimeofday(&start_time, NULL);
+ bulkSecondaryDelete(num,
+ pair, &count, &iter, verbose);
+ (void)gettimeofday(&end_time, NULL);
+ secs = (((double)end_time.tv_sec * 1000000 +
+ end_time.tv_usec) -
+ ((double)start_time.tv_sec * 1000000 +
+ start_time.tv_usec)) / 1000000;
+ printf("[STAT] Delete %d %s using %d batches",
+ count, (pair) ? "records" : "keys", iter);
+ printf(" in %.2f seconds: ", secs);
+ printf("%.0f records/second\n",
+ (double)count / secs);
+ } else {
+ /* Time the delete loop in primary db */
+ (void)gettimeofday(&start_time, NULL);
+ bulkDelete(num, dups, &count, &iter, verbose);
+ (void)gettimeofday(&end_time, NULL);
+ secs = (((double)end_time.tv_sec * 1000000 +
+ end_time.tv_usec) -
+ ((double)start_time.tv_sec * 1000000 +
+ start_time.tv_usec)) / 1000000;
+ printf(
+"[STAT] Delete %d records using %d batches",
+ count, iter);
+ printf(" in %.2f seconds: ", secs);
+ printf("%.0f records/second\n",
+ (double)count / secs);
+ }
+ }
+ }
+}
+
+/* Bulk delete from a database. */
+void BulkExample::bulkDelete(
+ int num, int dups, int *countp, int *iterp, int verbose)
+{
+ Dbt key;
+ DbTxn *txnp;
+ DbMultipleDataBuilder *ptrd;
+ DbMultipleKeyDataBuilder *ptrkd;
+ u_int32_t flag;
+ int count, i, j, iter, ret;
+
+ txnp = NULL;
+ count = flag = iter = ret = 0;
+ memset(&key, 0, sizeof(Dbt));
+
+ j = rand() % num;
+
+ /*
+ * The buffer must be at least as large as the page size of the
+ * underlying database and aligned for unsigned integer access.
+ * Its size must be a multiple of 1024 bytes.
+ */
+ if (klen != (u_int32_t)UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024) {
+ klen = (u_int32_t)UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024;
+ kbuf = realloc(kbuf, klen);
+ }
+ memset(kbuf, 0, klen);
+ key.set_ulen(klen);
+ key.set_flags(DB_DBT_USERMEM | DB_DBT_BULK);
+ key.set_data(kbuf);
+ if (data_val == NULL)
+ data_val = (data *)malloc(DATALEN);
+ memset(data_val, 0, DATALEN);
+
+ /*
+ * Bulk delete all records of a specific set of keys which includes all
+ * non-negative integers smaller than the random key. The random key is
+ * a random non-negative integer smaller than "num".
+ * If DB_MULTIPLE, construct the key Dbt by the DbMultipleDataBuilder
+ * with the specific set of keys. If DB_MULTIPLE_KEY, construct the key
+ * Dbt by the DbMultipleKeyDataBuilder with all key/data pairs of the
+ * specific set of keys.
+ */
+ flag |= (dups) ? DB_MULTIPLE_KEY : DB_MULTIPLE;
+ if (dups)
+ ptrkd = new DbMultipleKeyDataBuilder(key);
+ else
+ ptrd = new DbMultipleDataBuilder(key);
+ try {
+ for (i = 0; i < j; i++) {
+ if (i % UPDATES_PER_BULK_PUT == 0) {
+ if (txnp != NULL) {
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_TXN->commit");
+ }
+ if ((ret = dbenv->txn_begin(NULL,
+ &txnp, 0)) != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_ENV->txn_begin");
+ }
+
+ if (dups) {
+ data_val->id = 0;
+ get_string(tstring, data_val->str, i);
+ do {
+ if(ptrkd->append(&i,sizeof(i),
+ data_val, DATALEN) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+"DbMultipleKeyDataBuilder->append");
+ count++;
+ if (verbose)
+ printf(
+"Delete key: %d, \tdata: (id %d, str %s)\n",
+ i, data_val->id,
+ data_val->str);
+ } while (data_val->id++ < dups);
+ } else {
+ if(ptrd->append(&i,sizeof(i)) == false)
+ throwException(dbenv, txnp, ret,
+ "DbMultipleDataBuilder->append");
+ count++;
+ if (verbose)
+ printf("Delete key: %d\n", i);
+ }
+
+ if ((i + 1) % UPDATES_PER_BULK_PUT == 0) {
+ if ((ret = dbp->del(txnp, &key, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->del");
+ iter++;
+ if (dups)
+ ptrkd = new
+ DbMultipleKeyDataBuilder(key);
+ else
+ ptrd = new DbMultipleDataBuilder(key);
+ }
+ }
+ if ((j % UPDATES_PER_BULK_PUT) != 0) {
+ if ((ret = dbp->del(txnp, &key, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->del");
+ iter++;
+ }
+
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL, ret, "DB_TXN->commit");
+
+ *countp = count;
+ *iterp = iter;
+ } catch (DbException &dbe) {
+ cerr << "bulkDelete " << dbe.what() << endl;
+ if (txnp != NULL)
+ (void)txnp->abort();
+ throw dbe;
+ }
+}
+
+/* Bulk delete from a secondary db. */
+void BulkExample::bulkSecondaryDelete(
+ int num, int pair, int *countp, int *iterp, int verbose)
+{
+ Dbt key;
+ DbTxn *txnp;
+ DbMultipleDataBuilder *ptrd;
+ DbMultipleKeyDataBuilder *ptrkd;
+ u_int32_t flag;
+ int count, i, iter, j, k, rc, ret;
+ char ch;
+
+ memset(&key, 0, sizeof(Dbt));
+ txnp = NULL;
+ count = flag = iter = ret = 0;
+ rc = rand() % (STRLEN - 1);
+
+ /*
+ * The buffer must be at least as large as the page size of the
+ * underlying database and aligned for unsigned integer access.
+ * Its size must be a multiple of 1024 bytes.
+ */
+ if (klen != (u_int32_t)UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024) {
+ klen = (u_int32_t)UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024;
+ kbuf = realloc(kbuf, klen);
+ }
+ memset(kbuf, 0, klen);
+ key.set_ulen(klen);
+ key.set_flags(DB_DBT_USERMEM | DB_DBT_BULK);
+ key.set_data(kbuf);
+
+ /*
+ * Bulk delete all records of a specific set of keys which includes all
+ * characters before the random key in the tstring. The random key is
+ * one of the characters in the tstring.
+ * If DB_MULTIPLE, construct the key Dbt by the DbMultipleDataBuilder
+ * with the specific set of keys. If DB_MULTIPLE_KEY, construct the key
+ * Dbt by the DbMultipleKeyDataBuilder with all key/data pairs of the
+ * specific set of keys.
+ */
+ flag |= (pair) ? DB_MULTIPLE_KEY : DB_MULTIPLE;
+ if (pair)
+ ptrkd = new DbMultipleKeyDataBuilder(key);
+ else
+ ptrd = new DbMultipleDataBuilder(key);
+ try {
+ for (i = 0; i <= rc; i++) {
+ if (i % UPDATES_PER_BULK_PUT == 0) {
+ if (txnp != NULL) {
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_TXN->commit");
+ }
+ if ((ret = dbenv->txn_begin(NULL,
+ &txnp, 0)) != 0)
+ throwException(dbenv,
+ NULL, ret, "DB_ENV->txn_begin");
+ }
+
+ ch = tstring[i];
+ if (!pair) {
+ if (ptrd->append(&ch, sizeof(ch)) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+ "DbMultipleDataBuilder->append");
+ count++;
+ if (verbose)
+ printf("Delete key: %c\n", ch);
+ } else {
+ j = 0;
+ do {
+ k = j * (STRLEN - 1) + i;
+ if (ptrkd->append(&ch, sizeof(ch),
+ &k, sizeof(k)) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+"DbMultipleKeyDataBuilder->append");
+ count++;
+ if (verbose)
+ printf(
+"Delete secondary key: %c, \tdata: %d\n",
+ ch, k);
+ } while (++j < (int)(num / (STRLEN - 1)));
+ }
+
+ if ((i + 1) % UPDATES_PER_BULK_PUT == 0) {
+ if ((ret = sdbp->del(txnp, &key, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->del");
+ iter++;
+ if (pair)
+ ptrkd = new
+ DbMultipleKeyDataBuilder(key);
+ else
+ ptrd = new DbMultipleDataBuilder(key);
+ }
+ }
+ if ((rc % UPDATES_PER_BULK_PUT) != 0) {
+ if ((ret = sdbp->del(txnp, &key, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->del");
+ iter++;
+ }
+
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL, ret, "DB_TXN->commit");
+
+ *countp = count;
+ *iterp = iter;
+ } catch (DbException &dbe) {
+ cerr << "bulkSecondaryDelete " << dbe.what() << endl;
+ if (txnp != NULL)
+ (void)txnp->abort();
+ throw dbe;
+ }
+}
+
+/* Bulk fill a database. */
+void BulkExample::bulkUpdate(
+ int num, int dups, int *countp, int *iterp, int verbose)
+{
+ Dbt key, data;
+ u_int32_t flag;
+ DbTxn *txnp;
+ int count, i, iter, ret;
+ DbMultipleDataBuilder *ptrd, *ptrk;
+ DbMultipleKeyDataBuilder *ptrkd;
+
+ txnp = NULL;
+ count = flag = iter = ret = 0;
+ ptrk = ptrd = NULL;
+ if (data_val == NULL)
+ data_val = (struct data *)malloc(DATALEN);
+ memset(data_val, 0, DATALEN);
+ memset(&key, 0, sizeof(Dbt));
+ memset(&data, 0, sizeof(Dbt));
+
+ /*
+ * The buffer must be at least as large as the page size of
+ * the underlying database and aligned for unsigned integer
+ * access. Its size must be a multiple of 1024 bytes.
+ */
+ if (klen != (u_int32_t) UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024) {
+ klen = (u_int32_t) UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024;
+ kbuf = realloc(kbuf, klen);
+ }
+ memset(kbuf, 0, klen);
+ key.set_ulen(klen);
+ key.set_flags(DB_DBT_USERMEM | DB_DBT_BULK);
+ key.set_data(kbuf);
+
+ if (dlen != (u_int32_t) UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024) {
+ dlen = (u_int32_t) UPDATES_PER_BULK_PUT *
+ (sizeof(u_int32_t) + DATALEN) * 1024;
+ dbuf = realloc(dbuf, dlen);
+ }
+ memset(dbuf, 0, dlen);
+ data.set_ulen(dlen);
+ data.set_flags(DB_DBT_USERMEM | DB_DBT_BULK);
+ data.set_data(dbuf);
+
+ /*
+ * Bulk insert with either DB_MULTIPLE in two buffers or
+ * DB_MULTIPLE_KEY in a single buffer. With DB_MULTIPLE, all keys are
+ * constructed in the key Dbt, and all data is constructed in the data
+ * Dbt. With DB_MULTIPLE_KEY, all key/data pairs are constructed in the
+ * key Dbt. We use DB_MULTIPLE mode when there are duplicate records.
+ */
+ flag |= (dups) ? DB_MULTIPLE : DB_MULTIPLE_KEY;
+ if (dups) {
+ ptrk = new DbMultipleDataBuilder(key);
+ ptrd = new DbMultipleDataBuilder(data);
+ } else
+ ptrkd = new DbMultipleKeyDataBuilder(key);
+
+ try {
+ for (i = 0; i < num; i++) {
+ if (i % UPDATES_PER_BULK_PUT == 0) {
+ if (txnp != NULL) {
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_TXN->commit");
+ }
+ if ((ret = dbenv->txn_begin(NULL,
+ &txnp, 0)) != 0)
+ throwException(dbenv,
+ NULL, ret, "DB_ENV->txn_begin");
+ }
+ data_val->id = 0;
+ get_string(tstring, data_val->str, i);
+ do {
+ if (dups) {
+ if (ptrk->append(&i,
+ sizeof(i)) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+"DbMultipleDataBuilder->append");
+ if (ptrd->append(data_val,
+ DATALEN) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+"DbMultipleDataBuilder->append");
+ } else {
+ if (ptrkd->append(&i, sizeof(i),
+ data_val, DATALEN) == false)
+ throwException(dbenv,
+ txnp, EXIT_FAILURE,
+"DbMultipleKeyDataBuilder->append");
+ }
+ if (verbose)
+ printf(
+"Insert key: %d, \t data: (id %d, str %s)\n",
+ i, data_val->id, data_val->str);
+ count++;
+ } while (data_val->id++ < dups);
+ if ((i + 1) % UPDATES_PER_BULK_PUT == 0) {
+ if ((ret = dbp->put(txnp,
+ &key, &data, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->put");
+ iter++;
+ if (dups) {
+ ptrk = new DbMultipleDataBuilder(key);
+ ptrd = new DbMultipleDataBuilder(data);
+ } else
+ ptrkd = new
+ DbMultipleKeyDataBuilder(key);
+ }
+ }
+ if ((num % UPDATES_PER_BULK_PUT) != 0) {
+ if ((ret = dbp->put(txnp, &key, &data, flag)) != 0)
+ throwException(dbenv,
+ txnp, ret, "Bulk DB->put");
+ iter++;
+ }
+
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL, ret, "DB_TXN->commit");
+
+ *countp = count;
+ *iterp = iter;
+ } catch (DbException &dbe) {
+ cerr << "bulkUpdate " << dbe.what() << endl;
+ if (txnp != NULL)
+ (void)txnp->abort();
+ throw dbe;
+ }
+}
+
+/* Loop get batches of records. */
+void BulkExample::bulkRead(
+ int num, int dups, int iter, int *countp, int verbose)
+{
+ Dbc *dbcp;
+ Dbt data, dp, key, kp;
+ DbTxn *txnp;
+ DbMultipleDataIterator *ptrd;
+ DbMultipleKeyDataIterator *ptrkd;
+ u_int32_t flags;
+ int count, i, j, ret;
+
+ count = klen = ret = 0;
+ dbcp = NULL;
+ txnp = NULL;
+
+ /* Initialize key Dbt and data Dbt, malloc bulk buffer. */
+ memset(&key, 0, sizeof(key));
+ memset(&data, 0, sizeof(data));
+ key.set_size(sizeof(j));
+ if (dlen != DATALEN * 16 * 1024) {
+ dlen = DATALEN * 16 * 1024;
+ dbuf = realloc(dbuf, dlen);
+ }
+ memset(dbuf, 0, dlen);
+ data.set_flags(DB_DBT_USERMEM);
+ data.set_data(dbuf);
+ data.set_ulen(dlen);
+ data.set_size(dlen);
+
+ flags = DB_SET;
+ flags |= (dups) ? DB_MULTIPLE: DB_MULTIPLE_KEY;
+ try {
+ for (i = 0; i < iter; i++) {
+ if ((ret =
+ dbenv->txn_begin(NULL, &txnp, 0)) != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_ENV->txn_begin");
+ if ((ret = dbp->cursor(txnp, &dbcp, 0)) != 0)
+ throwException(dbenv, txnp,
+ ret, "DB->cursor");
+
+ /*
+ * Bulk retrieve by a random key which is a random
+ * non-negative integer smaller than "num".
+ * If there are duplicates in the database, retrieve
+ * with DB_MULTIPLE and use the DbMultipleDataIterator
+ * to iterate the data of the random key in the data
+ * Dbt. Otherwise retrieve with DB_MULTIPLE_KEY and use
+ * the DbMultipleKeyDataIterator to iterate the
+ * key/data pairs of the specific set of keys which
+ * includes all integers >= the random key and < "num".
+ */
+ j = rand() % num;
+ key.set_data(&j);
+ if ((ret = dbcp->get(&key, &data, flags)) != 0)
+ throwException(dbenv, NULL, ret, "DBC->get");
+
+ if (dups) {
+ ptrd = new DbMultipleDataIterator(data);
+ while (ptrd->next(dp) == true) {
+ count++;
+ if (verbose)
+ printf(
+"Retrieve key: %d, \tdata: (id %d, str %s)\n", j, ((struct data *)(
+ dp.get_data()))->id,
+ (char *)((struct data *)(
+ dp.get_data()))->str);
+ }
+ } else {
+ ptrkd = new DbMultipleKeyDataIterator(data);
+ while (ptrkd->next(kp, dp) == true) {
+ count++;
+ if (verbose)
+ printf(
+"Retrieve key: %d, \tdata: (id %d, str %s)\n", *((int *)kp.get_data()),
+ ((struct data *)(
+ dp.get_data()))->id,
+ (char *)((struct data *)(
+ dp.get_data()))->str);
+ }
+ }
+
+ ret = dbcp->close();
+ dbcp = NULL;
+ if (ret != 0)
+ throwException(dbenv, txnp, ret, "DBC->close");
+
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL,
+ ret, "DB_TXN->commit");
+ }
+
+ *countp = count;
+ } catch (DbException &dbe) {
+ cerr << "bulkRead " << dbe.what() << endl;
+ if (dbcp != NULL)
+ (void)dbcp->close();
+ if (txnp != NULL)
+ (void)txnp->abort();
+ throw dbe;
+ }
+}
+
+/* Initialize the database. */
+void BulkExample::initDb(int dups, int sflag, int pagesize) {
+
+ DbTxn *txnp;
+ int ret;
+
+ txnp = NULL;
+ ret = 0;
+
+ dbp = new Db(dbenv, 0);
+
+ dbp->set_error_stream(&cerr);
+ dbp->set_errpfx(progname);
+
+ try{
+ if ((ret = dbp->set_bt_compare(compare_int)) != 0)
+ throwException(dbenv, NULL, ret, "DB->set_bt_compare");
+
+ if ((ret = dbp->set_pagesize(pagesize)) != 0)
+ throwException(dbenv, NULL, ret, "DB->set_pagesize");
+
+ if (dups && (ret = dbp->set_flags(DB_DUP)) != 0)
+ throwException(dbenv, NULL, ret, "DB->set_flags");
+
+ if ((ret = dbenv->txn_begin(NULL, &txnp, 0)) != 0)
+ throwException(dbenv, NULL, ret, "DB_ENV->txn_begin");
+
+ if ((ret = dbp->open(txnp, DATABASE, "primary", DB_BTREE,
+ DB_CREATE, 0664)) != 0)
+ throwException(dbenv, txnp, ret, "DB->open");
+
+ if (sflag) {
+ sdbp = new Db(dbenv, 0);
+
+ if ((ret = sdbp->set_flags(DB_DUPSORT)) != 0)
+ throwException(dbenv, txnp,
+ ret, "DB->set_flags");
+
+ if ((ret = sdbp->open(txnp, DATABASE, "secondary",
+ DB_BTREE, DB_CREATE, 0664)) != 0)
+ throwException(dbenv, txnp, ret, "DB->open");
+
+ if ((ret = dbp->associate(
+ txnp, sdbp, get_first_str, 0)) != 0)
+ throwException(dbenv, txnp,
+ ret, "DB->associate");
+ }
+
+ ret = txnp->commit(0);
+ txnp = NULL;
+ if (ret != 0)
+ throwException(dbenv, NULL, ret, "DB_TXN->commit");
+ } catch(DbException &dbe) {
+ cerr << "initDb " << dbe.what() << endl;
+ if (txnp != NULL)
+ (void)txnp->abort();
+ throw dbe;
+ }
+}
+
+/* Initialize the environment. */
+void BulkExample::initDbenv(const char *home, u_int32_t cachesize)
+{
+ int ret;
+
+ ret = 0;
+
+ dbenv = new DbEnv(0);
+
+ dbenv->set_error_stream(&cerr);
+ dbenv->set_errpfx(progname);
+
+ try {
+ if ((ret = dbenv->set_cachesize(0, cachesize, 0)) != 0)
+ throwException(dbenv,
+ NULL, ret, "DB_ENV->set_cachesize");
+
+ /* Open the environment with full transactional support. */
+ if ((ret = dbenv->open(home, DB_CREATE | DB_INIT_LOCK |
+ DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN, 0)) != 0)
+ throwException(dbenv, NULL, ret, "DB_ENV->open");
+ } catch (DbException &dbe) {
+ cerr << "initDbenv " << dbe.what() << endl;
+ throw dbe;
+ }
+}
+
+BulkExample::BulkExample() : dbenv(NULL), dbp(NULL), sdbp(NULL),
+ data_val(NULL), dbuf(NULL), kbuf(NULL), dlen(0), klen(0) {}
+
+BulkExample::~BulkExample()
+{
+ if (sdbp != NULL) {
+ sdbp->close(0);
+ delete sdbp;
+ }
+ if (dbp != NULL) {
+ dbp->close(0);
+ delete dbp;
+ }
+ if (dbenv != NULL) {
+ dbenv->close(0);
+ delete dbenv;
+ }
+ if (dbuf != NULL)
+ free(dbuf);
+ if (kbuf != NULL)
+ free(kbuf);
+ if (data_val != NULL)
+ free(data_val);
+}
+
+int
+compare_int(Db *dbp, const Dbt *a, const Dbt *b, size_t *locp)
+{
+ int ai, bi;
+
+ locp = NULL;
+ /*
+ * Returns:
+ * < 0 if a < b
+ * = 0 if a = b
+ * > 0 if a > b
+ */
+ memcpy(&ai, a->get_data(), sizeof(int));
+ memcpy(&bi, b->get_data(), sizeof(int));
+ return (ai - bi);
+}
+
+int
+get_first_str(Db *sdbp, const Dbt *key, const Dbt *data, Dbt *skey)
+{
+ memset(skey, 0, sizeof(Dbt));
+ skey->set_data(((struct data *)(data->get_data()))->str);
+ skey->set_size(sizeof(char));
+ return (0);
+}
+
+int
+get_string(const char *src, char *des, int off)
+{
+ int i;
+
+ for (i = 0; i < (int)(STRLEN - 1); i++)
+ des[i] = src[(off + i) % (STRLEN - 1)];
+ des[STRLEN - 1] = '\0';
+ return (0);
+}
+
+static void
+usage()
+{
+ cerr << "Usage: BulkExample \n"
+ << "-c cachesize [1000 * pagesize] \n"
+ << "-D perform bulk delete \n"
+ << "-d number of duplicates [none] \n"
+ << "-I just initialize the environment \n"
+ << "-i number of read iterations [1000000] \n"
+ << "-n number of keys [1000000] \n"
+ << "-p pagesize [65536] \n"
+ << "-R perform bulk read \n"
+ << "-S perform bulk operation in secondary database \n"
+ << "-v verbose output \n";
+ exit(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+ /*
+ * Use a try block just to report any errors.
+ * An alternate approach to using exceptions is to
+ * use error models (see DbEnv::set_error_model()) so
+ * that error codes are returned for all Berkeley DB methods.
+ */
+ try {
+ BulkExample app;
+ app.run(argc, argv);
+ return (EXIT_SUCCESS);
+ } catch (DbException &dbe) {
+ cerr << "BulkExample: " << dbe.what() << endl;
+ return (EXIT_FAILURE);
+ }
+}
diff --git a/examples/cxx/EnvExample.cpp b/examples/cxx/EnvExample.cpp
index 4cece0af..bf8a9dd7 100644
--- a/examples/cxx/EnvExample.cpp
+++ b/examples/cxx/EnvExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -82,6 +82,8 @@ main(int argc, char *argv[])
void
db_setup(const char *home, const char *data_dir, ostream& err_stream)
{
+ const char * err1 = "DbEnv::open: No such file or directory";
+ const char * err2 = "Db::open: No such file or directory";
//
// Create an environment object and initialize it for error
// reporting.
@@ -100,9 +102,19 @@ db_setup(const char *home, const char *data_dir, ostream& err_stream)
(void)dbenv->set_data_dir(data_dir);
// Open the environment with full transactional support.
- dbenv->open(home,
- DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
- DB_INIT_TXN, 0);
+ try {
+ dbenv->open(home,
+ DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
+ DB_INIT_TXN, 0);
+ }
+ catch (DbException &dbe) {
+ cerr << "EnvExample: " << dbe.what() << "\n";
+ if (!strcmp(dbe.what(), err1)){
+ cout << "Please check whether "
+ << "home dir \"" << home << "\" exists.\n";
+ }
+ exit (-1);
+ }
// Open a database in the environment to verify the data_dir
// has been set correctly.
@@ -110,7 +122,18 @@ db_setup(const char *home, const char *data_dir, ostream& err_stream)
Db *db = new Db(dbenv, 0) ;
// Open the database.
- db->open(NULL, "EvnExample_db1.db", NULL, DB_BTREE, DB_CREATE, 0644);
+ try {
+ db->open(NULL, "EvnExample_db1.db",
+ NULL, DB_BTREE, DB_CREATE, 0644);
+ }
+ catch (DbException &dbe) {
+ cerr << "EnvExample: " << dbe.what() << "\n";
+ if (!strcmp(dbe.what(), err2)){
+ cout << "Please check whether data dir \"" << data_dir
+ << "\" exists under \"" << home << "\"\n";
+ }
+ exit (-1);
+ }
// Close the database handle.
db->close(0) ;
diff --git a/examples/cxx/LockExample.cpp b/examples/cxx/LockExample.cpp
index 3aa8c362..62f92add 100644
--- a/examples/cxx/LockExample.cpp
+++ b/examples/cxx/LockExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/MpoolExample.cpp b/examples/cxx/MpoolExample.cpp
index 1b4133bd..8170d634 100644
--- a/examples/cxx/MpoolExample.cpp
+++ b/examples/cxx/MpoolExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/SequenceExample.cpp b/examples/cxx/SequenceExample.cpp
index d1347a59..e0a89216 100644
--- a/examples/cxx/SequenceExample.cpp
+++ b/examples/cxx/SequenceExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/TpcbExample.cpp b/examples/cxx/TpcbExample.cpp
index ba4b135b..860749e4 100644
--- a/examples/cxx/TpcbExample.cpp
+++ b/examples/cxx/TpcbExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote/RepConfigInfo.cpp b/examples/cxx/excxx_repquote/RepConfigInfo.cpp
index 867226f6..4d6fb7fe 100644
--- a/examples/cxx/excxx_repquote/RepConfigInfo.cpp
+++ b/examples/cxx/excxx_repquote/RepConfigInfo.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote/RepConfigInfo.h b/examples/cxx/excxx_repquote/RepConfigInfo.h
index 2d3a25da..38f69181 100644
--- a/examples/cxx/excxx_repquote/RepConfigInfo.h
+++ b/examples/cxx/excxx_repquote/RepConfigInfo.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote/RepQuoteExample.cpp b/examples/cxx/excxx_repquote/RepQuoteExample.cpp
index 1f4b2d2b..68f3b1cb 100644
--- a/examples/cxx/excxx_repquote/RepQuoteExample.cpp
+++ b/examples/cxx/excxx_repquote/RepQuoteExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote/dbc_auto.h b/examples/cxx/excxx_repquote/dbc_auto.h
index 3672d252..144cb3c7 100644
--- a/examples/cxx/excxx_repquote/dbc_auto.h
+++ b/examples/cxx/excxx_repquote/dbc_auto.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote_gsg/RepConfigInfo.h b/examples/cxx/excxx_repquote_gsg/RepConfigInfo.h
index 06b5015b..b1938028 100644
--- a/examples/cxx/excxx_repquote_gsg/RepConfigInfo.h
+++ b/examples/cxx/excxx_repquote_gsg/RepConfigInfo.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote_gsg/RepMgrGSG.cpp b/examples/cxx/excxx_repquote_gsg/RepMgrGSG.cpp
index 43a6e6ea..0f0a09ba 100644
--- a/examples/cxx/excxx_repquote_gsg/RepMgrGSG.cpp
+++ b/examples/cxx/excxx_repquote_gsg/RepMgrGSG.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote_gsg/SimpleConfigInfo.h b/examples/cxx/excxx_repquote_gsg/SimpleConfigInfo.h
index e04bf5b1..fa46b63d 100644
--- a/examples/cxx/excxx_repquote_gsg/SimpleConfigInfo.h
+++ b/examples/cxx/excxx_repquote_gsg/SimpleConfigInfo.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/excxx_repquote_gsg/SimpleTxn.cpp b/examples/cxx/excxx_repquote_gsg/SimpleTxn.cpp
index a44c91b5..15fa6507 100644
--- a/examples/cxx/excxx_repquote_gsg/SimpleTxn.cpp
+++ b/examples/cxx/excxx_repquote_gsg/SimpleTxn.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/getting_started/MyDb.cpp b/examples/cxx/getting_started/MyDb.cpp
index a1ced76f..674b6d36 100644
--- a/examples/cxx/getting_started/MyDb.cpp
+++ b/examples/cxx/getting_started/MyDb.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/getting_started/MyDb.hpp b/examples/cxx/getting_started/MyDb.hpp
index 3ca72231..66f0725b 100644
--- a/examples/cxx/getting_started/MyDb.hpp
+++ b/examples/cxx/getting_started/MyDb.hpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/getting_started/excxx_example_database_load.cpp b/examples/cxx/getting_started/excxx_example_database_load.cpp
index 2a66c575..d1610819 100644
--- a/examples/cxx/getting_started/excxx_example_database_load.cpp
+++ b/examples/cxx/getting_started/excxx_example_database_load.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/getting_started/excxx_example_database_read.cpp b/examples/cxx/getting_started/excxx_example_database_read.cpp
index 9ac26b12..f443116a 100644
--- a/examples/cxx/getting_started/excxx_example_database_read.cpp
+++ b/examples/cxx/getting_started/excxx_example_database_read.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/getting_started/gettingStartedCommon.hpp b/examples/cxx/getting_started/gettingStartedCommon.hpp
index be9ea4e5..fc22aaf9 100644
--- a/examples/cxx/getting_started/gettingStartedCommon.hpp
+++ b/examples/cxx/getting_started/gettingStartedCommon.hpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/txn_guide/TxnGuide.cpp b/examples/cxx/txn_guide/TxnGuide.cpp
index 580b2c94..9a33a922 100644
--- a/examples/cxx/txn_guide/TxnGuide.cpp
+++ b/examples/cxx/txn_guide/TxnGuide.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/txn_guide/TxnGuideInMemory.cpp b/examples/cxx/txn_guide/TxnGuideInMemory.cpp
index e10fd474..000f0f92 100644
--- a/examples/cxx/txn_guide/TxnGuideInMemory.cpp
+++ b/examples/cxx/txn_guide/TxnGuideInMemory.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/wce_tpcb/TpcbExample.cpp b/examples/cxx/wce_tpcb/TpcbExample.cpp
index 2c746d99..76114861 100644
--- a/examples/cxx/wce_tpcb/TpcbExample.cpp
+++ b/examples/cxx/wce_tpcb/TpcbExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/wce_tpcb/TpcbExample.h b/examples/cxx/wce_tpcb/TpcbExample.h
index cee4518d..c671059a 100644
--- a/examples/cxx/wce_tpcb/TpcbExample.h
+++ b/examples/cxx/wce_tpcb/TpcbExample.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/wce_tpcb/TpcbUI.cpp b/examples/cxx/wce_tpcb/TpcbUI.cpp
index 9a43d1e0..e023a18f 100644
--- a/examples/cxx/wce_tpcb/TpcbUI.cpp
+++ b/examples/cxx/wce_tpcb/TpcbUI.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/wce_tpcb/newres.h b/examples/cxx/wce_tpcb/newres.h
index 7e6af18a..522c7763 100644
--- a/examples/cxx/wce_tpcb/newres.h
+++ b/examples/cxx/wce_tpcb/newres.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/cxx/wce_tpcb/resource.h b/examples/cxx/wce_tpcb/resource.h
index b8b0cd7b..fa5fb16b 100644
--- a/examples/cxx/wce_tpcb/resource.h
+++ b/examples/cxx/wce_tpcb/resource.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/access/AccessExample.java b/examples/java/src/collections/access/AccessExample.java
index 8131ef89..47076477 100644
--- a/examples/java/src/collections/access/AccessExample.java
+++ b/examples/java/src/collections/access/AccessExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/hello/HelloDatabaseWorld.java b/examples/java/src/collections/hello/HelloDatabaseWorld.java
index c64285cb..059f58e2 100644
--- a/examples/java/src/collections/hello/HelloDatabaseWorld.java
+++ b/examples/java/src/collections/hello/HelloDatabaseWorld.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/PartData.java b/examples/java/src/collections/ship/basic/PartData.java
index 0ba0d106..197986d9 100644
--- a/examples/java/src/collections/ship/basic/PartData.java
+++ b/examples/java/src/collections/ship/basic/PartData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/PartKey.java b/examples/java/src/collections/ship/basic/PartKey.java
index 1aeb3383..55ed06bd 100644
--- a/examples/java/src/collections/ship/basic/PartKey.java
+++ b/examples/java/src/collections/ship/basic/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/Sample.java b/examples/java/src/collections/ship/basic/Sample.java
index 9ff4db7e..1cd9a389 100644
--- a/examples/java/src/collections/ship/basic/Sample.java
+++ b/examples/java/src/collections/ship/basic/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/SampleDatabase.java b/examples/java/src/collections/ship/basic/SampleDatabase.java
index cfbb33b7..2d02dc8d 100644
--- a/examples/java/src/collections/ship/basic/SampleDatabase.java
+++ b/examples/java/src/collections/ship/basic/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/SampleViews.java b/examples/java/src/collections/ship/basic/SampleViews.java
index 5f89935b..6220e5e1 100644
--- a/examples/java/src/collections/ship/basic/SampleViews.java
+++ b/examples/java/src/collections/ship/basic/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/ShipmentData.java b/examples/java/src/collections/ship/basic/ShipmentData.java
index 164b8271..42d2e0a4 100644
--- a/examples/java/src/collections/ship/basic/ShipmentData.java
+++ b/examples/java/src/collections/ship/basic/ShipmentData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/ShipmentKey.java b/examples/java/src/collections/ship/basic/ShipmentKey.java
index 8cf29a4c..495e3619 100644
--- a/examples/java/src/collections/ship/basic/ShipmentKey.java
+++ b/examples/java/src/collections/ship/basic/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/SupplierData.java b/examples/java/src/collections/ship/basic/SupplierData.java
index 844d9258..105d27ba 100644
--- a/examples/java/src/collections/ship/basic/SupplierData.java
+++ b/examples/java/src/collections/ship/basic/SupplierData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/SupplierKey.java b/examples/java/src/collections/ship/basic/SupplierKey.java
index 0fa4d66b..cb52c663 100644
--- a/examples/java/src/collections/ship/basic/SupplierKey.java
+++ b/examples/java/src/collections/ship/basic/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/basic/Weight.java b/examples/java/src/collections/ship/basic/Weight.java
index c2e612e8..5a290274 100644
--- a/examples/java/src/collections/ship/basic/Weight.java
+++ b/examples/java/src/collections/ship/basic/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/Part.java b/examples/java/src/collections/ship/entity/Part.java
index 4bf98b6c..8a99d0ed 100644
--- a/examples/java/src/collections/ship/entity/Part.java
+++ b/examples/java/src/collections/ship/entity/Part.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/PartData.java b/examples/java/src/collections/ship/entity/PartData.java
index b33e4eba..de1c8dd7 100644
--- a/examples/java/src/collections/ship/entity/PartData.java
+++ b/examples/java/src/collections/ship/entity/PartData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/PartKey.java b/examples/java/src/collections/ship/entity/PartKey.java
index 4d79a8dc..a1f5a53f 100644
--- a/examples/java/src/collections/ship/entity/PartKey.java
+++ b/examples/java/src/collections/ship/entity/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/Sample.java b/examples/java/src/collections/ship/entity/Sample.java
index c3aa230c..429f9a71 100644
--- a/examples/java/src/collections/ship/entity/Sample.java
+++ b/examples/java/src/collections/ship/entity/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/SampleDatabase.java b/examples/java/src/collections/ship/entity/SampleDatabase.java
index c138ef7b..1fcd3efa 100644
--- a/examples/java/src/collections/ship/entity/SampleDatabase.java
+++ b/examples/java/src/collections/ship/entity/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/SampleViews.java b/examples/java/src/collections/ship/entity/SampleViews.java
index 3cf605ac..4344dc86 100644
--- a/examples/java/src/collections/ship/entity/SampleViews.java
+++ b/examples/java/src/collections/ship/entity/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/Shipment.java b/examples/java/src/collections/ship/entity/Shipment.java
index 23283c59..08e6d880 100644
--- a/examples/java/src/collections/ship/entity/Shipment.java
+++ b/examples/java/src/collections/ship/entity/Shipment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/ShipmentData.java b/examples/java/src/collections/ship/entity/ShipmentData.java
index 82cd9a3c..cc560604 100644
--- a/examples/java/src/collections/ship/entity/ShipmentData.java
+++ b/examples/java/src/collections/ship/entity/ShipmentData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/ShipmentKey.java b/examples/java/src/collections/ship/entity/ShipmentKey.java
index 541f8464..c6ab169b 100644
--- a/examples/java/src/collections/ship/entity/ShipmentKey.java
+++ b/examples/java/src/collections/ship/entity/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/Supplier.java b/examples/java/src/collections/ship/entity/Supplier.java
index 3ed6ef5d..27508a55 100644
--- a/examples/java/src/collections/ship/entity/Supplier.java
+++ b/examples/java/src/collections/ship/entity/Supplier.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/SupplierData.java b/examples/java/src/collections/ship/entity/SupplierData.java
index 0bed0ad6..363a2eee 100644
--- a/examples/java/src/collections/ship/entity/SupplierData.java
+++ b/examples/java/src/collections/ship/entity/SupplierData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/SupplierKey.java b/examples/java/src/collections/ship/entity/SupplierKey.java
index 15c2dd08..a7af271e 100644
--- a/examples/java/src/collections/ship/entity/SupplierKey.java
+++ b/examples/java/src/collections/ship/entity/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/entity/Weight.java b/examples/java/src/collections/ship/entity/Weight.java
index 8404c1aa..60bbe9a3 100644
--- a/examples/java/src/collections/ship/entity/Weight.java
+++ b/examples/java/src/collections/ship/entity/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/Part.java b/examples/java/src/collections/ship/factory/Part.java
index 9d6e34e6..cb785aa9 100644
--- a/examples/java/src/collections/ship/factory/Part.java
+++ b/examples/java/src/collections/ship/factory/Part.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/PartKey.java b/examples/java/src/collections/ship/factory/PartKey.java
index 3dde817b..5391099d 100644
--- a/examples/java/src/collections/ship/factory/PartKey.java
+++ b/examples/java/src/collections/ship/factory/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/Sample.java b/examples/java/src/collections/ship/factory/Sample.java
index 06653d79..0519dd94 100644
--- a/examples/java/src/collections/ship/factory/Sample.java
+++ b/examples/java/src/collections/ship/factory/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/SampleDatabase.java b/examples/java/src/collections/ship/factory/SampleDatabase.java
index 8aab5d90..fa803913 100644
--- a/examples/java/src/collections/ship/factory/SampleDatabase.java
+++ b/examples/java/src/collections/ship/factory/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/SampleViews.java b/examples/java/src/collections/ship/factory/SampleViews.java
index 7c380611..90df08f5 100644
--- a/examples/java/src/collections/ship/factory/SampleViews.java
+++ b/examples/java/src/collections/ship/factory/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/Shipment.java b/examples/java/src/collections/ship/factory/Shipment.java
index 10da5087..38a4f7e2 100644
--- a/examples/java/src/collections/ship/factory/Shipment.java
+++ b/examples/java/src/collections/ship/factory/Shipment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/ShipmentKey.java b/examples/java/src/collections/ship/factory/ShipmentKey.java
index b2d532aa..2ef31f20 100644
--- a/examples/java/src/collections/ship/factory/ShipmentKey.java
+++ b/examples/java/src/collections/ship/factory/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/Supplier.java b/examples/java/src/collections/ship/factory/Supplier.java
index b429f7f2..317620ac 100644
--- a/examples/java/src/collections/ship/factory/Supplier.java
+++ b/examples/java/src/collections/ship/factory/Supplier.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/SupplierKey.java b/examples/java/src/collections/ship/factory/SupplierKey.java
index 0c7ab107..43b7886b 100644
--- a/examples/java/src/collections/ship/factory/SupplierKey.java
+++ b/examples/java/src/collections/ship/factory/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/factory/Weight.java b/examples/java/src/collections/ship/factory/Weight.java
index 3740d5ee..be467b0b 100644
--- a/examples/java/src/collections/ship/factory/Weight.java
+++ b/examples/java/src/collections/ship/factory/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/PartData.java b/examples/java/src/collections/ship/index/PartData.java
index 6be3f216..ba8d38c5 100644
--- a/examples/java/src/collections/ship/index/PartData.java
+++ b/examples/java/src/collections/ship/index/PartData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/PartKey.java b/examples/java/src/collections/ship/index/PartKey.java
index 0b394bb6..09a36d6f 100644
--- a/examples/java/src/collections/ship/index/PartKey.java
+++ b/examples/java/src/collections/ship/index/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/Sample.java b/examples/java/src/collections/ship/index/Sample.java
index 631dbcf1..41ca2c65 100644
--- a/examples/java/src/collections/ship/index/Sample.java
+++ b/examples/java/src/collections/ship/index/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/SampleDatabase.java b/examples/java/src/collections/ship/index/SampleDatabase.java
index c02789ef..ee8f80cf 100644
--- a/examples/java/src/collections/ship/index/SampleDatabase.java
+++ b/examples/java/src/collections/ship/index/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/SampleViews.java b/examples/java/src/collections/ship/index/SampleViews.java
index 2c8bb0aa..9085c1c1 100644
--- a/examples/java/src/collections/ship/index/SampleViews.java
+++ b/examples/java/src/collections/ship/index/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/ShipmentData.java b/examples/java/src/collections/ship/index/ShipmentData.java
index be1e8e4e..f533b7cf 100644
--- a/examples/java/src/collections/ship/index/ShipmentData.java
+++ b/examples/java/src/collections/ship/index/ShipmentData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/ShipmentKey.java b/examples/java/src/collections/ship/index/ShipmentKey.java
index fd92bda1..7756dd86 100644
--- a/examples/java/src/collections/ship/index/ShipmentKey.java
+++ b/examples/java/src/collections/ship/index/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/SupplierData.java b/examples/java/src/collections/ship/index/SupplierData.java
index 3995d5db..01951234 100644
--- a/examples/java/src/collections/ship/index/SupplierData.java
+++ b/examples/java/src/collections/ship/index/SupplierData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/SupplierKey.java b/examples/java/src/collections/ship/index/SupplierKey.java
index b1eff71c..a3fb2378 100644
--- a/examples/java/src/collections/ship/index/SupplierKey.java
+++ b/examples/java/src/collections/ship/index/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/index/Weight.java b/examples/java/src/collections/ship/index/Weight.java
index 783057fc..c67edf8c 100644
--- a/examples/java/src/collections/ship/index/Weight.java
+++ b/examples/java/src/collections/ship/index/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/MarshalledEnt.java b/examples/java/src/collections/ship/marshal/MarshalledEnt.java
index 9e269962..2ca95362 100644
--- a/examples/java/src/collections/ship/marshal/MarshalledEnt.java
+++ b/examples/java/src/collections/ship/marshal/MarshalledEnt.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/MarshalledKey.java b/examples/java/src/collections/ship/marshal/MarshalledKey.java
index 0ee3ebf7..8fd9e994 100644
--- a/examples/java/src/collections/ship/marshal/MarshalledKey.java
+++ b/examples/java/src/collections/ship/marshal/MarshalledKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/Part.java b/examples/java/src/collections/ship/marshal/Part.java
index 6f543b06..8d807a03 100644
--- a/examples/java/src/collections/ship/marshal/Part.java
+++ b/examples/java/src/collections/ship/marshal/Part.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/PartKey.java b/examples/java/src/collections/ship/marshal/PartKey.java
index b1841e9a..d5567597 100644
--- a/examples/java/src/collections/ship/marshal/PartKey.java
+++ b/examples/java/src/collections/ship/marshal/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/Sample.java b/examples/java/src/collections/ship/marshal/Sample.java
index 0183f930..023ee7f3 100644
--- a/examples/java/src/collections/ship/marshal/Sample.java
+++ b/examples/java/src/collections/ship/marshal/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/SampleDatabase.java b/examples/java/src/collections/ship/marshal/SampleDatabase.java
index a1bab0d1..540fa980 100644
--- a/examples/java/src/collections/ship/marshal/SampleDatabase.java
+++ b/examples/java/src/collections/ship/marshal/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/SampleViews.java b/examples/java/src/collections/ship/marshal/SampleViews.java
index 3ab519d0..2f65aa55 100644
--- a/examples/java/src/collections/ship/marshal/SampleViews.java
+++ b/examples/java/src/collections/ship/marshal/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/Shipment.java b/examples/java/src/collections/ship/marshal/Shipment.java
index 6370f0f2..c6015c54 100644
--- a/examples/java/src/collections/ship/marshal/Shipment.java
+++ b/examples/java/src/collections/ship/marshal/Shipment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/ShipmentKey.java b/examples/java/src/collections/ship/marshal/ShipmentKey.java
index d0bff32c..eb83288a 100644
--- a/examples/java/src/collections/ship/marshal/ShipmentKey.java
+++ b/examples/java/src/collections/ship/marshal/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/Supplier.java b/examples/java/src/collections/ship/marshal/Supplier.java
index f903fce9..21f8d3e3 100644
--- a/examples/java/src/collections/ship/marshal/Supplier.java
+++ b/examples/java/src/collections/ship/marshal/Supplier.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/SupplierKey.java b/examples/java/src/collections/ship/marshal/SupplierKey.java
index 4e776f44..7c9c4fb9 100644
--- a/examples/java/src/collections/ship/marshal/SupplierKey.java
+++ b/examples/java/src/collections/ship/marshal/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/marshal/Weight.java b/examples/java/src/collections/ship/marshal/Weight.java
index 6323201b..e5b377c3 100644
--- a/examples/java/src/collections/ship/marshal/Weight.java
+++ b/examples/java/src/collections/ship/marshal/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/Part.java b/examples/java/src/collections/ship/sentity/Part.java
index 4c5394ac..da4f1446 100644
--- a/examples/java/src/collections/ship/sentity/Part.java
+++ b/examples/java/src/collections/ship/sentity/Part.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/PartKey.java b/examples/java/src/collections/ship/sentity/PartKey.java
index c85fe0e0..09524953 100644
--- a/examples/java/src/collections/ship/sentity/PartKey.java
+++ b/examples/java/src/collections/ship/sentity/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/Sample.java b/examples/java/src/collections/ship/sentity/Sample.java
index 777c729d..e9f19ab1 100644
--- a/examples/java/src/collections/ship/sentity/Sample.java
+++ b/examples/java/src/collections/ship/sentity/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/SampleDatabase.java b/examples/java/src/collections/ship/sentity/SampleDatabase.java
index 6b5513f1..8b0b4afa 100644
--- a/examples/java/src/collections/ship/sentity/SampleDatabase.java
+++ b/examples/java/src/collections/ship/sentity/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/SampleViews.java b/examples/java/src/collections/ship/sentity/SampleViews.java
index a1dc52b4..04dcb672 100644
--- a/examples/java/src/collections/ship/sentity/SampleViews.java
+++ b/examples/java/src/collections/ship/sentity/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/Shipment.java b/examples/java/src/collections/ship/sentity/Shipment.java
index 9b79428a..6c943d3d 100644
--- a/examples/java/src/collections/ship/sentity/Shipment.java
+++ b/examples/java/src/collections/ship/sentity/Shipment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/ShipmentKey.java b/examples/java/src/collections/ship/sentity/ShipmentKey.java
index 2f3a9ad0..c599e1f2 100644
--- a/examples/java/src/collections/ship/sentity/ShipmentKey.java
+++ b/examples/java/src/collections/ship/sentity/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/Supplier.java b/examples/java/src/collections/ship/sentity/Supplier.java
index fbc9ff71..bd3d862b 100644
--- a/examples/java/src/collections/ship/sentity/Supplier.java
+++ b/examples/java/src/collections/ship/sentity/Supplier.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/SupplierKey.java b/examples/java/src/collections/ship/sentity/SupplierKey.java
index a4553743..48fd9d6a 100644
--- a/examples/java/src/collections/ship/sentity/SupplierKey.java
+++ b/examples/java/src/collections/ship/sentity/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/sentity/Weight.java b/examples/java/src/collections/ship/sentity/Weight.java
index 990c8701..5b7f2760 100644
--- a/examples/java/src/collections/ship/sentity/Weight.java
+++ b/examples/java/src/collections/ship/sentity/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/Part.java b/examples/java/src/collections/ship/tuple/Part.java
index 16607ffa..bc4a9c28 100644
--- a/examples/java/src/collections/ship/tuple/Part.java
+++ b/examples/java/src/collections/ship/tuple/Part.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/PartData.java b/examples/java/src/collections/ship/tuple/PartData.java
index 132e2671..f3265537 100644
--- a/examples/java/src/collections/ship/tuple/PartData.java
+++ b/examples/java/src/collections/ship/tuple/PartData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/PartKey.java b/examples/java/src/collections/ship/tuple/PartKey.java
index d14ea15d..935040e8 100644
--- a/examples/java/src/collections/ship/tuple/PartKey.java
+++ b/examples/java/src/collections/ship/tuple/PartKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/Sample.java b/examples/java/src/collections/ship/tuple/Sample.java
index 3e20b92b..f2dec0aa 100644
--- a/examples/java/src/collections/ship/tuple/Sample.java
+++ b/examples/java/src/collections/ship/tuple/Sample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/SampleDatabase.java b/examples/java/src/collections/ship/tuple/SampleDatabase.java
index f7d4a83d..06cbe585 100644
--- a/examples/java/src/collections/ship/tuple/SampleDatabase.java
+++ b/examples/java/src/collections/ship/tuple/SampleDatabase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/SampleViews.java b/examples/java/src/collections/ship/tuple/SampleViews.java
index a43b785a..f7ba2cff 100644
--- a/examples/java/src/collections/ship/tuple/SampleViews.java
+++ b/examples/java/src/collections/ship/tuple/SampleViews.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/Shipment.java b/examples/java/src/collections/ship/tuple/Shipment.java
index b8bcda96..d41ec25f 100644
--- a/examples/java/src/collections/ship/tuple/Shipment.java
+++ b/examples/java/src/collections/ship/tuple/Shipment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/ShipmentData.java b/examples/java/src/collections/ship/tuple/ShipmentData.java
index 06aaaa7f..4f04dd7f 100644
--- a/examples/java/src/collections/ship/tuple/ShipmentData.java
+++ b/examples/java/src/collections/ship/tuple/ShipmentData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/ShipmentKey.java b/examples/java/src/collections/ship/tuple/ShipmentKey.java
index 462b8748..41d76a2a 100644
--- a/examples/java/src/collections/ship/tuple/ShipmentKey.java
+++ b/examples/java/src/collections/ship/tuple/ShipmentKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/Supplier.java b/examples/java/src/collections/ship/tuple/Supplier.java
index 54c40407..d8bb17e7 100644
--- a/examples/java/src/collections/ship/tuple/Supplier.java
+++ b/examples/java/src/collections/ship/tuple/Supplier.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/SupplierData.java b/examples/java/src/collections/ship/tuple/SupplierData.java
index 0667d273..f114016b 100644
--- a/examples/java/src/collections/ship/tuple/SupplierData.java
+++ b/examples/java/src/collections/ship/tuple/SupplierData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/SupplierKey.java b/examples/java/src/collections/ship/tuple/SupplierKey.java
index 3dccc0c2..f069abd8 100644
--- a/examples/java/src/collections/ship/tuple/SupplierKey.java
+++ b/examples/java/src/collections/ship/tuple/SupplierKey.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/collections/ship/tuple/Weight.java b/examples/java/src/collections/ship/tuple/Weight.java
index dd68cecf..b733508e 100644
--- a/examples/java/src/collections/ship/tuple/Weight.java
+++ b/examples/java/src/collections/ship/tuple/Weight.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/AccessExample.java b/examples/java/src/db/AccessExample.java
index c1609c6c..3be6dc13 100644
--- a/examples/java/src/db/AccessExample.java
+++ b/examples/java/src/db/AccessExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/BtRecExample.java b/examples/java/src/db/BtRecExample.java
index 28634964..4680210e 100644
--- a/examples/java/src/db/BtRecExample.java
+++ b/examples/java/src/db/BtRecExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/BulkAccessExample.java b/examples/java/src/db/BulkAccessExample.java
index 33db22e6..ebc859d3 100644
--- a/examples/java/src/db/BulkAccessExample.java
+++ b/examples/java/src/db/BulkAccessExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/BulkAccessNIOExample.java b/examples/java/src/db/BulkAccessNIOExample.java
index ef42dfd4..efb54069 100644
--- a/examples/java/src/db/BulkAccessNIOExample.java
+++ b/examples/java/src/db/BulkAccessNIOExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/BulkExample.java b/examples/java/src/db/BulkExample.java
index 1d752ff4..0d6aefb4 100644
--- a/examples/java/src/db/BulkExample.java
+++ b/examples/java/src/db/BulkExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/EnvExample.java b/examples/java/src/db/EnvExample.java
index 22a285ac..2436a646 100644
--- a/examples/java/src/db/EnvExample.java
+++ b/examples/java/src/db/EnvExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/ExampleDatabaseLoad.java b/examples/java/src/db/GettingStarted/ExampleDatabaseLoad.java
index 0fc2262c..8ae85825 100644
--- a/examples/java/src/db/GettingStarted/ExampleDatabaseLoad.java
+++ b/examples/java/src/db/GettingStarted/ExampleDatabaseLoad.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/ExampleDatabaseRead.java b/examples/java/src/db/GettingStarted/ExampleDatabaseRead.java
index 684501a8..b8223c54 100644
--- a/examples/java/src/db/GettingStarted/ExampleDatabaseRead.java
+++ b/examples/java/src/db/GettingStarted/ExampleDatabaseRead.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/Inventory.java b/examples/java/src/db/GettingStarted/Inventory.java
index e39be934..a1946e52 100644
--- a/examples/java/src/db/GettingStarted/Inventory.java
+++ b/examples/java/src/db/GettingStarted/Inventory.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/InventoryBinding.java b/examples/java/src/db/GettingStarted/InventoryBinding.java
index 46c8d0fc..9cae9048 100644
--- a/examples/java/src/db/GettingStarted/InventoryBinding.java
+++ b/examples/java/src/db/GettingStarted/InventoryBinding.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/ItemNameKeyCreator.java b/examples/java/src/db/GettingStarted/ItemNameKeyCreator.java
index 0c0b7b2d..1708a69e 100644
--- a/examples/java/src/db/GettingStarted/ItemNameKeyCreator.java
+++ b/examples/java/src/db/GettingStarted/ItemNameKeyCreator.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/MyDbs.java b/examples/java/src/db/GettingStarted/MyDbs.java
index c0d2c79a..07b941fb 100644
--- a/examples/java/src/db/GettingStarted/MyDbs.java
+++ b/examples/java/src/db/GettingStarted/MyDbs.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/GettingStarted/Vendor.java b/examples/java/src/db/GettingStarted/Vendor.java
index 5948fe25..f77ff703 100644
--- a/examples/java/src/db/GettingStarted/Vendor.java
+++ b/examples/java/src/db/GettingStarted/Vendor.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/LockExample.java b/examples/java/src/db/LockExample.java
index 2cd87c00..6be53699 100644
--- a/examples/java/src/db/LockExample.java
+++ b/examples/java/src/db/LockExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/SequenceExample.java b/examples/java/src/db/SequenceExample.java
index 8e889659..89156ca8 100644
--- a/examples/java/src/db/SequenceExample.java
+++ b/examples/java/src/db/SequenceExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/TpcbExample.java b/examples/java/src/db/TpcbExample.java
index fa51f4b7..b66bdfc6 100644
--- a/examples/java/src/db/TpcbExample.java
+++ b/examples/java/src/db/TpcbExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote/RepConfig.java b/examples/java/src/db/repquote/RepConfig.java
index 1a39d5ed..a26d3f06 100644
--- a/examples/java/src/db/repquote/RepConfig.java
+++ b/examples/java/src/db/repquote/RepConfig.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote/RepQuoteEnvironment.java b/examples/java/src/db/repquote/RepQuoteEnvironment.java
index 75a50e0e..53932a94 100644
--- a/examples/java/src/db/repquote/RepQuoteEnvironment.java
+++ b/examples/java/src/db/repquote/RepQuoteEnvironment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote/RepQuoteExample.java b/examples/java/src/db/repquote/RepQuoteExample.java
index 9e798a6f..4500696a 100644
--- a/examples/java/src/db/repquote/RepQuoteExample.java
+++ b/examples/java/src/db/repquote/RepQuoteExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote/RepRemoteHost.java b/examples/java/src/db/repquote/RepRemoteHost.java
index c461539e..0754d2a7 100644
--- a/examples/java/src/db/repquote/RepRemoteHost.java
+++ b/examples/java/src/db/repquote/RepRemoteHost.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote_gsg/RepConfig.java b/examples/java/src/db/repquote_gsg/RepConfig.java
index 82c75cce..2d710b3b 100644
--- a/examples/java/src/db/repquote_gsg/RepConfig.java
+++ b/examples/java/src/db/repquote_gsg/RepConfig.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote_gsg/RepQuoteEnvironment.java b/examples/java/src/db/repquote_gsg/RepQuoteEnvironment.java
index 75084259..c6f8988c 100644
--- a/examples/java/src/db/repquote_gsg/RepQuoteEnvironment.java
+++ b/examples/java/src/db/repquote_gsg/RepQuoteEnvironment.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote_gsg/RepQuoteExampleGSG.java b/examples/java/src/db/repquote_gsg/RepQuoteExampleGSG.java
index 3404e189..4b2137e1 100644
--- a/examples/java/src/db/repquote_gsg/RepQuoteExampleGSG.java
+++ b/examples/java/src/db/repquote_gsg/RepQuoteExampleGSG.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -309,6 +309,11 @@ public class RepQuoteExampleGSG implements EventHandler
dbenv.close();
}
+ public void handleRepAutoTakeoverFailedEvent()
+ {
+ // Ignored for now.
+ }
+
public void handleRepClientEvent()
{
dbenv.setIsMaster(false);
@@ -334,6 +339,11 @@ public class RepQuoteExampleGSG implements EventHandler
// Ignored for now.
}
+ public void handleRepInQueueFullEvent()
+ {
+ // Ignored for now.
+ }
+
public void handleRepMasterEvent()
{
dbenv.setIsMaster(true);
diff --git a/examples/java/src/db/repquote_gsg/SimpleConfig.java b/examples/java/src/db/repquote_gsg/SimpleConfig.java
index cde1bd71..6074378e 100644
--- a/examples/java/src/db/repquote_gsg/SimpleConfig.java
+++ b/examples/java/src/db/repquote_gsg/SimpleConfig.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/repquote_gsg/SimpleTxn.java b/examples/java/src/db/repquote_gsg/SimpleTxn.java
index c597b99f..1eba9d81 100644
--- a/examples/java/src/db/repquote_gsg/SimpleTxn.java
+++ b/examples/java/src/db/repquote_gsg/SimpleTxn.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/txn/DBWriter.java b/examples/java/src/db/txn/DBWriter.java
index e0d53380..f259d513 100644
--- a/examples/java/src/db/txn/DBWriter.java
+++ b/examples/java/src/db/txn/DBWriter.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/txn/PayloadData.java b/examples/java/src/db/txn/PayloadData.java
index 7ae0ab58..3b2ba43a 100644
--- a/examples/java/src/db/txn/PayloadData.java
+++ b/examples/java/src/db/txn/PayloadData.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/txn/TxnGuide.java b/examples/java/src/db/txn/TxnGuide.java
index 1142f12d..d33329d5 100644
--- a/examples/java/src/db/txn/TxnGuide.java
+++ b/examples/java/src/db/txn/TxnGuide.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/db/txn/TxnGuideInMemory.java b/examples/java/src/db/txn/TxnGuideInMemory.java
index f4c422bf..10e80593 100644
--- a/examples/java/src/db/txn/TxnGuideInMemory.java
+++ b/examples/java/src/db/txn/TxnGuideInMemory.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2005, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/CustomKeyOrderExample.java b/examples/java/src/persist/CustomKeyOrderExample.java
index 39de9d67..ba4a00b6 100644
--- a/examples/java/src/persist/CustomKeyOrderExample.java
+++ b/examples/java/src/persist/CustomKeyOrderExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/DplDump.java b/examples/java/src/persist/DplDump.java
index f9cf686a..b378b375 100644
--- a/examples/java/src/persist/DplDump.java
+++ b/examples/java/src/persist/DplDump.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/EventExample.java b/examples/java/src/persist/EventExample.java
index 6b5f7e15..8546e7b5 100644
--- a/examples/java/src/persist/EventExample.java
+++ b/examples/java/src/persist/EventExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/EventExampleDPL.java b/examples/java/src/persist/EventExampleDPL.java
index 9ab1d545..909a0e89 100644
--- a/examples/java/src/persist/EventExampleDPL.java
+++ b/examples/java/src/persist/EventExampleDPL.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/PersonExample.java b/examples/java/src/persist/PersonExample.java
index baaa6da5..62afdd2a 100644
--- a/examples/java/src/persist/PersonExample.java
+++ b/examples/java/src/persist/PersonExample.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/gettingStarted/SimpleDA.java b/examples/java/src/persist/gettingStarted/SimpleDA.java
index 38268122..579b42bf 100644
--- a/examples/java/src/persist/gettingStarted/SimpleDA.java
+++ b/examples/java/src/persist/gettingStarted/SimpleDA.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/gettingStarted/SimpleEntityClass.java b/examples/java/src/persist/gettingStarted/SimpleEntityClass.java
index 1ec16b22..a520c43d 100644
--- a/examples/java/src/persist/gettingStarted/SimpleEntityClass.java
+++ b/examples/java/src/persist/gettingStarted/SimpleEntityClass.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/gettingStarted/SimpleStoreGet.java b/examples/java/src/persist/gettingStarted/SimpleStoreGet.java
index 125b99ee..25fdaa8f 100644
--- a/examples/java/src/persist/gettingStarted/SimpleStoreGet.java
+++ b/examples/java/src/persist/gettingStarted/SimpleStoreGet.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/gettingStarted/SimpleStorePut.java b/examples/java/src/persist/gettingStarted/SimpleStorePut.java
index 09af4504..ed75f7f2 100644
--- a/examples/java/src/persist/gettingStarted/SimpleStorePut.java
+++ b/examples/java/src/persist/gettingStarted/SimpleStorePut.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/txn/PayloadDataEntity.java b/examples/java/src/persist/txn/PayloadDataEntity.java
index f54db7f7..9a725b4f 100644
--- a/examples/java/src/persist/txn/PayloadDataEntity.java
+++ b/examples/java/src/persist/txn/PayloadDataEntity.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/txn/StoreWriter.java b/examples/java/src/persist/txn/StoreWriter.java
index b1d7a5d4..fe5d8bf6 100644
--- a/examples/java/src/persist/txn/StoreWriter.java
+++ b/examples/java/src/persist/txn/StoreWriter.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/java/src/persist/txn/TxnGuideDPL.java b/examples/java/src/persist/txn/TxnGuideDPL.java
index dcbc2889..dd8b4b04 100644
--- a/examples/java/src/persist/txn/TxnGuideDPL.java
+++ b/examples/java/src/persist/txn/TxnGuideDPL.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/sql/adf/EX_ADF/.adf/META-INF/adf-config.xml b/examples/sql/adf/EX_ADF/.adf/META-INF/adf-config.xml
new file mode 100644
index 00000000..809182b2
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/.adf/META-INF/adf-config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="GBK" ?>
+<adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration"
+ xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
+ xmlns:sec="http://xmlns.oracle.com/adf/security/config">
+ <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
+ <defaults changeEventPolicy="ppr" useBindVarsForViewCriteriaLiterals="true"/>
+ <startup>
+ <amconfig-overrides>
+ <config:Database jbo.locking.mode="optimistic"/>
+ </amconfig-overrides>
+ </startup>
+ </adf-adfm-config>
+ <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
+ <adf-property name="adfAppUID" value="EX_ADF-1027"/>
+ </adf:adf-properties-child>
+ <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
+ <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
+ credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
+ </sec:adf-security-child>
+</adf-config>
diff --git a/examples/sql/adf/EX_ADF/.adf/META-INF/connections.xml b/examples/sql/adf/EX_ADF/.adf/META-INF/connections.xml
new file mode 100644
index 00000000..8469d4f5
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/.adf/META-INF/connections.xml
@@ -0,0 +1,21 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<References xmlns="http://xmlns.oracle.com/adf/jndi">
+ <Reference name="BDBConnection" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="BDBConnection" xmlns="">
+ <Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
+ <RefAddresses>
+ <StringRefAddr addrType="subtype">
+ <Contents>thirdParty</Contents>
+ </StringRefAddr>
+ <StringRefAddr addrType="user">
+ <Contents>myLogin</Contents>
+ </StringRefAddr>
+ <SecureRefAddr addrType="password"/>
+ <StringRefAddr addrType="driver">
+ <Contents>SQLite.JDBCDriver</Contents>
+ </StringRefAddr>
+ <StringRefAddr addrType="customUrl">
+ <Contents>jdbc:sqlite:/absolute_path_to_db</Contents>
+ </StringRefAddr>
+ </RefAddresses>
+ </Reference>
+</References>
diff --git a/examples/sql/adf/EX_ADF/EX_ADF.jws b/examples/sql/adf/EX_ADF/EX_ADF.jws
new file mode 100644
index 00000000..a1369404
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/EX_ADF.jws
@@ -0,0 +1,87 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<jws:workspace xmlns:jws="http://xmlns.oracle.com/ide/project">
+ <value n="appTemplateId" v="adfWebappApplicationTemplate"/>
+ <hash n="component-versions">
+ <value n="oracle.adf.share.dt.migration.jps.JaznCredStoreMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.model.ide.security.extension.AdfSecurityMigrator" v="11.1.1.1.0.13"/>
+ <value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0"/>
+ <value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.appresources.ApplicationSrcDirMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.xml.oc4j.jps.JpsConfigMigratorHelper" v="11.1.1.1.0.1"/>
+ <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.mds.internal.dt.deploy.base.MarMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.mds.internal.dt.ide.migrator.MDSConfigMigratorHelper" v="11.1.1.0.5313"/>
+ </hash>
+ <list n="contentSets">
+ <string v="oracle.mds.internal.dt.ide.appresources.MDSAppResourceCSProvider/MDSAppContentSet"/>
+ <string v="oracle.jdeveloper.model.PathsConfiguration/ADFContentSet"/>
+ <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationSrcContentSet"/>
+ <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationLevelMavenPOMContentSet"/>
+ </list>
+ <list n="listOfChildren">
+ <hash><url n="URL" path="Model/Model.jpr"/></hash>
+ <hash><url n="URL" path="ViewController/ViewController.jpr"/></hash>
+ </list>
+ <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
+ <hash n="profileDefinitions">
+ <hash n="EX_ADF_Project1_EX_ADF">
+ <hash n="archiveOptions">
+ <value n="hasManifest" v="false"/>
+ </hash>
+ <hash n="dependencies">
+ <list n="dependencyList">
+ <hash>
+ <value n="adapterClass" v="oracle.jdevimpl.deploy.common.ArchiveProfileDependable"/>
+ <url n="ownerURL" path="ViewController/ViewController.jpr"/>
+ <value n="profileName" v="EX_ADF_Project1_webapp"/>
+ </hash>
+ </list>
+ </hash>
+ <url n="earURL" path="deploy/EX_ADF_Project1_EX_ADF.ear"/>
+ <value n="enterpriseAppName" v="EX_ADF_Project1_EX_ADF"/>
+ <hash n="fileGroups">
+ <list n="groups">
+ <hash>
+ <list n="contributors">
+ <hash>
+ <value n="type" v="9"/>
+ </hash>
+ </list>
+ <value n="displayName" v="Application Descriptors"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="DefaultFilters" v=""/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="ear-metainf"/>
+ <value n="type" v="1"/>
+ </hash>
+ <hash>
+ <value n="displayName" v="Application Libraries"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="pattern" v="**"/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="libraries"/>
+ <value n="targetWithinJar" v="lib"/>
+ <value n="type" v="3"/>
+ </hash>
+ </list>
+ </hash>
+ <hash n="libraryDependencies">
+ <value n="IncludeLibrariesFromOtherContainers" v="true"/>
+ </hash>
+ <value n="profileClass" v="oracle.jdeveloper.deploy.ear.EarProfile"/>
+ <value n="profileName" v="EX_ADF_Project1_EX_ADF"/>
+ </hash>
+ </hash>
+ <list n="profileList">
+ <string v="EX_ADF_Project1_EX_ADF"/>
+ </list>
+ </hash>
+</jws:workspace>
diff --git a/examples/sql/adf/EX_ADF/Model/Model.jpr b/examples/sql/adf/EX_ADF/Model/Model.jpr
new file mode 100644
index 00000000..cf734170
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/Model.jpr
@@ -0,0 +1,212 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project">
+ <hash n="component-versions">
+ <value n="oracle.adfdt.controller.adfc.source.migration.AdfControllerSchemaMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdt.controller.common.migrator.ProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdt.controller.migrate.TrinidadDatabindingsProjectMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.adfdtinternal.dvt.datapresdt.migration.DVTDataMapMigrator" v="11.1.1.1.0.3"/>
+ <value n="oracle.adfdtinternal.model.ide.migration.ProjectMigrator" v="11.1.1.1.0.11.1.1"/>
+ <value n="oracle.adfdtinternal.model.ide.security.wizard.FormPageMigrator" v="11.1.1.0.0"/>
+ <value n="oracle.adfdtinternal.model.ide.security.wizard.JpsFilterMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.ADFNodeMigrator" v="11.1.1.1.0.5"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.PageDefinitionParameterValueMigrator" v="11.1.1.1.0.5"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.WebXmlMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper" v="11.1.1.1.0.3"/>
+ <value n="oracle.adfdtinternal.view.rich.binding.migration.JarResourceMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.view.rich.migration.ComponentIdNodeMigratorHelper" v="11.1.1.1.0.01"/>
+ <value n="oracle.adfdtinternal.view.rich.migration.LibraryVersionMigrator" v="11.1.1.1.0.1"/>
+ <value n="oracle.ide.model.Project" v="11.1.2.0.0"/>
+ <value n="oracle.ide.model.ResourcePathsMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.ideimpl.model.TechnologyScopeUpdateMigrator" v="11.1.2.0.0.4"/>
+ <value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="11.1.1.0.1.5"/>
+ <value n="oracle.jbo.dt.migrate.ResourceBundlePathMigrator" v="11.1.1.0.1.5"/>
+ <value n="oracle.jbo.dt.migration.ServiceInterfaceMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdeveloper.library.ProjectLibraryMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdeveloper.model.OutputDirectoryMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.deploy.DeploymentProfilesMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.deploy.jps.JpsDataMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.jsp.JspMigrator" v="11.1.1"/>
+ <value n="oracle.jdevimpl.offlinedb.migration.OfflineDBProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.offlinedb.migration.OfflinePlSqlMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.resourcebundle.XliffAddin$XliffMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.webapp.jsp.libraries.JspLibraryMigrator" v="11.1.1.1.4"/>
+ <value n="oracle.jdevimpl.webapp.WebAppContentSetNodeMigratorHelper" v="11.1.1"/>
+ <value n="oracle.jdevimpl.webapp.WebAppProjectNodeMigratorHelper" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.webservices.rest.migration.RestPathMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.modeler.bmmigrate.management.Migration" v="11.1.1.1.0"/>
+ <value n="oracle.toplink.workbench.addin.migration.PersistenceProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.toplink.workbench.addin.migration.TopLinkProjectMigrator" v="11.1.1.1.0"/>
+ </hash>
+ <list n="contentSets">
+ <string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/>
+ <string v="oracle.mds.internal.dt.ide.MDSLibraryCustCSProvider/mdsContentSet"/>
+ <string v="oracle.mds.internal.dt.ide.MDSADFLibVirtualNodeCSProvider/mdsLibVirtualNodeContentSet"/>
+ <string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/>
+ <string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/>
+ <string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/>
+ <string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/>
+ <string v="oracle.adfdtinternal.model.ide.settings.ADFMSettings/adfmContentSet"/>
+ <string v="oracle.toplink.workbench.addin/toplinkContentSet"/>
+ </list>
+ <value n="defaultPackage" v="model"/>
+ <value n="jbo.JpxName" v="model.Model"/>
+ <value n="JboProject" v="true"/>
+ <hash n="oracle.ide.model.TechnologyScopeConfiguration">
+ <list n="technologyScope">
+ <string v="ADFbc"/>
+ <string v="Java"/>
+ </list>
+ </hash>
+ <value n="oracle.jbo.SavedPreferences" v="true"/>
+ <hash n="oracle.jdeveloper.compiler.OjcConfiguration">
+ <list n="copyRes">
+ <string v=".cpx"/>
+ <string v=".dcx"/>
+ <string v=".ejx"/>
+ <string v=".gif"/>
+ <string v=".ini"/>
+ <string v=".jpeg"/>
+ <string v=".jpg"/>
+ <string v=".png"/>
+ <string v=".properties"/>
+ <string v=".sva"/>
+ <string v=".tag"/>
+ <string v=".tld"/>
+ <string v=".wsdl"/>
+ <string v=".xcfg"/>
+ <string v=".xlf"/>
+ <string v=".xml"/>
+ <string v=".xsd"/>
+ <string v=".xsl"/>
+ <string v=".jpx"/>
+ </list>
+ <value n="internalEncoding" v="GBK"/>
+ <list n="Javac.commandline.optionlist">
+ <string v="-g"/>
+ <string v="-Xlint:all"/>
+ <string v="-Xlint:-cast"/>
+ <string v="-Xlint:-empty"/>
+ <string v="-Xlint:-fallthrough"/>
+ <string v="-Xlint:-path"/>
+ <string v="-Xlint:-processing"/>
+ <string v="-Xlint:-serial"/>
+ <string v="-Xlint:-unchecked"/>
+ </list>
+ <value n="webIANAEncoding" v="GBK"/>
+ </hash>
+ <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
+ <hash n="profileDefinitions">
+ <hash n="EX_ADF_Project1_adflib">
+ <value n="adflib-connectionDetails" v="true"/>
+ <value n="adflib-nonReusablesError" v="false"/>
+ <hash n="archiveOptions">
+ <value n="hasManifest" v="true"/>
+ </hash>
+ <hash n="fileGroups">
+ <list n="groups">
+ <hash>
+ <list n="contributors">
+ <hash>
+ <value n="type" v="2"/>
+ </hash>
+ <hash>
+ <value n="type" v="5"/>
+ </hash>
+ </list>
+ <value n="displayName" v="Project Output"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="pattern" v="WEB-INF/classes/**"/>
+ <value n="type" v="1"/>
+ </hash>
+ <hash>
+ <value n="DefaultFilters" v=""/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="project-output"/>
+ <value n="type" v="1"/>
+ </hash>
+ </list>
+ </hash>
+ <url n="jarURL" path="deploy/EX_ADF_Project1_adflib.jar"/>
+ <hash n="libraryDependencies">
+ <value n="IncludeLibrariesFromOtherContainers" v="true"/>
+ </hash>
+ <hash n="LibraryDependencies"/>
+ <value n="profileClass" v="oracle.adfdt.common.deploy.impl.AdfLibraryProfile"/>
+ <value n="profileName" v="EX_ADF_Project1_adflib"/>
+ </hash>
+ </hash>
+ <list n="profileList">
+ <string v="EX_ADF_Project1_adflib"/>
+ </list>
+ </hash>
+ <hash n="oracle.jdeveloper.model.J2eeSettings">
+ <value n="j2eeWebAppName" v="EX_ADF-Model-webapp"/>
+ <value n="j2eeWebContextRoot" v="EX_ADF-Model-context-root"/>
+ </hash>
+ <hash n="oracle.jdevimpl.config.JProjectLibraries">
+ <list n="exportedReferences">
+ <hash>
+ <value n="id" v="ADF Model Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Oracle Domains"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Security"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime Dependencies"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ </list>
+ <hash n="internalDefinitions">
+ <list n="libraryDefinitions"/>
+ </hash>
+ <list n="libraryReferences">
+ <hash>
+ <value n="id" v="ADF Model Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Oracle Domains"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="BC4J Security"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime Dependencies"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ </list>
+ </hash>
+ <hash n="oracle.jdevimpl.config.JProjectPaths">
+ <url n="outputDirectory" path="classes/"/>
+ </hash>
+</jpr:project>
diff --git a/examples/sql/adf/EX_ADF/Model/src/dbschema/ForeignKeysCoffees.java b/examples/sql/adf/EX_ADF/Model/src/dbschema/ForeignKeysCoffees.java
new file mode 100644
index 00000000..92508208
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/dbschema/ForeignKeysCoffees.java
@@ -0,0 +1,90 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+
+import java.sql.*;
+
+public class ForeignKeysCoffees {
+
+ public static void main(String args[]) {
+
+ String url = "jdbc:sqlite:/path_to_db";
+ Connection con;
+ String createString = "create table COFFEESFK " +
+ "(COF_NAME varchar(32) NOT NULL, " + "SUP_ID int, " +
+ "PRICE float, " + "SALES int, " + "TOTAL int, " +
+ "primary key(COF_NAME), " +
+ "foreign key(SUP_ID) references SUPPLIERSPK(SUP_ID))";
+ Statement stmt;
+
+ try {
+ Class.forName("SQLite.JDBCDriver");
+ } catch(java.lang.ClassNotFoundException e) {
+ System.err.print("ClassNotFoundException: ");
+ System.err.println(e.getMessage());
+ }
+
+ try {
+ con = DriverManager.getConnection(url,
+ "myLogin", "myPassword");
+
+ stmt = con.createStatement();
+ stmt.execute("PRAGMA foreign_keys = ON;");
+ stmt.executeUpdate("drop table if exists COFFEESFK");
+ stmt.executeUpdate(createString);
+
+ DatabaseMetaData dbmd = con.getMetaData();
+ ResultSet rs = dbmd.getImportedKeys(null, null, "COFFEESFK");
+ while (rs.next()) {
+ System.out.println("primary key table name: " +
+ rs.getString("PKTABLE_NAME"));
+ System.out.println("primary key column name: " +
+ rs.getString("PKCOLUMN_NAME"));
+ System.out.println("foreign key table name: " +
+ rs.getString("FKTABLE_NAME"));
+ System.out.println("foreign key column name: " +
+ rs.getString("FKCOLUMN_NAME"));
+ }
+
+ stmt.executeUpdate("insert into COFFEESFK " +
+ "values('Colombian', 00101, 7.99, 0, 0)");
+
+ stmt.executeUpdate("insert into COFFEESFK " +
+ "values('French_Roast', 00049, 8.99, 0, 0)");
+
+ stmt.executeUpdate("insert into COFFEESFK " +
+ "values('Espresso', 00150, 9.99, 0, 0)");
+
+ stmt.executeUpdate("insert into COFFEESFK " +
+ "values('Colombian_Decaf', 00101, 8.99, 0, 0)");
+
+ stmt.executeUpdate("insert into COFFEESFK " +
+ "values('French_Roast_Decaf', 00150, 9.99, 0, 0)");
+
+ rs = stmt.executeQuery("select * from COFFEESFK");
+
+ System.out.println("select * from COFFEESFK:");
+ while (rs.next()) {
+ String name = rs.getString("COF_NAME");
+ int id = rs.getInt("SUP_ID");
+ float price = rs.getFloat("PRICE");
+ int sales = rs.getInt("Sales");
+ int total = rs.getInt("Total");
+ System.out.println(name + ", " + id + ", " +
+ price + ", " + sales + ", " + total);
+ }
+
+ rs.close();
+ stmt.close();
+ con.close();
+
+ } catch(SQLException ex) {
+ System.err.print("SQLException: ");
+ System.err.println(ex.getMessage());
+ }
+ }
+}
+
diff --git a/examples/sql/adf/EX_ADF/Model/src/dbschema/PrimaryKeysSuppliers.java b/examples/sql/adf/EX_ADF/Model/src/dbschema/PrimaryKeysSuppliers.java
new file mode 100644
index 00000000..069299c3
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/dbschema/PrimaryKeysSuppliers.java
@@ -0,0 +1,74 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+
+import java.sql.*;
+
+public class PrimaryKeysSuppliers {
+
+ public static void main(String args[]) {
+
+ String url = "jdbc:sqlite:/path_to_db";
+ Connection con;
+ String createString = "create table SUPPLIERSPK " +
+ "(SUP_ID INTEGER NOT NULL, " + "SUP_NAME VARCHAR(40), " +
+ "STREET VARCHAR(40), " + "CITY VARCHAR(20), " +
+ "STATE CHAR(2), " + "ZIP CHAR(5), " +
+ "primary key(SUP_ID))";
+ Statement stmt;
+
+ try {
+ Class.forName("SQLite.JDBCDriver");
+ } catch(java.lang.ClassNotFoundException e) {
+ System.err.print("ClassNotFoundException: ");
+ System.err.println(e.getMessage());
+ }
+
+ try {
+ con = DriverManager.getConnection(url,
+ "myLogin", "myPassword");
+
+ stmt = con.createStatement();
+ stmt.executeUpdate("drop table if exists SUPPLIERSPK");
+ stmt.executeUpdate(createString);
+
+ stmt.executeUpdate("insert into SUPPLIERSPK " +
+ "values(49, 'Superior Coffee', '1 Party Place', " +
+ "'Mendocino', 'CA', '95460')");
+
+ stmt.executeUpdate("insert into SUPPLIERSPK " +
+ "values(101, 'Acme, Inc.', '99 Market Street', " +
+ "'Groundsville', 'CA', '95199')");
+
+ stmt.executeUpdate("insert into SUPPLIERSPK " +
+ "values(150, 'The High Ground', '100 Coffee Lane', " +
+ "'Meadows', 'CA', '93966')");
+
+ ResultSet rs = stmt.executeQuery("select * from SUPPLIERSPK");
+
+ System.out.println("select * from SUPPLIERSPK:");
+ while (rs.next()) {
+ int id = rs.getInt("SUP_ID");
+ String name = rs.getString("SUP_NAME");
+ String street = rs.getString("STREET");
+ String city = rs.getString("CITY");
+ String state = rs.getString("STATE");
+ String zip = rs.getString("ZIP");
+ System.out.println(id + ", " + name + ", " +
+ street + ", " + city + ", " + state + ", " + zip);
+ }
+
+ rs.close();
+ stmt.close();
+ con.close();
+
+ } catch(SQLException ex) {
+ System.err.print("SQLException: ");
+ System.err.println(ex.getMessage());
+ }
+ }
+}
+
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx b/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx
new file mode 100644
index 00000000..9b0ab3d3
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE JboProject SYSTEM "jbo_03_01.dtd">
+<!---->
+<JboProject
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="Model"
+ Version="11.1.2.64.36"
+ SeparateXMLFiles="true"
+ PackageName="model">
+ <DesignTime>
+ <Attr Name="_useAnsiJoinSyntax" Value="true"/>
+ <Attr Name="_jprName" Value="../../Model.jpr"/>
+ <Attr Name="_jbo.SQLBuilder" Value="SQL92"/>
+ <Attr Name="_jbo.TypeMapEntries" Value="Java"/>
+ <Attr Name="_NamedConnection" Value="BDBConnection"/>
+ <Attr Name="_appModuleNames0" Value="uimodel.am.AppModule"/>
+ </DesignTime>
+ <Containee
+ Name="association"
+ PackageName="model.entity.association"
+ ObjectType="JboPackage">
+ <DesignTime>
+ <Attr Name="_AS" Value="true"/>
+ </DesignTime>
+ </Containee>
+ <Containee
+ Name="entity"
+ PackageName="model.entity"
+ ObjectType="JboPackage">
+ <DesignTime>
+ <Attr Name="_EO" Value="true"/>
+ </DesignTime>
+ </Containee>
+ <Containee
+ Name="am"
+ PackageName="uimodel.am"
+ ObjectType="JboPackage">
+ <DesignTime>
+ <Attr Name="_AM" Value="true"/>
+ </DesignTime>
+ </Containee>
+ <Containee
+ Name="view"
+ PackageName="uimodel.view"
+ ObjectType="JboPackage">
+ <DesignTime>
+ <Attr Name="_VO" Value="true"/>
+ <Attr Name="_VL" Value="true"/>
+ </DesignTime>
+ </Containee>
+</JboProject>
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties b/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties
new file mode 100644
index 00000000..a5910d8c
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties
@@ -0,0 +1,6 @@
+#
+uimodel.view.CoffeesVO_LABEL=Coffees Vo
+uimodel.am.AppModule_LABEL=App Module Client
+uimodel.view.SuppliersVO_LABEL=Suppliers Vo
+uimodel.view.SuppliersVOToCoffeesVOLink_LABEL=Suppliers Vo To Coffees Vo Link
+LOV_SupId_LOVUIHints_NullValueId=<No Selection>
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml
new file mode 100644
index 00000000..fef443b4
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
+<!---->
+<Entity
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="CoffeesEO"
+ Version="11.1.2.64.36"
+ DBObjectType="TABLE"
+ DBObjectName="COFFEESFK"
+ AliasName="CoffeesEO"
+ BindingStyle="JDBC"
+ UseGlueCode="false"
+ RowClass="model.entity.CoffeesEOImpl">
+ <DesignTime>
+ <Attr Name="_codeGenFlag2" Value="Access"/>
+ <Attr Name="_isCodegen" Value="true"/>
+ </DesignTime>
+ <Attribute
+ Name="CofName"
+ IsNotNull="true"
+ ColumnName="COF_NAME"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="COFFEESFK"
+ PrimaryKey="true"/>
+ <Attribute
+ Name="SupId"
+ ColumnName="SUP_ID"
+ SQLType="INTEGER"
+ Type="java.lang.Integer"
+ ColumnType="INTEGER"
+ TableName="COFFEESFK"/>
+ <Attribute
+ Name="Price"
+ ColumnName="PRICE"
+ SQLType="FLOAT"
+ Type="java.lang.Float"
+ ColumnType="FLOAT"
+ TableName="COFFEESFK"/>
+ <Attribute
+ Name="Sales"
+ ColumnName="SALES"
+ SQLType="INTEGER"
+ Type="java.lang.Integer"
+ ColumnType="INTEGER"
+ TableName="COFFEESFK"/>
+ <Attribute
+ Name="Total"
+ ColumnName="TOTAL"
+ SQLType="INTEGER"
+ Type="java.lang.Integer"
+ ColumnType="INTEGER"
+ TableName="COFFEESFK"/>
+ <AccessorAttribute
+ Name="SuppliersEO"
+ Association="model.entity.association.SuppliersEOToCoffeesEOAssoc"
+ AssociationEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.SuppliersEO"
+ AssociationOtherEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.CoffeesEO"
+ Type="model.entity.SuppliersEOImpl"
+ IsUpdateable="true"/>
+ <Key
+ Name="SqliteAutoindexCoffeesfk1"
+ PrimaryKey="true">
+ <DesignTime>
+ <Attr Name="_DBObjectName" Value="sqlite_autoindex_COFFEESFK_1"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="model.entity.CoffeesEO.CofName"/>
+ </AttrArray>
+ </Key>
+ <Key
+ Name="fk_CoffeesEO">
+ <DesignTime>
+ <Attr Name="_referencedKey" Value="SUPPLIERSPK_PK"/>
+ <Attr Name="_isForeign" Value="true"/>
+ <Attr Name="_DBObjectName" Value="FK_COFFEES_EO"/>
+ <Attr Name="_isCascadeDelete" Value="true"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="model.entity.CoffeesEO.SupId"/>
+ </AttrArray>
+ </Key>
+</Entity>
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java
new file mode 100644
index 00000000..6f84c250
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java
@@ -0,0 +1,281 @@
+package model.entity;
+
+import oracle.jbo.Key;
+import oracle.jbo.server.AttributeDefImpl;
+import oracle.jbo.server.EntityDefImpl;
+import oracle.jbo.server.EntityImpl;
+// ---------------------------------------------------------------------
+// --- File generated by Oracle ADF Business Components Design Time.
+// --- Mon Aug 19 12:01:47 CST 2013
+// --- Custom code may be added to this class.
+// --- Warning: Do not modify method signatures of generated methods.
+// ---------------------------------------------------------------------
+public class CoffeesEOImpl extends EntityImpl {
+ public void lock() {
+ //super.lock();
+ }
+
+ protected StringBuffer buildDMLStatement(int i, AttributeDefImpl[] attributeDefImpl,
+ AttributeDefImpl[] attributeDefImpl2,
+ AttributeDefImpl[] attributeDefImpl3, boolean b) {
+ StringBuffer stmt = super.buildDMLStatement(i, attributeDefImpl, attributeDefImpl2, attributeDefImpl3, b);
+ if (i == DML_UPDATE) {
+ // Get the alias name (it is equal to the entity definition name)
+ String alias = this.getEntityDef().getDefName();
+ // Remove the alias from the UPDATE statement
+ int index = stmt.indexOf( " " + alias + " SET ");
+ if (index != -1)
+ stmt = stmt.replace( index, index + alias.length() + 1, "");
+ }
+ return stmt;
+ }
+
+ /**
+ * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify.
+ */
+ public enum AttributesEnum {
+ CofName {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getCofName();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setCofName((String)value);
+ }
+ }
+ ,
+ SupId {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getSupId();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setSupId((Integer)value);
+ }
+ }
+ ,
+ Price {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getPrice();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setPrice((Float)value);
+ }
+ }
+ ,
+ Sales {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getSales();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setSales((Integer)value);
+ }
+ }
+ ,
+ Total {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getTotal();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setTotal((Integer)value);
+ }
+ }
+ ,
+ SuppliersEO {
+ public Object get(CoffeesEOImpl obj) {
+ return obj.getSuppliersEO();
+ }
+
+ public void put(CoffeesEOImpl obj, Object value) {
+ obj.setSuppliersEO((SuppliersEOImpl)value);
+ }
+ }
+ ;
+ private static AttributesEnum[] vals = null;
+ private static int firstIndex = 0;
+
+ public abstract Object get(CoffeesEOImpl object);
+
+ public abstract void put(CoffeesEOImpl object, Object value);
+
+ public int index() {
+ return AttributesEnum.firstIndex() + ordinal();
+ }
+
+ public static int firstIndex() {
+ return firstIndex;
+ }
+
+ public static int count() {
+ return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
+ }
+
+ public static AttributesEnum[] staticValues() {
+ if (vals == null) {
+ vals = AttributesEnum.values();
+ }
+ return vals;
+ }
+ }
+
+
+ public static final int COFNAME = AttributesEnum.CofName.index();
+ public static final int SUPID = AttributesEnum.SupId.index();
+ public static final int PRICE = AttributesEnum.Price.index();
+ public static final int SALES = AttributesEnum.Sales.index();
+ public static final int TOTAL = AttributesEnum.Total.index();
+ public static final int SUPPLIERSEO = AttributesEnum.SuppliersEO.index();
+
+ /**
+ * This is the default constructor (do not remove).
+ */
+ public CoffeesEOImpl() {
+ }
+
+
+ /**
+ * @return the definition object for this instance class.
+ */
+ public static synchronized EntityDefImpl getDefinitionObject() {
+ return EntityDefImpl.findDefObject("model.entity.CoffeesEO");
+ }
+
+ /**
+ * Gets the attribute value for CofName, using the alias name CofName.
+ * @return the value of CofName
+ */
+ public String getCofName() {
+ return (String)getAttributeInternal(COFNAME);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for CofName.
+ * @param value value to set the CofName
+ */
+ public void setCofName(String value) {
+ setAttributeInternal(COFNAME, value);
+ }
+
+ /**
+ * Gets the attribute value for SupId, using the alias name SupId.
+ * @return the value of SupId
+ */
+ public Integer getSupId() {
+ return (Integer)getAttributeInternal(SUPID);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for SupId.
+ * @param value value to set the SupId
+ */
+ public void setSupId(Integer value) {
+ setAttributeInternal(SUPID, value);
+ }
+
+ /**
+ * Gets the attribute value for Price, using the alias name Price.
+ * @return the value of Price
+ */
+ public Float getPrice() {
+ return (Float)getAttributeInternal(PRICE);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for Price.
+ * @param value value to set the Price
+ */
+ public void setPrice(Float value) {
+ setAttributeInternal(PRICE, value);
+ }
+
+ /**
+ * Gets the attribute value for Sales, using the alias name Sales.
+ * @return the value of Sales
+ */
+ public Integer getSales() {
+ return (Integer)getAttributeInternal(SALES);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for Sales.
+ * @param value value to set the Sales
+ */
+ public void setSales(Integer value) {
+ setAttributeInternal(SALES, value);
+ }
+
+ /**
+ * Gets the attribute value for Total, using the alias name Total.
+ * @return the value of Total
+ */
+ public Integer getTotal() {
+ return (Integer)getAttributeInternal(TOTAL);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for Total.
+ * @param value value to set the Total
+ */
+ public void setTotal(Integer value) {
+ setAttributeInternal(TOTAL, value);
+ }
+
+ /**
+ * getAttrInvokeAccessor: generated method. Do not modify.
+ * @param index the index identifying the attribute
+ * @param attrDef the attribute
+
+ * @return the attribute value
+ * @throws Exception
+ */
+ protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception {
+ if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
+ return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this);
+ }
+ return super.getAttrInvokeAccessor(index, attrDef);
+ }
+
+ /**
+ * setAttrInvokeAccessor: generated method. Do not modify.
+ * @param index the index identifying the attribute
+ * @param value the value to assign to the attribute
+ * @param attrDef the attribute
+
+ * @throws Exception
+ */
+ protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception {
+ if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
+ AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value);
+ return;
+ }
+ super.setAttrInvokeAccessor(index, value, attrDef);
+ }
+
+ /**
+ * @return the associated entity SuppliersEOImpl.
+ */
+ public SuppliersEOImpl getSuppliersEO() {
+ return (SuppliersEOImpl)getAttributeInternal(SUPPLIERSEO);
+ }
+
+ /**
+ * Sets <code>value</code> as the associated entity SuppliersEOImpl.
+ */
+ public void setSuppliersEO(SuppliersEOImpl value) {
+ setAttributeInternal(SUPPLIERSEO, value);
+ }
+
+ /**
+ * @param cofName key constituent
+
+ * @return a Key object based on given key constituents.
+ */
+ public static Key createPrimaryKey(String cofName) {
+ return new Key(new Object[]{cofName});
+ }
+
+
+}
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml
new file mode 100644
index 00000000..3ad0b5f9
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
+<!---->
+<Entity
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="SuppliersEO"
+ Version="11.1.2.64.36"
+ DBObjectType="TABLE"
+ DBObjectName="SUPPLIERSPK"
+ AliasName="SuppliersEO"
+ BindingStyle="JDBC"
+ UseGlueCode="false"
+ RowClass="model.entity.SuppliersEOImpl">
+ <DesignTime>
+ <Attr Name="_codeGenFlag2" Value="Access"/>
+ <Attr Name="_isCodegen" Value="true"/>
+ </DesignTime>
+ <Attribute
+ Name="SupId"
+ IsNotNull="true"
+ ColumnName="SUP_ID"
+ SQLType="INTEGER"
+ Type="java.lang.Integer"
+ ColumnType="INTEGER"
+ TableName="SUPPLIERSPK"
+ PrimaryKey="true"/>
+ <Attribute
+ Name="SupName"
+ ColumnName="SUP_NAME"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="SUPPLIERSPK"/>
+ <Attribute
+ Name="Street"
+ ColumnName="STREET"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="SUPPLIERSPK"/>
+ <Attribute
+ Name="City"
+ ColumnName="CITY"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="SUPPLIERSPK"/>
+ <Attribute
+ Name="State"
+ ColumnName="STATE"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="SUPPLIERSPK"/>
+ <Attribute
+ Name="Zip"
+ ColumnName="ZIP"
+ SQLType="VARCHAR"
+ Type="java.lang.String"
+ ColumnType="VARCHAR"
+ TableName="SUPPLIERSPK"/>
+ <AccessorAttribute
+ Name="CoffeesEO"
+ Association="model.entity.association.SuppliersEOToCoffeesEOAssoc"
+ AssociationEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.CoffeesEO"
+ AssociationOtherEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.SuppliersEO"
+ Type="oracle.jbo.RowIterator"
+ IsUpdateable="false"/>
+ <Key
+ Name="SupplierspkPk"
+ PrimaryKey="true">
+ <DesignTime>
+ <Attr Name="_DBObjectName" Value="SUPPLIERSPK_PK"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="model.entity.SuppliersEO.SupId"/>
+ </AttrArray>
+ </Key>
+</Entity>
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java
new file mode 100644
index 00000000..92449faa
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java
@@ -0,0 +1,302 @@
+package model.entity;
+
+import oracle.jbo.Key;
+import oracle.jbo.RowIterator;
+import oracle.jbo.server.AttributeDefImpl;
+import oracle.jbo.server.EntityDefImpl;
+import oracle.jbo.server.EntityImpl;
+// ---------------------------------------------------------------------
+// --- File generated by Oracle ADF Business Components Design Time.
+// --- Mon Aug 19 12:03:06 CST 2013
+// --- Custom code may be added to this class.
+// --- Warning: Do not modify method signatures of generated methods.
+// ---------------------------------------------------------------------
+public class SuppliersEOImpl extends EntityImpl {
+ public void lock() {
+ //super.lock();
+ }
+
+ protected StringBuffer buildDMLStatement(int i, AttributeDefImpl[] attributeDefImpl,
+ AttributeDefImpl[] attributeDefImpl2,
+ AttributeDefImpl[] attributeDefImpl3, boolean b) {
+ StringBuffer stmt = super.buildDMLStatement(i, attributeDefImpl, attributeDefImpl2, attributeDefImpl3, b);
+ if (i == DML_UPDATE) {
+ // Get the alias name (it is equal to the entity definition name)
+ String alias = this.getEntityDef().getDefName();
+ // Remove the alias from the UPDATE statement
+ int index = stmt.indexOf( " " + alias + " SET ");
+ if (index != -1)
+ stmt = stmt.replace( index, index + alias.length() + 1, "");
+ }
+ return stmt;
+ }
+
+ /**
+ * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify.
+ */
+ public enum AttributesEnum {
+ SupId {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getSupId();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setSupId((Integer)value);
+ }
+ }
+ ,
+ SupName {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getSupName();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setSupName((String)value);
+ }
+ }
+ ,
+ Street {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getStreet();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setStreet((String)value);
+ }
+ }
+ ,
+ City {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getCity();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setCity((String)value);
+ }
+ }
+ ,
+ State {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getState();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setState((String)value);
+ }
+ }
+ ,
+ Zip {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getZip();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setZip((String)value);
+ }
+ }
+ ,
+ CoffeesEO {
+ public Object get(SuppliersEOImpl obj) {
+ return obj.getCoffeesEO();
+ }
+
+ public void put(SuppliersEOImpl obj, Object value) {
+ obj.setAttributeInternal(index(), value);
+ }
+ }
+ ;
+ private static AttributesEnum[] vals = null;
+ private static int firstIndex = 0;
+
+ public abstract Object get(SuppliersEOImpl object);
+
+ public abstract void put(SuppliersEOImpl object, Object value);
+
+ public int index() {
+ return AttributesEnum.firstIndex() + ordinal();
+ }
+
+ public static int firstIndex() {
+ return firstIndex;
+ }
+
+ public static int count() {
+ return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
+ }
+
+ public static AttributesEnum[] staticValues() {
+ if (vals == null) {
+ vals = AttributesEnum.values();
+ }
+ return vals;
+ }
+ }
+
+
+ public static final int SUPID = AttributesEnum.SupId.index();
+ public static final int SUPNAME = AttributesEnum.SupName.index();
+ public static final int STREET = AttributesEnum.Street.index();
+ public static final int CITY = AttributesEnum.City.index();
+ public static final int STATE = AttributesEnum.State.index();
+ public static final int ZIP = AttributesEnum.Zip.index();
+ public static final int COFFEESEO = AttributesEnum.CoffeesEO.index();
+
+ /**
+ * This is the default constructor (do not remove).
+ */
+ public SuppliersEOImpl() {
+ }
+
+
+ /**
+ * @return the definition object for this instance class.
+ */
+ public static synchronized EntityDefImpl getDefinitionObject() {
+ return EntityDefImpl.findDefObject("model.entity.SuppliersEO");
+ }
+
+ /**
+ * Gets the attribute value for SupId, using the alias name SupId.
+ * @return the value of SupId
+ */
+ public Integer getSupId() {
+ return (Integer)getAttributeInternal(SUPID);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for SupId.
+ * @param value value to set the SupId
+ */
+ public void setSupId(Integer value) {
+ setAttributeInternal(SUPID, value);
+ }
+
+ /**
+ * Gets the attribute value for SupName, using the alias name SupName.
+ * @return the value of SupName
+ */
+ public String getSupName() {
+ return (String)getAttributeInternal(SUPNAME);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for SupName.
+ * @param value value to set the SupName
+ */
+ public void setSupName(String value) {
+ setAttributeInternal(SUPNAME, value);
+ }
+
+ /**
+ * Gets the attribute value for Street, using the alias name Street.
+ * @return the value of Street
+ */
+ public String getStreet() {
+ return (String)getAttributeInternal(STREET);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for Street.
+ * @param value value to set the Street
+ */
+ public void setStreet(String value) {
+ setAttributeInternal(STREET, value);
+ }
+
+ /**
+ * Gets the attribute value for City, using the alias name City.
+ * @return the value of City
+ */
+ public String getCity() {
+ return (String)getAttributeInternal(CITY);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for City.
+ * @param value value to set the City
+ */
+ public void setCity(String value) {
+ setAttributeInternal(CITY, value);
+ }
+
+ /**
+ * Gets the attribute value for State, using the alias name State.
+ * @return the value of State
+ */
+ public String getState() {
+ return (String)getAttributeInternal(STATE);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for State.
+ * @param value value to set the State
+ */
+ public void setState(String value) {
+ setAttributeInternal(STATE, value);
+ }
+
+ /**
+ * Gets the attribute value for Zip, using the alias name Zip.
+ * @return the value of Zip
+ */
+ public String getZip() {
+ return (String)getAttributeInternal(ZIP);
+ }
+
+ /**
+ * Sets <code>value</code> as the attribute value for Zip.
+ * @param value value to set the Zip
+ */
+ public void setZip(String value) {
+ setAttributeInternal(ZIP, value);
+ }
+
+ /**
+ * getAttrInvokeAccessor: generated method. Do not modify.
+ * @param index the index identifying the attribute
+ * @param attrDef the attribute
+
+ * @return the attribute value
+ * @throws Exception
+ */
+ protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception {
+ if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
+ return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this);
+ }
+ return super.getAttrInvokeAccessor(index, attrDef);
+ }
+
+ /**
+ * setAttrInvokeAccessor: generated method. Do not modify.
+ * @param index the index identifying the attribute
+ * @param value the value to assign to the attribute
+ * @param attrDef the attribute
+
+ * @throws Exception
+ */
+ protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception {
+ if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
+ AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value);
+ return;
+ }
+ super.setAttrInvokeAccessor(index, value, attrDef);
+ }
+
+ /**
+ * @return the associated entity oracle.jbo.RowIterator.
+ */
+ public RowIterator getCoffeesEO() {
+ return (RowIterator)getAttributeInternal(COFFEESEO);
+ }
+
+ /**
+ * @param supId key constituent
+
+ * @return a Key object based on given key constituents.
+ */
+ public static Key createPrimaryKey(Integer supId) {
+ return new Key(new Object[]{supId});
+ }
+
+
+}
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml
new file mode 100644
index 00000000..19550461
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
+<!---->
+<Association
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="SuppliersEOToCoffeesEOAssoc"
+ Version="11.1.2.64.36">
+ <DesignTime>
+ <Attr Name="_isCodegen" Value="true"/>
+ </DesignTime>
+ <AssociationEnd
+ Name="SuppliersEO"
+ Cardinality="1"
+ Source="true"
+ Owner="model.entity.SuppliersEO"
+ CascadeDelete="true"
+ DeleteContainee="true"
+ CascadeUpdate="true">
+ <DesignTime>
+ <Attr Name="_aggregation" Value="0"/>
+ <Attr Name="_finderName" Value="SuppliersEO"/>
+ <Attr Name="_foreignKey" Value="model.entity.SuppliersEO.SupplierspkPk"/>
+ <Attr Name="_isUpdateable" Value="true"/>
+ <Attr Name="_minCardinality" Value="1"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="model.entity.SuppliersEO.SupId"/>
+ </AttrArray>
+ </AssociationEnd>
+ <AssociationEnd
+ Name="CoffeesEO"
+ Cardinality="-1"
+ Owner="model.entity.CoffeesEO"
+ HasOwner="true">
+ <DesignTime>
+ <Attr Name="_aggregation" Value="0"/>
+ <Attr Name="_finderName" Value="CoffeesEO"/>
+ <Attr Name="_foreignKey" Value="model.entity.CoffeesEO.fk_CoffeesEO"/>
+ <Attr Name="_isUpdateable" Value="true"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="model.entity.CoffeesEO.SupId"/>
+ </AttrArray>
+ </AssociationEnd>
+</Association>
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/am/AppModule.xml b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/AppModule.xml
new file mode 100644
index 00000000..de3eb6b9
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/AppModule.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
+<!---->
+<AppModule
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="AppModule"
+ Version="11.1.2.64.36"
+ ClearCacheOnRollback="true">
+ <Properties>
+ <SchemaBasedProperties>
+ <LABEL
+ ResId="uimodel.am.AppModule_LABEL"/>
+ </SchemaBasedProperties>
+ </Properties>
+ <ViewUsage
+ Name="Coffees"
+ ViewObjectName="uimodel.view.CoffeesVO"/>
+ <ViewUsage
+ Name="Suppliers"
+ ViewObjectName="uimodel.view.SuppliersVO"/>
+ <ViewUsage
+ Name="CoffeesForSuppliers"
+ ViewObjectName="uimodel.view.CoffeesVO"/>
+ <ViewLinkUsage
+ Name="SuppliersVOToCoffeesVOLink1"
+ ViewLinkObjectName="uimodel.view.SuppliersVOToCoffeesVOLink"
+ SrcViewUsageName="uimodel.am.AppModule.Suppliers"
+ DstViewUsageName="uimodel.am.AppModule.CoffeesForSuppliers"
+ Reversed="false"/>
+ <ResourceBundle>
+ <PropertiesBundle
+ PropertiesFile="model.ModelBundle"/>
+ </ResourceBundle>
+</AppModule>
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/am/TestClient.java b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/TestClient.java
new file mode 100644
index 00000000..dc8df900
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/TestClient.java
@@ -0,0 +1,179 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+
+package uimodel.am;
+
+import oracle.jbo.ApplicationModule;
+import oracle.jbo.Key;
+import oracle.jbo.Row;
+import oracle.jbo.RowMatch;
+import oracle.jbo.ViewCriteria;
+import oracle.jbo.ViewCriteriaRow;
+import oracle.jbo.ViewObject;
+import oracle.jbo.client.Configuration;
+
+public class TestClient {
+ public static void main(String[] args) {
+
+ String amDef = "uimodel.am.AppModule";
+ String config = "AppModuleLocal";
+ ApplicationModule am =
+ Configuration.createRootApplicationModule(amDef, config);
+
+ ViewObject cofVO = am.findViewObject("Coffees");
+ ViewObject supVO = am.findViewObject("Suppliers");
+ cofVO.executeQuery();
+ supVO.executeQuery();
+ showRows(cofVO, "Initial database results - Coffees");
+ showRows(supVO, "Initial database results - Suppliers");
+
+ // Test sorting rows.
+ System.out.println("\n=== " + " Test sorting rows " + " ===\n");
+ cofVO.setSortBy("Price desc");
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
+ cofVO.executeQuery();
+ showRows(cofVO, "Sorting Coffees by Price desc");
+
+ supVO.setSortBy("Zip asc");
+ supVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
+ supVO.executeQuery();
+ showRows(supVO, "Sorting Suppliers by Zip asc");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ // Test matching rows.
+ System.out.println("\n=== " + " Test matching rows " + " ===\n");
+ cofVO.setSortBy("");
+ supVO.setSortBy("");
+
+ RowMatch rm = new RowMatch("CofName like 'C%'");
+ cofVO.setRowMatch(rm);
+ cofVO.executeQuery();
+ showRows(cofVO, "Coffee Name begins with 'C'");
+
+ rm = new RowMatch("Zip like '95%'");
+ supVO.setRowMatch(rm);
+ supVO.executeQuery();
+ showRows(supVO, "Supplier Zip begins with '95'");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ // Test filtering rows by view criteria.
+ System.out.println("\n=== " +
+ " Test filtering rows by view criteria " + " ===\n");
+ cofVO.setRowMatch(null);
+
+ ViewCriteria vc = cofVO.createViewCriteria();
+ ViewCriteriaRow vcr = vc.createViewCriteriaRow();
+ vcr.setAttribute("SupId", "= 150");
+ vc.add(vcr);
+ cofVO.applyViewCriteria(vc);
+ vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
+ cofVO.executeQuery();
+ showRows(cofVO, "Supplier ID = 150");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ // Test inserting a row with the foreign key.
+ System.out.println("\n=== " +
+ " Test insert with a foreign key " + " ===\n");
+ cofVO.applyViewCriteria(null);
+
+ cofVO.setSortBy("SupId");
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
+ cofVO.executeQuery();
+ showRows(cofVO, "Before insert and clear cache, query over VO cache");
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
+ cofVO.executeQuery();
+ showRows(cofVO, "Before insert and clear cache, query over EO cache");
+
+ cofVO.setAssociationConsistent(true);
+ Row newCof = cofVO.createRow();
+ newCof.setAttribute("CofName", "Java_Chips_Mocha");
+ newCof.setAttribute("Price", "5.99");
+ newCof.setAttribute("Sales", "5");
+ newCof.setAttribute("Total", "9");
+ try {
+ newCof.setAttribute("SupId", "10");
+ System.out.println("Setting an invalid foreign key should fail.");
+ return;
+ } catch (Exception e) {
+ }
+ newCof.setAttribute("SupId", "101");
+ cofVO.insertRow(newCof);
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
+ cofVO.clearCache();
+ showRows(cofVO, "After insert and clear cache, query over VO cache");
+
+ cofVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
+ cofVO.executeQuery();
+ showRows(cofVO, "After insert and clear cache, query over EO cache");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ // Test updating a row.
+ System.out.println("\n=== " + " Test updating a row " + " ===\n");
+ showRows(cofVO, "Before update");
+
+ newCof.setAttribute("Price", "15.99");
+ cofVO.clearCache();
+ showRows(cofVO, "After update");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ // Test deleting a row in SUPPLIERSPK and all rows referencing
+ // the same SupId in COFFEESFK will be deleted automactially.
+ System.out.println("\n=== " + " Test deleting rows " + " ===\n");
+ supVO.setRowMatch(null);
+ supVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
+ supVO.executeQuery();
+ showRows(supVO, "Before delete in SUPPLIERS - Suppliers");
+ showRows(cofVO, "Before delete in SUPPLIERS - Coffees");
+
+ supVO.setAssociationConsistent(true);
+ Object[] keyValues = new Object[6];
+ keyValues[0] = new Integer(49);
+ for (int i = 1; i < keyValues.length; i++)
+ keyValues[i] = null;
+ Row[] rows = supVO.findByKey(new Key(keyValues), 1);
+ rows[0].remove();
+ supVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
+ supVO.executeQuery();
+ showRows(supVO, "After delete in SUPPLIERS - Suppliers");
+ showRows(cofVO, "After delete in SUPPLIERS - Coffees");
+ System.out.println("\n=== " + " End " + " ===\n");
+
+ Configuration.releaseRootApplicationModule(am, true);
+ }
+
+ private static void showRows(ViewObject vo, String msg) {
+ System.out.println("\n--- " + msg + " ---\n");
+ boolean prtCof = false;
+ if (vo.getFullName().contains("Coffees") == true)
+ prtCof = true;
+ String prtStr;
+ vo.reset();
+ while (vo.hasNext()) {
+ Row r = vo.next();
+ if (prtCof == true) {
+ String name = (String)r.getAttribute("CofName");
+ Integer id = (Integer)r.getAttribute("SupId");
+ Float price = (Float)r.getAttribute("Price");
+ Integer sales = (Integer)r.getAttribute("Sales");
+ Integer total = (Integer)r.getAttribute("Total");
+ prtStr = name + ", " + id + ", " +
+ price + ", " + sales + ", " + total;
+ } else {
+ Integer id = (Integer)r.getAttribute("SupId");
+ String name = (String)r.getAttribute("SupName");
+ String street = (String)r.getAttribute("Street");
+ String city = (String)r.getAttribute("City");
+ String state = (String)r.getAttribute("State");
+ String zip = (String)r.getAttribute("Zip");
+ prtStr = id + ", " + name + ", " +
+ street + ", " + city + ", " + state + ", " + zip;
+ }
+ System.out.println(prtStr);
+ }
+ }
+}
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/am/common/bc4j.xcfg b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/common/bc4j.xcfg
new file mode 100644
index 00000000..0a352109
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/am/common/bc4j.xcfg
@@ -0,0 +1,15 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">
+ <AppModuleConfigBag ApplicationName="uimodel.am.AppModule">
+ <AppModuleConfig name="AppModuleShared" jbo.project="model.Model" DeployPlatform="LOCAL" ApplicationName="uimodel.am.AppModule">
+ <AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.dynamicjdbccredentials="false" jbo.ampool.isuseexclusive="false" jbo.ampool.resetnontransactionalstate="false"/>
+ <Database jbo.locking.mode="optimistic" jbo.TypeMapEntries="Java" jbo.sql92.JdbcDriverClass="SQLite.JDBCDriver" jbo.SQLBuilder="SQL92"/>
+ <Security AppModuleJndiName="uimodel.am.AppModule"/>
+ <Custom JDBCDataSource="java:comp/env/jdbc/BDBConnectionDS"/>
+ </AppModuleConfig>
+ <AppModuleConfig name="AppModuleLocal" DeployPlatform="LOCAL" JDBCName="BDBConnection" jbo.project="model.Model" ApplicationName="uimodel.am.AppModule">
+ <Database jbo.sql92.JdbcDriverClass="SQLite.JDBCDriver" jbo.TypeMapEntries="Java" jbo.locking.mode="optimistic" jbo.SQLBuilder="SQL92"/>
+ <Security AppModuleJndiName="uimodel.am.AppModule"/>
+ </AppModuleConfig>
+ </AppModuleConfigBag>
+</BC4JConfig>
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/view/CoffeesVO.xml b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/CoffeesVO.xml
new file mode 100644
index 00000000..b25195b2
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/CoffeesVO.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
+<!---->
+<ViewObject
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="CoffeesVO"
+ Version="11.1.2.64.36"
+ SelectList="CoffeesEO.COF_NAME,
+ CoffeesEO.SUP_ID,
+ CoffeesEO.PRICE,
+ CoffeesEO.SALES,
+ CoffeesEO.TOTAL"
+ FromList="COFFEESFK CoffeesEO"
+ BindingStyle="JDBC"
+ CustomQuery="false"
+ PageIterMode="Full"
+ UseGlueCode="false">
+ <Properties>
+ <SchemaBasedProperties>
+ <LABEL
+ ResId="uimodel.view.CoffeesVO_LABEL"/>
+ </SchemaBasedProperties>
+ </Properties>
+ <ViewAccessor
+ Name="SuppliersVOAccessor"
+ ViewObjectName="uimodel.view.SuppliersVO"
+ RowLevelBinds="true"/>
+ <ListBinding
+ Name="LOV_SupId"
+ ListVOName="SuppliersVOAccessor"
+ ListRangeSize="-1"
+ NullValueFlag="start"
+ NullValueId="LOV_SupId_LOVUIHints_NullValueId"
+ MRUCount="0">
+ <AttrArray Name="AttrNames">
+ <Item Value="SupId"/>
+ </AttrArray>
+ <AttrArray Name="ListAttrNames">
+ <Item Value="SupId"/>
+ </AttrArray>
+ <AttrArray Name="ListDisplayAttrNames">
+ <Item Value="SupId"/>
+ </AttrArray>
+ <DisplayCriteria/>
+ </ListBinding>
+ <EntityUsage
+ Name="CoffeesEO"
+ Entity="model.entity.CoffeesEO"/>
+ <ViewAttribute
+ Name="CofName"
+ IsNotNull="true"
+ PrecisionRule="true"
+ EntityAttrName="CofName"
+ EntityUsage="CoffeesEO"
+ AliasName="COF_NAME"/>
+ <ViewAttribute
+ Name="SupId"
+ PrecisionRule="true"
+ EntityAttrName="SupId"
+ EntityUsage="CoffeesEO"
+ AliasName="SUP_ID"
+ LOVName="LOV_SupId"
+ DefaultValue="49">
+ <RecalcCondition><![CDATA[true]]></RecalcCondition>
+ <Properties>
+ <SchemaBasedProperties>
+ <CONTROLTYPE
+ Value="choice"/>
+ </SchemaBasedProperties>
+ </Properties>
+ </ViewAttribute>
+ <ViewAttribute
+ Name="Price"
+ PrecisionRule="true"
+ EntityAttrName="Price"
+ EntityUsage="CoffeesEO"
+ AliasName="PRICE"/>
+ <ViewAttribute
+ Name="Sales"
+ PrecisionRule="true"
+ EntityAttrName="Sales"
+ EntityUsage="CoffeesEO"
+ AliasName="SALES"/>
+ <ViewAttribute
+ Name="Total"
+ PrecisionRule="true"
+ EntityAttrName="Total"
+ EntityUsage="CoffeesEO"
+ AliasName="TOTAL"/>
+ <ResourceBundle>
+ <PropertiesBundle
+ PropertiesFile="model.ModelBundle"/>
+ </ResourceBundle>
+</ViewObject>
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVO.xml b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVO.xml
new file mode 100644
index 00000000..68a383c6
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVO.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
+<!---->
+<ViewObject
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="SuppliersVO"
+ Version="11.1.2.64.36"
+ SelectList="SuppliersEO.SUP_ID,
+ SuppliersEO.SUP_NAME,
+ SuppliersEO.STREET,
+ SuppliersEO.CITY,
+ SuppliersEO.STATE,
+ SuppliersEO.ZIP"
+ FromList="SUPPLIERSPK SuppliersEO"
+ BindingStyle="JDBC"
+ CustomQuery="false"
+ PageIterMode="Full"
+ UseGlueCode="false">
+ <Properties>
+ <SchemaBasedProperties>
+ <LABEL
+ ResId="uimodel.view.SuppliersVO_LABEL"/>
+ </SchemaBasedProperties>
+ </Properties>
+ <EntityUsage
+ Name="SuppliersEO"
+ Entity="model.entity.SuppliersEO"/>
+ <ViewAttribute
+ Name="SupId"
+ IsNotNull="true"
+ PrecisionRule="true"
+ EntityAttrName="SupId"
+ EntityUsage="SuppliersEO"
+ AliasName="SUP_ID"/>
+ <ViewAttribute
+ Name="SupName"
+ PrecisionRule="true"
+ EntityAttrName="SupName"
+ EntityUsage="SuppliersEO"
+ AliasName="SUP_NAME"/>
+ <ViewAttribute
+ Name="Street"
+ PrecisionRule="true"
+ EntityAttrName="Street"
+ EntityUsage="SuppliersEO"
+ AliasName="STREET"/>
+ <ViewAttribute
+ Name="City"
+ PrecisionRule="true"
+ EntityAttrName="City"
+ EntityUsage="SuppliersEO"
+ AliasName="CITY"/>
+ <ViewAttribute
+ Name="State"
+ PrecisionRule="true"
+ EntityAttrName="State"
+ EntityUsage="SuppliersEO"
+ AliasName="STATE"/>
+ <ViewAttribute
+ Name="Zip"
+ PrecisionRule="true"
+ EntityAttrName="Zip"
+ EntityUsage="SuppliersEO"
+ AliasName="ZIP"/>
+ <ViewLinkAccessor
+ Name="CoffeesVO"
+ ViewLink="uimodel.view.SuppliersVOToCoffeesVOLink"
+ Type="oracle.jbo.RowIterator"
+ IsUpdateable="false"/>
+ <ResourceBundle>
+ <PropertiesBundle
+ PropertiesFile="model.ModelBundle"/>
+ </ResourceBundle>
+</ViewObject>
diff --git a/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVOToCoffeesVOLink.xml b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVOToCoffeesVOLink.xml
new file mode 100644
index 00000000..f4907aa7
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/Model/src/uimodel/view/SuppliersVOToCoffeesVOLink.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="GBK" ?>
+<!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
+<!---->
+<ViewLink
+ xmlns="http://xmlns.oracle.com/bc4j"
+ Name="SuppliersVOToCoffeesVOLink"
+ Version="11.1.2.64.36">
+ <Properties>
+ <SchemaBasedProperties>
+ <LABEL
+ ResId="uimodel.view.SuppliersVOToCoffeesVOLink_LABEL"/>
+ </SchemaBasedProperties>
+ </Properties>
+ <ViewLinkDefEnd
+ Name="SuppliersVO"
+ Cardinality="1"
+ Source="true"
+ Owner="uimodel.view.SuppliersVO">
+ <DesignTime>
+ <Attr Name="_finderName" Value="SuppliersVO"/>
+ <Attr Name="_isUpdateable" Value="true"/>
+ <Attr Name="_minCardinality" Value="1"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="uimodel.view.SuppliersVO.SupId"/>
+ </AttrArray>
+ </ViewLinkDefEnd>
+ <ViewLinkDefEnd
+ Name="CoffeesVO"
+ Cardinality="-1"
+ Owner="uimodel.view.CoffeesVO">
+ <DesignTime>
+ <Attr Name="_finderName" Value="CoffeesVO"/>
+ <Attr Name="_isUpdateable" Value="true"/>
+ </DesignTime>
+ <AttrArray Name="Attributes">
+ <Item Value="uimodel.view.CoffeesVO.SupId"/>
+ </AttrArray>
+ </ViewLinkDefEnd>
+ <ResourceBundle>
+ <PropertiesBundle
+ PropertiesFile="model.ModelBundle"/>
+ </ResourceBundle>
+</ViewLink>
diff --git a/examples/sql/adf/EX_ADF/ViewController/ViewController.jpr b/examples/sql/adf/EX_ADF/ViewController/ViewController.jpr
new file mode 100644
index 00000000..e058e18b
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/ViewController.jpr
@@ -0,0 +1,472 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project">
+ <hash n="component-versions">
+ <value n="oracle.adfdt.controller.adfc.source.migration.AdfControllerSchemaMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdt.controller.common.migrator.ProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdt.controller.migrate.TrinidadDatabindingsProjectMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.adfdtinternal.dvt.datapresdt.migration.DVTDataMapMigrator" v="11.1.1.1.0.3"/>
+ <value n="oracle.adfdtinternal.model.ide.migration.ProjectMigrator" v="11.1.1.1.0.11.1.1"/>
+ <value n="oracle.adfdtinternal.model.ide.security.wizard.FormPageMigrator" v="11.1.1.0.0"/>
+ <value n="oracle.adfdtinternal.model.ide.security.wizard.JpsFilterMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.ADFNodeMigrator" v="11.1.1.1.0.5"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.PageDefinitionParameterValueMigrator" v="11.1.1.1.0.5"/>
+ <value n="oracle.adfdtinternal.model.ide.xmled.migration.WebXmlMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper" v="11.1.1.1.0.3"/>
+ <value n="oracle.adfdtinternal.view.rich.binding.migration.JarResourceMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.adfdtinternal.view.rich.migration.ComponentIdNodeMigratorHelper" v="11.1.1.1.0.01"/>
+ <value n="oracle.adfdtinternal.view.rich.migration.LibraryVersionMigrator" v="11.1.1.1.0.1"/>
+ <value n="oracle.ide.model.Project" v="11.1.2.0.0"/>
+ <value n="oracle.ide.model.ResourcePathsMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.ideimpl.model.TechnologyScopeUpdateMigrator" v="11.1.2.0.0.4"/>
+ <value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="11.1.1.0.1.5"/>
+ <value n="oracle.jbo.dt.migrate.ResourceBundlePathMigrator" v="11.1.1.0.1.5"/>
+ <value n="oracle.jbo.dt.migration.ServiceInterfaceMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdeveloper.library.ProjectLibraryMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdeveloper.model.OutputDirectoryMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.deploy.DeploymentProfilesMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.deploy.jps.JpsDataMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.jsp.JspMigrator" v="11.1.1"/>
+ <value n="oracle.jdevimpl.offlinedb.migration.OfflineDBProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.offlinedb.migration.OfflinePlSqlMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.resourcebundle.XliffAddin$XliffMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.jdevimpl.webapp.jsp.libraries.JspLibraryMigrator" v="11.1.1.1.4"/>
+ <value n="oracle.jdevimpl.webapp.WebAppContentSetNodeMigratorHelper" v="11.1.1"/>
+ <value n="oracle.jdevimpl.webapp.WebAppProjectNodeMigratorHelper" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.webservices.rest.migration.RestPathMigrator" v="11.1.2.0.0"/>
+ <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
+ <value n="oracle.modeler.bmmigrate.management.Migration" v="11.1.1.1.0"/>
+ <value n="oracle.toplink.workbench.addin.migration.PersistenceProjectMigrator" v="11.1.1.1.0"/>
+ <value n="oracle.toplink.workbench.addin.migration.TopLinkProjectMigrator" v="11.1.1.1.0"/>
+ </hash>
+ <list n="contentSets">
+ <string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/>
+ <string v="oracle.mds.internal.dt.ide.MDSLibraryCustCSProvider/mdsContentSet"/>
+ <string v="oracle.mds.internal.dt.ide.MDSADFLibVirtualNodeCSProvider/mdsLibVirtualNodeContentSet"/>
+ <string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/>
+ <string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/>
+ <string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/>
+ <string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/>
+ <string v="oracle.adfdtinternal.model.ide.settings.ADFMSettings/adfmContentSet"/>
+ <string v="oracle.toplink.workbench.addin/toplinkContentSet"/>
+ </list>
+ <value n="defaultPackage" v="view"/>
+ <hash n="oracle.ide.model.DependencyConfiguration">
+ <list n="dependencyList">
+ <hash>
+ <hash n="dependable">
+ <url n="sourceOwnerURL" path="../EX_ADF.jws"/>
+ <url n="sourceURL" path="../Model/Model.jpr"/>
+ </hash>
+ <value n="recognizerId" v="oracle.jdeveloper.library"/>
+ </hash>
+ </list>
+ </hash>
+ <hash n="oracle.ide.model.TechnologyScopeConfiguration">
+ <list n="technologyScope">
+ <string v="ADF_FACES"/>
+ <string v="ADFc"/>
+ <string v="HTML"/>
+ <string v="JAVASCRIPT"/>
+ <string v="JSF"/>
+ <string v="JSP"/>
+ <string v="Java"/>
+ <string v="TRINIDAD"/>
+ <string v="XML"/>
+ </list>
+ </hash>
+ <hash n="oracle.jdeveloper.compiler.OjcConfiguration">
+ <value n="internalEncoding" v="GBK"/>
+ <list n="Javac.commandline.optionlist">
+ <string v="-g"/>
+ <string v="-Xlint:all"/>
+ <string v="-Xlint:-cast"/>
+ <string v="-Xlint:-empty"/>
+ <string v="-Xlint:-fallthrough"/>
+ <string v="-Xlint:-path"/>
+ <string v="-Xlint:-processing"/>
+ <string v="-Xlint:-serial"/>
+ <string v="-Xlint:-unchecked"/>
+ </list>
+ <value n="webIANAEncoding" v="UTF-8"/>
+ </hash>
+ <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
+ <hash n="profileDefinitions">
+ <hash n="EX_ADF_Project1_webapp">
+ <hash n="appletArchives"/>
+ <hash n="appletFiles">
+ <value n="autoInclude" v="true"/>
+ <list n="selectionFilters">
+ <string v="oracle.jdevimpl.deploy.common.JavaSelectionFilter"/>
+ </list>
+ </hash>
+ <hash n="archiveOptions">
+ <value n="hasManifest" v="false"/>
+ </hash>
+ <value n="enterpriseAppName" v="EX_ADF_Project1_webapp"/>
+ <hash n="fileGroups">
+ <list n="groups">
+ <hash>
+ <list n="contributors">
+ <hash>
+ <value n="type" v="5"/>
+ </hash>
+ </list>
+ <value n="displayName" v="Web Files"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="DefaultFilters" v=""/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="web-files"/>
+ <value n="type" v="1"/>
+ </hash>
+ <hash>
+ <list n="contributors">
+ <hash>
+ <value n="type" v="2"/>
+ </hash>
+ <hash>
+ <value n="type" v="7"/>
+ </hash>
+ </list>
+ <value n="displayName" v="WEB-INF/classes"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="DefaultFilters" v=""/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="project-output"/>
+ <value n="targetWithinJar" v="WEB-INF/classes"/>
+ <value n="type" v="1"/>
+ </hash>
+ <hash>
+ <value n="displayName" v="WEB-INF/lib"/>
+ <hash n="filters">
+ <list n="rules">
+ <hash>
+ <value n="pattern" v="**"/>
+ </hash>
+ </list>
+ </hash>
+ <value n="internalName" v="libraries"/>
+ <value n="targetWithinJar" v="WEB-INF/lib"/>
+ <value n="type" v="3"/>
+ </hash>
+ </list>
+ </hash>
+ <url n="jarURL" path="deploy/EX_ADF_Project1_webapp.war"/>
+ <hash n="libraryDependencies">
+ <value n="IncludeLibrariesFromOtherContainers" v="true"/>
+ </hash>
+ <value n="profileClass" v="oracle.jdeveloper.deploy.war.WarProfile"/>
+ <value n="profileName" v="EX_ADF_Project1_webapp"/>
+ </hash>
+ </hash>
+ <list n="profileList">
+ <string v="EX_ADF_Project1_webapp"/>
+ </list>
+ </hash>
+ <hash n="oracle.jdeveloper.model.J2eeSettings">
+ <value n="j2eeWebAppName" v="EX_ADF-ViewController-webapp"/>
+ <value n="j2eeWebContextRoot" v="EX_ADF-ViewController-context-root"/>
+ </hash>
+ <hash n="oracle.jdevimpl.config.JProjectLibraries">
+ <list n="exportedReferences">
+ <hash>
+ <value n="id" v="JSP Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JSF 2.0"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JSTL 1.2"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Page Flow Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Controller Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Controller Schema"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Faces Runtime 11"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Common Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Web Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime Dependencies"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Beanutils 1.6"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Logging 1.0.4"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Collections 3.1"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Databinding Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Databinding MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JPS Designtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ </list>
+ <list n="libraryReferences">
+ <hash>
+ <value n="id" v="JSP Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JSF 2.0"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JSTL 1.2"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Page Flow Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Controller Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Controller Schema"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Faces Runtime 11"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Common Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF Web Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="MDS Runtime Dependencies"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Beanutils 1.6"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Logging 1.0.4"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="Commons Collections 3.1"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Databinding Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="ADF DVT Faces Databinding MDS Runtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ <hash>
+ <value n="id" v="JPS Designtime"/>
+ <value n="isJDK" v="false"/>
+ </hash>
+ </list>
+ </hash>
+ <hash n="oracle.jdevimpl.config.JProjectPaths">
+ <url n="outputDirectory" path="classes/"/>
+ </hash>
+ <hash n="oracle.jdevimpl.webapp.facelets.libraries.ProjectFaceletsTagLibraries">
+ <list n="facelets-tag-libraries">
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSF Core"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="JSF Core"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/facelets_jsf_core.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsf/core"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSF HTML"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="JSF HTML"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/html_basic.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsf/html"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="Facelets Composite"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="Facelets Composite"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/composite.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsf/composite"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="Facelets"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="Facelets"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/ui.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsf/facelets"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="Mojarra Ext Utils"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="Mojarra Ext Utils"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/META-INF/mojarra_ext.taglib.xml"/>
+ <value n="URI" v="http://mojarra.dev.java.net/mojarra_ext"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSTL"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="JSTL"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/jstl-core.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsp/jstl/core"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSTL Functions"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="name" v="JSTL Functions"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/com/sun/faces/metadata/taglib/jstl-fn.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/jsp/jstl/functions"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="ADF Faces Components"/>
+ <value n="version" v="11"/>
+ </hash>
+ <value n="name" v="ADF Faces Components"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar!/META-INF/afu.taglib.xml"/>
+ <value n="URI" v="http://xmlns.oracle.com/adf/faces/rich"/>
+ <value n="version" v="11"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSF Compatibility Tags for Facelets"/>
+ <value n="version" v="11"/>
+ </hash>
+ <value n="name" v="JSF Compatibility Tags for Facelets"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar!/META-INF/jsp.taglib.xml"/>
+ <value n="URI" v="http://java.sun.com/JSP/Page"/>
+ <value n="version" v="11"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="ADF Faces Component Tags"/>
+ <value n="version" v="11"/>
+ </hash>
+ <value n="name" v="ADF Faces Component Tags"/>
+ <value n="taglibURL" v="@oracle.home@../oracle_common/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar!/META-INF/component.taglib.xml"/>
+ <value n="URI" v="http://xmlns.oracle.com/adf/faces/rich/component"/>
+ <value n="version" v="11"/>
+ </hash>
+ </list>
+ </hash>
+ <hash n="oracle.jdevimpl.webapp.jsp.libraries.model.ProjectTagLibraries">
+ <list n="tag-libraries">
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSF Core"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="jspVersion" v="2.1"/>
+ <value n="name" v="JSF Core"/>
+ <value n="tldURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/META-INF/jsf_core.tld"/>
+ <value n="URI" v="http://java.sun.com/jsf/core"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="JSF HTML"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <value n="jspVersion" v="2.1"/>
+ <value n="name" v="JSF HTML"/>
+ <value n="tldURL" v="@oracle.home@../oracle_common/modules/oracle.jsf_2.0/jsf-impl.jar!/META-INF/html_basic.tld"/>
+ <value n="URI" v="http://java.sun.com/jsf/html"/>
+ <value n="version" v="2.0"/>
+ </hash>
+ <hash>
+ <hash n="baseLibrary">
+ <value n="name" v="ADF Faces Components"/>
+ <value n="version" v="11"/>
+ </hash>
+ <value n="jspVersion" v="1.2"/>
+ <value n="name" v="ADF Faces Components"/>
+ <value n="tldURL" v="@oracle.home@../oracle_common/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar!/META-INF/afu.tld"/>
+ <value n="URI" v="http://xmlns.oracle.com/adf/faces/rich"/>
+ <value n="version" v="11"/>
+ </hash>
+ </list>
+ </hash>
+</jpr:project>
diff --git a/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/adfc-config.xml b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/adfc-config.xml
new file mode 100644
index 00000000..5d5c05bf
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/adfc-config.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="GBK" ?>
+<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2"></adfc-config>
diff --git a/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/faces-config.xml b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/faces-config.xml
new file mode 100644
index 00000000..17e93a16
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/faces-config.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="GBK"?>
+<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee">
+ <application>
+ <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
+ </application>
+</faces-config> \ No newline at end of file
diff --git a/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/trinidad-config.xml b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/trinidad-config.xml
new file mode 100644
index 00000000..1fa16dba
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/trinidad-config.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="GBK"?>
+<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
+ <skin-family>fusionFx</skin-family>
+ <skin-version>v2.1</skin-version>
+</trinidad-config> \ No newline at end of file
diff --git a/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/web.xml b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/web.xml
new file mode 100644
index 00000000..49e4ebcd
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/public_html/WEB-INF/web.xml
@@ -0,0 +1,137 @@
+<?xml version = '1.0' encoding = 'GBK'?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
+ <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
+ <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Security precaution to prevent clickjacking: bust frames if the ancestor window domain(protocol, host, and port) and the frame domain are different. Another options for this parameter are always and never.</description>
+ <param-name>org.apache.myfaces.trinidad.security.FRAME_BUSTING</param-name>
+ <param-value>differentOrigin</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_SKIP_XML_INSTRUCTIONS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_DECORATORS</param-name>
+ <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfTagDecorator</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>
+ <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver</param-value>
+ </context-param>
+ <filter>
+ <filter-name>JpsFilter</filter-name>
+ <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
+ <init-param>
+ <param-name>enable.anonymous</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter>
+ <filter>
+ <filter-name>trinidad</filter-name>
+ <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>ServletADFFilter</filter-name>
+ <filter-class>oracle.adf.share.http.ServletADFFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>JpsFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>trinidad</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ServletADFFilter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>resources</servlet-name>
+ <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>BIGRAPHSERVLET</servlet-name>
+ <servlet-class>oracle.adf.view.faces.bi.webapp.GraphServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>BIGAUGESERVLET</servlet-name>
+ <servlet-class>oracle.adf.view.faces.bi.webapp.GaugeServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>MapProxyServlet</servlet-name>
+ <servlet-class>oracle.adf.view.faces.bi.webapp.MapProxyServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>resources</servlet-name>
+ <url-pattern>/adf/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>resources</servlet-name>
+ <url-pattern>/afr/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>BIGRAPHSERVLET</servlet-name>
+ <url-pattern>/servlet/GraphServlet/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>BIGAUGESERVLET</servlet-name>
+ <url-pattern>/servlet/GaugeServlet/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>MapProxyServlet</servlet-name>
+ <url-pattern>/mapproxy/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>resources</servlet-name>
+ <url-pattern>/bi/*</url-pattern>
+ </servlet-mapping>
+ <mime-mapping>
+ <extension>swf</extension>
+ <mime-type>application/x-shockwave-flash</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>amf</extension>
+ <mime-type>application/x-amf</mime-type>
+ </mime-mapping>
+</web-app>
diff --git a/examples/sql/adf/EX_ADF/ViewController/src/META-INF/adf-settings.xml b/examples/sql/adf/EX_ADF/ViewController/src/META-INF/adf-settings.xml
new file mode 100644
index 00000000..7209ca20
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/ViewController/src/META-INF/adf-settings.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="GBK" ?>
+<adf-settings xmlns="http://xmlns.oracle.com/adf/settings"></adf-settings>
diff --git a/examples/sql/adf/EX_ADF/src/META-INF/jps-config.xml b/examples/sql/adf/EX_ADF/src/META-INF/jps-config.xml
new file mode 100644
index 00000000..12fa6cfa
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/src/META-INF/jps-config.xml
@@ -0,0 +1,18 @@
+<?xml version = '1.0' encoding = 'GBK'?>
+<jpsConfig xmlns="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd jps-config-11_1.xsd">
+ <serviceProviders>
+ <serviceProvider class="oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider" name="credstore.provider" type="CREDENTIAL_STORE">
+ <description>Credential Store Service Provider</description>
+ </serviceProvider>
+ </serviceProviders>
+ <serviceInstances>
+ <serviceInstance provider="credstore.provider" name="credstore">
+ <property value="./" name="location"/>
+ </serviceInstance>
+ </serviceInstances>
+ <jpsContexts default="EX_ADF">
+ <jpsContext name="EX_ADF">
+ <serviceInstanceRef ref="credstore"/>
+ </jpsContext>
+ </jpsContexts>
+</jpsConfig> \ No newline at end of file
diff --git a/examples/sql/adf/EX_ADF/src/META-INF/weblogic-application.xml b/examples/sql/adf/EX_ADF/src/META-INF/weblogic-application.xml
new file mode 100644
index 00000000..3c29dbfa
--- /dev/null
+++ b/examples/sql/adf/EX_ADF/src/META-INF/weblogic-application.xml
@@ -0,0 +1,14 @@
+<?xml version = '1.0' encoding = 'GBK'?>
+<weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.1/weblogic-application.xsd"
+ xmlns="http://xmlns.oracle.com/weblogic/weblogic-application">
+ <listener>
+ <listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>oracle.mds.lcm.weblogic.WLLifecycleListener</listener-class>
+ </listener>
+ <library-ref>
+ <library-name>adf.oracle.domain</library-name>
+ </library-ref>
+</weblogic-application>
diff --git a/examples/sql/adf/README b/examples/sql/adf/README
new file mode 100644
index 00000000..316403cb
--- /dev/null
+++ b/examples/sql/adf/README
@@ -0,0 +1,117 @@
+The BDB JDBC ADF example was tested using both JDeveloper 11g (11.1.2.4.0)
+and JDeveloper 12c (12.1.2.0.0).
+
+=================== PREPARING THE ENVIRONMENT ================
+
+1. Install JDeveloper.
+
+2. Build the BDB JDBC driver and include its path in the system CLASSPATH
+and LD_LIBRARY_PATH environment variables. Please refer to the Berkeley DB
+Installation Guide for instructions on building the JDBC driver.
+
+
+=================== OPENING THE SAMPLE =======================
+
+In JDeveloper, open <example>/EX_ADF.jws. If you are using JDeveloper 12c,
+it will ask you to migrate the application to 12c automatically after you
+open the file. In this event, please choose "yes" to migrate the example.
+
+
+=================== RUNNING ==================================
+
+1. Add the BDB JDBC path to project properties.
+Select Application -> project properties -> Libraries and Classpath ->
+Add JAR/Directory -> locate the path of BDB JDBC -> OK.
+
+2. Initialize the database schema.
+Open <example>/Model/src/dbscheme/PrimaryKeySuppliers.java and
+<example>/Model/src/dbscheme/ForeignKeysCoffees.java, and replace "path_to_db"
+with the location of the database file you want to store. Then run the 2 java files
+in order.
+
+3. Modify the database connection.
+Select Application Resources -> Connections -> Database ->
+right click on BDBConnection -> properties -> JDBC URL, and replace
+"absolute_path_to_db" with the path of the database file you just created in the
+last step. Note that the path in the connection JDBC URL must be absolute,
+otherwise JDeveloper can not locate the database file.
+
+If the password in the connection properties panel is empty,
+enter "myPassword".
+
+4. You can run the example in 2 ways.
+a) Run with tester.
+Expand uimode.am in the project panel and run AppModule. You can select/insert/
+update/delete rows in the tester.
+b) Run without tester.
+Expand uimode.am in the project panel and run TestClient.java. This is a Java
+program demonstrating how to perform select/insert/update/delete operations
+by using ADF classes and APIs.
+
+
+=================== LIST OF FILES ================
+
+All files needed by the example are located under examples/sql/adf/EX_ADF. You
+need to maintain its file and directory structure. If you want to run the
+example in the location other than examples/sql/adf/EX_ADF, please copy the
+entire example directory (examples/sql/adf/EX_ADF) into place.
+
+Here is a brief description of files under examples/sql/adf/EX_ADF.
+
+1. Application file
+ EX_ADF.jws
+
+2. Application configurations and connection properties
+ .adf/META-INF/adf-config.xml
+ .adf/META-INF/connections.xml
+ src/META-INF/jps-config.xml
+ src/META-INF/weblogic-application.xml
+
+3. Model project
+This is one of the default ADF application projects.
+
+a) Project file
+ Model/Model.jpr
+
+b) ADF Business Component
+ Model/src/model/Model.jpx
+ Model/src/model/ModelBundle.properties
+
+c) Database schema
+ Model/src/dbschema/ForeignKeysCoffees.java
+ Model/src/dbschema/PrimaryKeysSuppliers.java
+
+d) Entity object
+ Model/src/model/entity/CoffeesEO.xml
+ Model/src/model/entity/CoffeesEOImpl.java
+ Model/src/model/entity/SuppliersEO.xml
+ Model/src/model/entity/SuppliersEOImpl.java
+
+e) View object and link
+ Model/src/uimodel/view/CoffeesVO.xml
+ Model/src/uimodel/view/SuppliersVO.xml
+ Model/src/uimodel/view/SuppliersVOToCoffeesVOLink.xml
+
+f) Association
+ Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml
+
+g) Application Module configurations
+ Model/src/uimodel/am/AppModule.xml
+ Model/src/uimodel/am/common/bc4j.xcfg
+
+h) Sample Java program
+ Model/src/uimodel/am/TestClient.java
+
+4. ViewController project
+This is one of the default ADF application projects.
+
+a) Project file
+ ViewController/ViewController.jpr
+
+b) Project configurations
+ ViewController/public_html/WEB-INF/adfc-config.xml
+ ViewController/public_html/WEB-INF/faces-config.xml
+ ViewController/public_html/WEB-INF/trinidad-config.xml
+ ViewController/public_html/WEB-INF/web.xml
+ ViewController/src/META-INF/adf-settings.xml
+
diff --git a/examples/sql/c/ex_sql_binding.c b/examples/sql/c/ex_sql_binding.c
index 339c3804..7032084d 100644
--- a/examples/sql/c/ex_sql_binding.c
+++ b/examples/sql/c/ex_sql_binding.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_fts3.c b/examples/sql/c/ex_sql_fts3.c
index cc2f5211..e511f23b 100644
--- a/examples/sql/c/ex_sql_fts3.c
+++ b/examples/sql/c/ex_sql_fts3.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_index.c b/examples/sql/c/ex_sql_index.c
index c0f411c7..bbf41211 100644
--- a/examples/sql/c/ex_sql_index.c
+++ b/examples/sql/c/ex_sql_index.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_load.c b/examples/sql/c/ex_sql_load.c
index c57f0104..7d5a1a98 100644
--- a/examples/sql/c/ex_sql_load.c
+++ b/examples/sql/c/ex_sql_load.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_multi_thread.c b/examples/sql/c/ex_sql_multi_thread.c
index b83b8e5a..83e641a3 100644
--- a/examples/sql/c/ex_sql_multi_thread.c
+++ b/examples/sql/c/ex_sql_multi_thread.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_query.c b/examples/sql/c/ex_sql_query.c
index d8428f64..e1043a4b 100644
--- a/examples/sql/c/ex_sql_query.c
+++ b/examples/sql/c/ex_sql_query.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_rtree.c b/examples/sql/c/ex_sql_rtree.c
index 29d011ab..d0622bf5 100644
--- a/examples/sql/c/ex_sql_rtree.c
+++ b/examples/sql/c/ex_sql_rtree.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_savepoint.c b/examples/sql/c/ex_sql_savepoint.c
index 8f0cfdda..bf1cd6f4 100644
--- a/examples/sql/c/ex_sql_savepoint.c
+++ b/examples/sql/c/ex_sql_savepoint.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_statement.c b/examples/sql/c/ex_sql_statement.c
index 1e962f30..b8d2fc32 100644
--- a/examples/sql/c/ex_sql_statement.c
+++ b/examples/sql/c/ex_sql_statement.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_transaction.c b/examples/sql/c/ex_sql_transaction.c
index 821fdf70..3d09ba3a 100644
--- a/examples/sql/c/ex_sql_transaction.c
+++ b/examples/sql/c/ex_sql_transaction.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_utils.c b/examples/sql/c/ex_sql_utils.c
index 0b8a6578..42cfb848 100644
--- a/examples/sql/c/ex_sql_utils.c
+++ b/examples/sql/c/ex_sql_utils.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/c/ex_sql_utils.h b/examples/sql/c/ex_sql_utils.h
index d1ec640c..b28bd44f 100644
--- a/examples/sql/c/ex_sql_utils.h
+++ b/examples/sql/c/ex_sql_utils.h
@@ -1,7 +1,7 @@
/*
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997-2012 Oracle. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/excxx_wce_sql.cpp b/examples/sql/wce_sql/excxx_wce_sql.cpp
index 4e58df67..7ccb0b90 100644
--- a/examples/sql/wce_sql/excxx_wce_sql.cpp
+++ b/examples/sql/wce_sql/excxx_wce_sql.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/excxx_wce_sql.h b/examples/sql/wce_sql/excxx_wce_sql.h
index e9713b84..03b6dfc4 100644
--- a/examples/sql/wce_sql/excxx_wce_sql.h
+++ b/examples/sql/wce_sql/excxx_wce_sql.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/excxx_wce_sqlDlg.cpp b/examples/sql/wce_sql/excxx_wce_sqlDlg.cpp
index 8be4e134..10d51f97 100644
--- a/examples/sql/wce_sql/excxx_wce_sqlDlg.cpp
+++ b/examples/sql/wce_sql/excxx_wce_sqlDlg.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/excxx_wce_sqlDlg.h b/examples/sql/wce_sql/excxx_wce_sqlDlg.h
index 18b5451c..b401577d 100644
--- a/examples/sql/wce_sql/excxx_wce_sqlDlg.h
+++ b/examples/sql/wce_sql/excxx_wce_sqlDlg.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/resourceppc.h b/examples/sql/wce_sql/resourceppc.h
index f42e871b..240862ca 100644
--- a/examples/sql/wce_sql/resourceppc.h
+++ b/examples/sql/wce_sql/resourceppc.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/stdafx.cpp b/examples/sql/wce_sql/stdafx.cpp
index 152e3d68..be51aa13 100644
--- a/examples/sql/wce_sql/stdafx.cpp
+++ b/examples/sql/wce_sql/stdafx.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/sql/wce_sql/stdafx.h b/examples/sql/wce_sql/stdafx.h
index 68912e4e..676cf0c6 100644
--- a/examples/sql/wce_sql/stdafx.h
+++ b/examples/sql/wce_sql/stdafx.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2012, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/examples/stl/StlAccessExample.cpp b/examples/stl/StlAccessExample.cpp
index c533c63f..82f6f0a0 100644
--- a/examples/stl/StlAccessExample.cpp
+++ b/examples/stl/StlAccessExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/StlAdvancedFeatures.cpp b/examples/stl/StlAdvancedFeatures.cpp
index ae4e6f4d..71d82638 100644
--- a/examples/stl/StlAdvancedFeatures.cpp
+++ b/examples/stl/StlAdvancedFeatures.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/StlAdvancedFeatures.h b/examples/stl/StlAdvancedFeatures.h
index 36eba519..4d0533fc 100644
--- a/examples/stl/StlAdvancedFeatures.h
+++ b/examples/stl/StlAdvancedFeatures.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/StlTpcbExample.cpp b/examples/stl/StlTpcbExample.cpp
index 785f7011..1b543ad3 100644
--- a/examples/stl/StlTpcbExample.cpp
+++ b/examples/stl/StlTpcbExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/StlTransactionGuideExample.cpp b/examples/stl/StlTransactionGuideExample.cpp
index 85b681cf..35e6fabb 100644
--- a/examples/stl/StlTransactionGuideExample.cpp
+++ b/examples/stl/StlTransactionGuideExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/repquote/StlRepConfigInfo.cpp b/examples/stl/repquote/StlRepConfigInfo.cpp
index 13ded886..09cba4ee 100644
--- a/examples/stl/repquote/StlRepConfigInfo.cpp
+++ b/examples/stl/repquote/StlRepConfigInfo.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/repquote/StlRepConfigInfo.h b/examples/stl/repquote/StlRepConfigInfo.h
index 2a1a6883..ab77c015 100644
--- a/examples/stl/repquote/StlRepConfigInfo.h
+++ b/examples/stl/repquote/StlRepConfigInfo.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/examples/stl/repquote/StlRepQuoteExample.cpp b/examples/stl/repquote/StlRepQuoteExample.cpp
index 5e7f4210..537c80bc 100644
--- a/examples/stl/repquote/StlRepQuoteExample.cpp
+++ b/examples/stl/repquote/StlRepQuoteExample.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/