Java Code Examples for org.hibernate.dialect.Dialect#getCreateTableString()

The following examples show how to use org.hibernate.dialect.Dialect#getCreateTableString() . 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: TableGenerator.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
			dialect.getCreateTableString() + ' ' + renderedTableName + " ( "
					+ segmentColumnName + ' ' + dialect.getTypeName( Types.VARCHAR, segmentValueLength, 0, 0 ) + " not null "
					+ ", " + valueColumnName + ' ' + dialect.getTypeName( Types.BIGINT )
					+ ", primary key ( " + segmentColumnName + " ) )" + dialect.getTableTypeString()
	};
}
 
Example 2
Source File: TableStructure.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
			dialect.getCreateTableString() + " " + tableNameText + " ( " + valueColumnNameText + " " + dialect.getTypeName( Types.BIGINT ) + " )",
			"insert into " + tableNameText + " values ( " + initialValue + " )"
	};
}
 
Example 3
Source File: MultipleHiLoPerTableGenerator.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
			dialect.getCreateTableString()
					+ ' ' + tableName + " ( "
					+ segmentColumnName + ' ' + dialect.getTypeName( Types.VARCHAR, keySize, 0, 0 ) + ",  "
					+ valueColumnName + ' ' + dialect.getTypeName( Types.INTEGER )
					+ " )" + dialect.getTableTypeString()
	};
}
 
Example 4
Source File: TableGenerator.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public String[] sqlCreateStrings(Dialect dialect) {
	return new String[] {
		dialect.getCreateTableString() + " " + tableName + " ( " + columnName + " " + dialect.getTypeName(Types.INTEGER) + " )",
		"insert into " + tableName + " values ( 0 )"
	};
}