Setting Java class as persistent in parsing