Writes SQL from Java classes