KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > type > VersionType


1 //$Id: VersionType.java,v 1.3 2005/02/16 12:50:19 oneovthafew Exp $
2
package org.hibernate.type;
3
4 import java.util.Comparator JavaDoc;
5
6 /**
7  * A <tt>Type</tt> that may be used to version data.
8  * @author Gavin King
9  */

10 public interface VersionType extends Type {
11     /**
12      * Generate an initial version.
13      * @return an instance of the type
14      */

15     public Object JavaDoc seed();
16     /**
17      * Increment the version.
18      * @param current the current version
19      * @return an instance of the type
20      */

21     public Object JavaDoc next(Object JavaDoc current);
22     /**
23      * Get a comparator for the version numbers
24      */

25     public Comparator JavaDoc getComparator();
26     
27     public boolean isEqual(Object JavaDoc x, Object JavaDoc y);
28 }
29
30
31
32
33
34
35
Popular Tags