Methods Summary |
---|
protected java.lang.Object | deepCopyNotNull(java.lang.Object value)
char[] chars = toInternalFormat(value);
char[] result = new char[chars.length];
System.arraycopy(chars, 0, result, 0, chars.length);
return toExternalFormat(result);
|
public java.lang.Object | fromStringValue(java.lang.String xml)
if (xml == null) return null;
int length = xml.length();
char[] chars = new char[length];
for (int index = 0 ; index < length ; index++ ) {
chars[index] = xml.charAt( index );
}
return toExternalFormat( chars );
|
public java.lang.Object | get(java.sql.ResultSet rs, java.lang.String name)
Reader stream = rs.getCharacterStream(name);
if ( stream == null ) return toExternalFormat( null );
CharArrayWriter writer = new CharArrayWriter();
for(;;) {
try {
int c = stream.read();
if ( c == -1) return toExternalFormat( writer.toCharArray() );
writer.write( c );
}
catch (IOException e) {
throw new HibernateException("Unable to read character stream from rs");
}
}
|
public abstract java.lang.Class | getReturnedClass()
|
public java.lang.String | objectToSQLString(java.lang.Object value, org.hibernate.dialect.Dialect dialect)
return '\'" + new String( toInternalFormat( value ) ) + '\'";
|
public void | set(java.sql.PreparedStatement st, java.lang.Object value, int index)
char[] chars = toInternalFormat( value );
st.setCharacterStream(index, new CharArrayReader(chars), chars.length);
|
public int | sqlType()
return Types.VARCHAR;
|
public java.lang.Object | stringToObject(java.lang.String xml)
if (xml == null) return toExternalFormat( null );
int length = xml.length();
char[] chars = new char[length];
for (int index = 0 ; index < length ; index++ ) {
chars[index] = xml.charAt( index );
}
return toExternalFormat( chars );
|
protected abstract java.lang.Object | toExternalFormat(char[] chars)Convert the char[] into the expected object type
|
protected abstract char[] | toInternalFormat(java.lang.Object chars)Convert the object into the internal char[] representation
|
public java.lang.String | toString(java.lang.Object value)
if (value == null) return null;
return new String( toInternalFormat( value ) );
|