@ SuppressWarnings ( "unused" ) // called through reflection by RequestServer public JobsV3 list ( int version , JobsV3 s ) { Job [ ] jobs = Job . jobs ( ) ; // Jobs j = new Jobs(); // j._jobs = Job.jobs(); // PojoUtils.copyProperties(s, j, PojoUtils.FieldNaming.ORIGIN_HAS_UNDERSCORES); s . jobs = new JobV3 [ jobs . length ] ; int i = 0 ; for ( Job j : jobs ) { try { s . jobs [ i ] = ( JobV3 ) SchemaServer . schema ( version , j ) . fillFromImpl ( j ) ; } // no special schema for this job subclass, so fall back to JobV3 catch ( H2ONotFoundArgumentException e ) { s . jobs [ i ] = new JobV3 ( ) . fillFromImpl ( j ) ; } i ++ ; // Java does the increment before the function call which throws?! } return s ; }
Impl class for a collection of jobs ; only used in the API to make it easier to cons up the jobs array via the magic of PojoUtils . copyProperties .