1 //$Id: UserVersionType.java,v 1.2 2005/02/12 07:19:49 steveebersole Exp $ 2 package org.hibernate.usertype; 3 4 import java.util.Comparator; 5 6 /** 7 * A user type that may be used for a version property 8 * 9 * @author Gavin King 10 */ 11 public interface UserVersionType extends UserType, Comparator { 12 /** 13 * Generate an initial version. 14 * @return an instance of the type 15 */ 16 public Object seed(); 17 /** 18 * Increment the version. 19 * @param current the current version 20 * @return an instance of the type 21 */ 22 public Object next(Object current); 23 24 } 25