public PatchSetAttribute asPatchSetAttribute(RevWalk revWalk,Change change,PatchSet patchSet){
  try (ReviewDb db=schema.open()){
    return asPatchSetAttribute(db,revWalk,change,patchSet);
  }
 catch (  OrmException e) {
    log.error("Cannot open database connection",e);
    return new PatchSetAttribute();
  }
}

public PatchSetAttribute asPatchSetAttribute ( RevWalk revWalk , Change change , PatchSet patchSet ) { try ( ReviewDb db = schema . open ( ) ) { return asPatchSetAttribute ( db , revWalk , change , patchSet ) ; } catch ( OrmException e ) { log . error ( "Cannot open database connection" , e ) ; return new PatchSetAttribute ( ) ; } }
create a patchsetattribute for the given patchset suitable for serialization to json .
