FileDocCategorySizeDatePackage
PointbaseDialect.javaAPI DocHibernate 3.2.52207Thu Feb 23 10:32:48 GMT 2006org.hibernate.dialect

PointbaseDialect

public class PointbaseDialect extends org.hibernate.dialect.Dialect
A Dialect for Pointbase.
author
Ed Mackenzie

Fields Summary
Constructors Summary
public PointbaseDialect()
Creates new PointbaseDialect

		super();
		registerColumnType( Types.BIT, "smallint" ); //no pointbase BIT
		registerColumnType( Types.BIGINT, "bigint" );
		registerColumnType( Types.SMALLINT, "smallint" );
		registerColumnType( Types.TINYINT, "smallint" ); //no pointbase TINYINT
		registerColumnType( Types.INTEGER, "integer" );
		registerColumnType( Types.CHAR, "char(1)" );
		registerColumnType( Types.VARCHAR, "varchar($l)" );
		registerColumnType( Types.FLOAT, "float" );
		registerColumnType( Types.DOUBLE, "double precision" );
		registerColumnType( Types.DATE, "date" );
		registerColumnType( Types.TIME, "time" );
		registerColumnType( Types.TIMESTAMP, "timestamp" );
		//the BLOB type requires a size arguement - this defaults to
		//bytes - no arg defaults to 1 whole byte!
		//other argument mods include K - kilobyte, M - megabyte, G - gigabyte.
		//refer to the PBdevelopers guide for more info.
		registerColumnType( Types.VARBINARY, "blob($l)" );
		registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
	
Methods Summary
public booleandropConstraints()

		return false;
	
public java.lang.StringgetAddColumnString()

		return "add";
	
public java.lang.StringgetCascadeConstraintsString()

		return " cascade";
	
public java.lang.StringgetForUpdateString()

		return "";
	
public org.hibernate.dialect.lock.LockingStrategygetLockingStrategy(org.hibernate.persister.entity.Lockable lockable, org.hibernate.LockMode lockMode)

		// Pointbase has no known variation of a "SELECT ... FOR UPDATE" syntax...
		if ( lockMode.greaterThan( LockMode.READ ) ) {
			return new UpdateLockingStrategy( lockable, lockMode );
		}
		else {
			return new SelectLockingStrategy( lockable, lockMode );
		}