org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor Java Examples

The following examples show how to use org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactiveTypeContributor.java    From hibernate-reactive with GNU Lesser General Public License v2.1 6 votes vote down vote up
public BlobType(Dialect dialect) {
	super(new VarbinaryTypeDescriptor() {
		@Override
		public int getSqlType() {
			//force the use of text instead of oid on Postgres
			return dialect instanceof PostgreSQL10Dialect
					? Types.LONGVARBINARY
					: Types.BLOB;
		}

		@Override
		public boolean canBeRemapped() {
			return false;
		}
	}, PrimitiveByteArrayTypeDescriptor.INSTANCE);
}
 
Example #2
Source File: MaterializedBlobType.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public MaterializedBlobType() {
	super( BlobTypeDescriptor.DEFAULT, PrimitiveByteArrayTypeDescriptor.INSTANCE );
}
 
Example #3
Source File: ImageType.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public ImageType() {
	super( LongVarbinaryTypeDescriptor.INSTANCE, PrimitiveByteArrayTypeDescriptor.INSTANCE );
}
 
Example #4
Source File: BinaryType.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public BinaryType() {
	super( VarbinaryTypeDescriptor.INSTANCE, PrimitiveByteArrayTypeDescriptor.INSTANCE );
}
 
Example #5
Source File: BufferedContentTypeDescriptor.java    From cosmo with Apache License 2.0 4 votes vote down vote up
@Override
public String toString(BufferedContent value) {
    final byte[] bytes;
    bytes = DataHelper.extractBytes(value.getInputStream());
    return PrimitiveByteArrayTypeDescriptor.INSTANCE.toString(bytes);
}
 
Example #6
Source File: BinaryType.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Get a comparator for version values.
 *
 * @return The comparator to use to compare different version values.
 * @deprecated use {@link RowVersionType} for binary entity versions/timestamps
 */
@Override
@Deprecated
public Comparator<byte[]> getComparator() {
	return PrimitiveByteArrayTypeDescriptor.INSTANCE.getComparator();
}