public static void main()

in src/main/java/software/amazon/qldb/tutorial/RegisterDriversLicense.java [135:170]


    public static void main(final String... args) {
        final Person newPerson = new Person(
            "Kate",
            "Mulberry",
            SampleData.convertToLocalDate("1995-02-09"),
            "AQQ17B2342",
            "Passport",
            "22 Commercial Drive, Blaine, WA, 97722"
        );
        ConnectToLedger.getDriver().execute(txn -> {
            final String documentId;
            final List<String> documentIdList;
            try {
                if (personAlreadyExists(txn, newPerson.getGovId())) {
                    log.info("Person with this GovId already exists.");
                    documentId = Person.getDocumentIdByGovId(txn, newPerson.getGovId());
                } else {
                    documentIdList = InsertDocument.insertDocuments(txn, Constants.PERSON_TABLE_NAME,
                            Collections.singletonList(newPerson));
                    documentId = documentIdList.get(0);
                }
            } catch (IOException ioe) {
                throw new IllegalStateException(ioe);
            }

            final DriversLicense newLicense = new DriversLicense(
                    documentId,
                    "112 360 PXJ",
                    "Full",
                    SampleData.convertToLocalDate("2018-06-30"),
                    SampleData.convertToLocalDate("2022-10-30")
            );

            registerNewDriversLicense(txn, newPerson.getGovId(), newLicense, documentId);
        });
    }