Jerry Brown , the former governor of California and the current mayor of Oakland , handily won a Democratic primary for state attorney general on Tuesday , setting up a fight with a lesser-known but well-financed Republican candidate .