Methods Summary |
---|
public int | compare(java.lang.Object x, java.lang.Object y, org.hibernate.EntityMode entityMode)
return x.toString().compareTo( y.toString() );
|
public java.lang.Object | fromStringValue(java.lang.String string)
if (string == null) {
return null;
}
else {
StringTokenizer tokens = new StringTokenizer(string, "_");
String language = tokens.hasMoreTokens() ? tokens.nextToken() : "";
String country = tokens.hasMoreTokens() ? tokens.nextToken() : "";
// Need to account for allowable '_' within the variant
String variant = "";
String sep = "";
while ( tokens.hasMoreTokens() ) {
variant += sep + tokens.nextToken();
sep = "_";
}
return new Locale(language, country, variant);
}
|
public java.lang.Object | get(java.sql.ResultSet rs, java.lang.String name)
return fromStringValue( (String) Hibernate.STRING.get(rs, name) );
|
public java.lang.String | getName()
return "locale";
|
public java.lang.Class | getReturnedClass()
return Locale.class;
|
public java.lang.String | objectToSQLString(java.lang.Object value, org.hibernate.dialect.Dialect dialect)
return ( (LiteralType) Hibernate.STRING ).objectToSQLString( value.toString(), dialect );
|
public void | set(java.sql.PreparedStatement st, java.lang.Object value, int index)
Hibernate.STRING.set(st, value.toString(), index);
|
public int | sqlType()
return Hibernate.STRING.sqlType();
|
public java.lang.String | toString(java.lang.Object value)
return value.toString();
|