The information in this topic may be out of date. The current SDK reference guide has moved here.
Use this method to retrieve the unique id of the batch.
String value = batchInfo.getId();