01: //$Id: EnhancedUserType.java 5956 2005-02-28 06:07:06Z oneovthafew $
02: package org.hibernate.usertype;
03:
04: /**
05: * A custom type that may function as an identifier or
06: * discriminator type, or may be marshalled to and from
07: * an XML document
08: *
09: * @author Gavin King
10: */
11: public interface EnhancedUserType extends UserType {
12: /**
13: * Return an SQL literal representation of the value
14: */
15: public String objectToSQLString(Object value);
16:
17: /**
18: * Return a string representation of this value, as it
19: * should appear in an XML document
20: */
21: public String toXMLString(Object value);
22:
23: /**
24: * Parse a string representation of this value, as it
25: * appears in an XML document
26: */
27: public Object fromXMLString(String xmlValue);
28: }
|