public EmailItem getById()

in src/main/java/transcribe/DataService.java [14:32]


	public EmailItem getById(String key) {
		System.out.println("DataService Get function called...");
		EmailItem emailItem = new EmailItem();
		try {
			Util util = new Util();
			DynamoDB dynamoDB = util.getDynamoDB();
			Table table = dynamoDB.getTable(dynamoDBTable);
			PrimaryKey pk = new PrimaryKey();
			pk.addComponent("MSG_ID", key);
			Item item = table.getItem(pk);
			emailItem.setEmail((String)item.get("EMAIL"));
			emailItem.setMsgId((String)item.get("MSG_ID"));
			emailItem.setFileName((String)item.get("FILE_NAME"));
		}catch(Exception e) {
			System.out.println(e.getMessage());
		}
		System.out.println("DataService Get function completed...");
		return emailItem;
	}