Methods Summary |
---|
public int | compare(java.lang.Object x, java.lang.Object y, org.hibernate.EntityMode entityMode)
return 0; //lobs cannot be compared
|
public java.lang.Object | deepCopy(java.lang.Object value, org.hibernate.EntityMode entityMode, org.hibernate.engine.SessionFactoryImplementor factory)
return value;
|
public java.io.Serializable | disassemble(java.lang.Object value, org.hibernate.engine.SessionImplementor session, java.lang.Object owner)
throw new UnsupportedOperationException("Clobs are not cacheable");
|
public java.lang.Object | fromXMLNode(org.dom4j.Node xml, org.hibernate.engine.Mapping factory)
return Hibernate.createClob( xml.getText() );
|
public java.lang.Object | get(java.sql.ResultSet rs, java.lang.String name)
Clob value = rs.getClob(name);
return rs.wasNull() ? null : new SerializableClob(value);
|
public int | getColumnSpan(org.hibernate.engine.Mapping mapping)
return 1;
|
public int | getHashCode(java.lang.Object x, org.hibernate.EntityMode entityMode)
return System.identityHashCode(x);
|
public java.lang.String | getName()
return "clob";
|
public java.lang.Class | getReturnedClass()
return Clob.class;
|
public boolean | isDirty(java.lang.Object old, java.lang.Object current, boolean[] checkable, org.hibernate.engine.SessionImplementor session)
return checkable[0] && isDirty(old, current, session);
|
public boolean | isEqual(java.lang.Object x, java.lang.Object y, org.hibernate.EntityMode entityMode)
return x == y;
|
public boolean | isMutable()
return false;
|
public java.lang.Object | nullSafeGet(java.sql.ResultSet rs, java.lang.String name, org.hibernate.engine.SessionImplementor session, java.lang.Object owner)
return get(rs, name);
|
public java.lang.Object | nullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, org.hibernate.engine.SessionImplementor session, java.lang.Object owner)
return get( rs, names[0] );
|
public void | nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index, boolean[] settable, org.hibernate.engine.SessionImplementor session)
if ( settable[0] ) set(st, value, index, session);
|
public void | nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index, org.hibernate.engine.SessionImplementor session)
set(st, value, index, session);
|
public java.lang.Object | replace(java.lang.Object original, java.lang.Object target, org.hibernate.engine.SessionImplementor session, java.lang.Object owner, java.util.Map copyCache)
//Clobs are ignored by merge() operation
return target;
|
public void | set(java.sql.PreparedStatement st, java.lang.Object value, int index, org.hibernate.engine.SessionImplementor session)
if (value==null) {
st.setNull(index, Types.CLOB);
}
else {
if (value instanceof SerializableClob) {
value = ( (SerializableClob) value ).getWrappedClob();
}
final boolean useReader = session.getFactory().getDialect().useInputStreamToInsertBlob() &&
(value instanceof ClobImpl);
if ( useReader ) {
ClobImpl clob = (ClobImpl) value;
st.setCharacterStream( index, clob.getCharacterStream(), (int) clob.length() );
}
else {
st.setClob(index, (Clob) value);
}
}
|
public void | setToXMLNode(org.dom4j.Node node, java.lang.Object value, org.hibernate.engine.SessionFactoryImplementor factory)
if (value!=null) {
Clob clob = (Clob) value;
try {
int len = (int) clob.length();
node.setText( clob.getSubString(0, len) );
}
catch (SQLException sqle) {
throw new HibernateException("could not read XML from Clob", sqle);
}
}
|
public int[] | sqlTypes(org.hibernate.engine.Mapping mapping)
return new int[] { Types.CLOB };
|
public boolean[] | toColumnNullness(java.lang.Object value, org.hibernate.engine.Mapping mapping)
return value==null ? ArrayHelper.FALSE : ArrayHelper.TRUE;
|
public java.lang.String | toLoggableString(java.lang.Object value, org.hibernate.engine.SessionFactoryImplementor factory)
return value==null ? "null" : value.toString();
|