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("Blobs are not cacheable");
|
public java.lang.Object | fromXMLNode(org.dom4j.Node xml, org.hibernate.engine.Mapping factory)
throw new UnsupportedOperationException("todo");
|
public java.lang.Object | get(java.sql.ResultSet rs, java.lang.String name)
Blob value = rs.getBlob(name);
return rs.wasNull() ? null : new SerializableBlob(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 "blob";
|
public java.lang.Class | getReturnedClass()
return Blob.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)
//Blobs are ignored by merge()
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.BLOB);
}
else {
if (value instanceof SerializableBlob) {
value = ( (SerializableBlob) value ).getWrappedBlob();
}
final boolean useInputStream = session.getFactory().getDialect().useInputStreamToInsertBlob() &&
(value instanceof BlobImpl);
if ( useInputStream ) {
BlobImpl blob = (BlobImpl) value;
st.setBinaryStream( index, blob.getBinaryStream(), (int) blob.length() );
}
else {
st.setBlob(index, (Blob) value);
}
}
|
public void | setToXMLNode(org.dom4j.Node node, java.lang.Object value, org.hibernate.engine.SessionFactoryImplementor factory)
throw new UnsupportedOperationException("todo");
|
public int[] | sqlTypes(org.hibernate.engine.Mapping mapping)
return new int[] { Types.BLOB };
|
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();
|