br.com.arsmachina.example.web.encoder.primarykey
Class TaskPrimaryKeyEncoder

java.lang.Object
  extended by br.com.arsmachina.example.web.encoder.primarykey.TaskPrimaryKeyEncoder
All Implemented Interfaces:
PrimaryKeyEncoder<String,Task>

public class TaskPrimaryKeyEncoder
extends Object
implements PrimaryKeyEncoder<String,Task>

A PrimaryKeyEncoder for Task that encodes the id's in base 36. A value is added just to provide higher values.

Author:
Thiago H. de Paula Figueiredo

Constructor Summary
TaskPrimaryKeyEncoder(TaskController taskController)
          Single constructor of this class.
 
Method Summary
 void prepareForKeys(List<String> keys)
           
 String toKey(Task task)
           
 Task toValue(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskPrimaryKeyEncoder

public TaskPrimaryKeyEncoder(TaskController taskController)
Single constructor of this class.

Parameters:
taskController -
Method Detail

prepareForKeys

public void prepareForKeys(List<String> keys)
Specified by:
prepareForKeys in interface PrimaryKeyEncoder<String,Task>

toKey

public String toKey(Task task)
Specified by:
toKey in interface PrimaryKeyEncoder<String,Task>

toValue

public Task toValue(String key)
Specified by:
toValue in interface PrimaryKeyEncoder<String,Task>


Copyright © 2008-2009 Thiago H. de Paula Figueiredo. All Rights Reserved.