FileDocCategorySizeDatePackage
CustomBlobType.javaAPI DocHibernate 3.2.52170Thu Nov 02 12:18:52 GMT 2006org.hibernate.test.instrument.domain

CustomBlobType

public class CustomBlobType extends Object implements org.hibernate.usertype.UserType
A simple byte[]-based custom type.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.Objectassemble(java.io.Serializable arg0, java.lang.Object arg1)
{@inheritDoc}

		return null;
	
public java.lang.ObjectdeepCopy(java.lang.Object value)
{@inheritDoc}

		byte result[] = null;

		if ( value != null ) {
			byte bytes[] = ( byte[] ) value;

			result = new byte[bytes.length];
			System.arraycopy( bytes, 0, result, 0, bytes.length );
		}

		return result;
	
public java.io.Serializabledisassemble(java.lang.Object arg0)
{@inheritDoc}

		return null;
	
public booleanequals(java.lang.Object x, java.lang.Object y)
{@inheritDoc}

		return Arrays.equals( ( byte[] ) x, ( byte[] ) y );
	
public inthashCode(java.lang.Object arg0)
{@inheritDoc}

		return 0;
	
public booleanisMutable()
{@inheritDoc}

		return true;
	
public java.lang.ObjectnullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, java.lang.Object owner)
{@inheritDoc}

		// cast just to make sure...
		return ( byte[] ) Hibernate.BINARY.nullSafeGet( rs, names );
	
public voidnullSafeSet(java.sql.PreparedStatement ps, java.lang.Object value, int index)
{@inheritDoc}

		// cast just to make sure...
		Hibernate.BINARY.nullSafeSet( ps, ( byte[] ) value, index );
	
public java.lang.Objectreplace(java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
{@inheritDoc}

		return null;
	
public java.lang.ClassreturnedClass()
{@inheritDoc}

		return byte[].class;
	
public int[]sqlTypes()
{@inheritDoc}

		return new int[] { Types.VARBINARY };