本文整理汇总了Java中org.hibernate.dialect.Dialect.getTypeName方法的典型用法代码示例。如果您正苦于以下问题:Java Dialect.getTypeName方法的具体用法?Java Dialect.getTypeName怎么用?Java Dialect.getTypeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.dialect.Dialect
的用法示例。
在下文中一共展示了Dialect.getTypeName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTypeString
import org.hibernate.dialect.Dialect; //导入方法依赖的package包/类
private static String getTypeString(Column col, Dialect dialect) {
String typeString = null;
if ( col.getSqlType() != null ) {
typeString = col.getSqlType();
}
else {
Size size = col.getSize() == null ?
new Size( ) :
col.getSize();
typeString = dialect.getTypeName(
col.getDatatype().getTypeCode(),
size.getLength(),
size.getPrecision(),
size.getScale()
);
}
return typeString;
}
示例2: sqlCreateStrings
import org.hibernate.dialect.Dialect; //导入方法依赖的package包/类
@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()
};
}
示例3: sqlCreateStrings
import org.hibernate.dialect.Dialect; //导入方法依赖的package包/类
@Override
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
return new String[] {
dialect.getCreateTableString() + " " + tableName + " ( " + valueColumnName + " " + dialect.getTypeName( Types.BIGINT ) + " )",
"insert into " + tableName + " values ( " + initialValue + " )"
};
}
示例4: sqlCreateStrings
import org.hibernate.dialect.Dialect; //导入方法依赖的package包/类
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 )"
};
}
示例5: getSqlType
import org.hibernate.dialect.Dialect; //导入方法依赖的package包/类
public String getSqlType(Dialect dialect, Mapping mapping) throws HibernateException {
if ( sqlType == null ) {
sqlType = dialect.getTypeName( getSqlTypeCode( mapping ), getLength(), getPrecision(), getScale() );
}
return sqlType;
}