IN PROGRESS - issue BATCH-476: samples cleanup

http://jira.springframework.org/browse/BATCH-476
This commit is contained in:
robokaso
2008-03-18 13:05:09 +00:00
parent 331724bf39
commit 4a217a0611
5 changed files with 4 additions and 38 deletions

View File

@@ -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;

View File

@@ -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;
}
}