/** Generates Java classes for a schema. */
public static void compileSchema(File src, File dest) throws IOException {
log.info("Compiling " + src + " to " + dest );
GoraDynamoDBCompiler compiler = new GoraDynamoDBCompiler(dest);
DynamoDBMapping dynamoDBMap = compiler.readMapping(src);
if (dynamoDBMap.getTables().isEmpty()) throw new IllegalStateException("There are not tables defined.");
for(String tableName : dynamoDBMap.getTables().keySet()){
compiler.compile(tableName, dynamoDBMap.getKeySchema(tableName), dynamoDBMap.getItems(tableName));
}
}