Could you not just put a unique constraint on the database?
The column annotation provides some attributes you might find handy:
Code:
@Column(
name="columnName";
boolean unique() default false;
boolean nullable() default true;
boolean insertable() default true;
boolean updatable() default true;
String columnDefinition() default "";
String table() default "";
int length() default 255;
int precision() default 0;
int scale() default 0;
)
or
<property .... unique="true" />
Tutorial on Mapping Columns with Hibernate3