br.com.arsmachina.example.web.encoder.primarykey
Class TaskPrimaryKeyEncoder
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskPrimaryKeyEncoder
public TaskPrimaryKeyEncoder(TaskController taskController)
- Single constructor of this class.
- Parameters:
taskController -
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.