IN PROGRESS - issue BATCH-476: samples cleanup
http://jira.springframework.org/browse/BATCH-476
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.tasklet;
|
||||
package org.springframework.batch.sample.item.reader;
|
||||
|
||||
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
@@ -1,35 +0,0 @@
|
||||
package org.springframework.batch.sample.mapping;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.Game;
|
||||
|
||||
public class GameMapper implements FieldSetMapper {
|
||||
|
||||
public Object mapLine(FieldSet fs) {
|
||||
|
||||
if(fs == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
Game game = new Game();
|
||||
game.setId(fs.readString("id"));
|
||||
game.setYear(fs.readInt("year"));
|
||||
game.setTeam(fs.readString("team"));
|
||||
game.setWeek(fs.readInt("week"));
|
||||
game.setOpponent(fs.readString("opponent"));
|
||||
game.setCompletes(fs.readInt("completes"));
|
||||
game.setAttempts(fs.readInt("attempts"));
|
||||
game.setPassingYards(fs.readInt("passingYards"));
|
||||
game.setPassingTd(fs.readInt("passingTd"));
|
||||
game.setInterceptions(fs.readInt("interceptions"));
|
||||
game.setRushes(fs.readInt("rushes"));
|
||||
game.setRushYards(fs.readInt("rushYards"));
|
||||
game.setReceptions(fs.readInt("receptions", 0));
|
||||
game.setReceptionYards(fs.readInt("receptionYards"));
|
||||
game.setTotalTd(fs.readInt("totalTd"));
|
||||
|
||||
return game;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user