Creating a document in Java™ classes
Use createDocument in Database to create a new document.
See "Creating an item and assigning values" for instructions on adding item values.
Use save in Document to post the new document to the database in storage. Otherwise, the new document is lost when the program exits.