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

The following are Jave code examples for showing how to use getCreateTableString() of the org.hibernate.dialect.Dialect class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: lams   File: TableGenerator.java   View Source Code Vote up 5 votes
@Override
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
			dialect.getCreateTableString() + ' ' + tableName + " ( "
					+ segmentColumnName + ' ' + dialect.getTypeName( Types.VARCHAR, segmentValueLength, 0, 0 ) + " not null "
					+ ", " + valueColumnName + ' ' + dialect.getTypeName( Types.BIGINT )
					+ ", primary key ( " + segmentColumnName + " ) )" + dialect.getTableTypeString()
	};
}
 
Example 2
Project: lams   File: TableStructure.java   View Source Code Vote up 5 votes
@Override
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
			dialect.getCreateTableString() + " " + tableName + " ( " + valueColumnName + " " + dialect.getTypeName( Types.BIGINT ) + " )",
			"insert into " + tableName + " values ( " + initialValue + " )"
	};
}
 
Example 3
Project: lams   File: TableGenerator.java   View Source Code Vote up 5 votes
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
	return new String[] {
		dialect.getCreateTableString() + " " + tableName + " ( "
				+ columnName + " " + dialect.getTypeName(Types.INTEGER) + " )" + dialect.getTableTypeString(),
		"insert into " + tableName + " values ( 0 )"
	};
}