1 package org.jbpm.context.exe.converter; 2 3 import java.util.*; 4 import org.jbpm.context.exe.*; 5 6 public class DateToLongConverter implements Converter { 7 8 private static final long serialVersionUID = 1L; 9 10 public boolean supports(Class clazz) { 11 return (clazz==Date.class); 12 } 13 14 public Object convert(Object o) { 15 return new Long (((Date)o).getTime()); 16 } 17 18 public Object revert(Object o) { 19 return new Date(((Long )o).longValue()); 20 } 21 } 22 | Popular Tags |