本文整理了Java中org.hibernate.mapping.Column.setSqlTypeCode()
方法的一些代码示例,展示了Column.setSqlTypeCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Column.setSqlTypeCode()
方法的具体详情如下:
包路径:org.hibernate.mapping.Column
类名称:Column
方法名:setSqlTypeCode
暂无
代码示例来源:origin: hibernate/hibernate-orm
/**
* Shallow copy, the value is not copied
*/
@Override
public Column clone() {
Column copy = new Column();
copy.setLength( length );
copy.setScale( scale );
copy.setValue( value );
copy.setTypeIndex( typeIndex );
copy.setName( getQuotedName() );
copy.setNullable( nullable );
copy.setPrecision( precision );
copy.setUnique( unique );
copy.setSqlType( sqlType );
copy.setSqlTypeCode( sqlTypeCode );
copy.uniqueInteger = uniqueInteger; //usually useless
copy.setCheckConstraint( checkConstraint );
copy.setComment( comment );
copy.setDefaultValue( defaultValue );
copy.setCustomRead( customRead );
copy.setCustomWrite( customWrite );
return copy;
}
代码示例来源:origin: org.hibernate/hibernate-tools
String attributeValue = element.attributeValue("jdbc-type");
if(StringHelper.isNotEmpty(attributeValue)) {
column.setSqlTypeCode(new Integer(JDBCToHibernateTypeHelper.getJDBCType(attributeValue)));
代码示例来源:origin: hibernate/hibernate-tools
column.setSqlTypeCode(Integer.valueOf(sqlType) );
if(intBounds(size) ) {
if(JdbcToHibernateTypeHelper.typeHasLength(sqlType) ) {
代码示例来源:origin: org.hibernate/hibernate-tools
column.setSqlTypeCode(new Integer(sqlType) );
if(intBounds(size) ) {
if(JDBCToHibernateTypeHelper.typeHasLength(sqlType) ) {
代码示例来源:origin: org.hibernate/hibernate-tools
if(wantedSqlType!=sqlTypeCode.intValue() ) {
log.debug("Sql type mismatch for " + location + " between DB and wanted hibernate type. Sql type set to " + typeCodeName( sqlTypeCode.intValue() ) + " instead of " + typeCodeName(wantedSqlType) );
column.setSqlTypeCode(new Integer(wantedSqlType));
代码示例来源:origin: hibernate/hibernate-tools
String attributeValue = getAttribute(element, "jdbc-type");
if (StringHelper.isNotEmpty(attributeValue)) {
column.setSqlTypeCode(Integer.valueOf(JdbcToHibernateTypeHelper.getJDBCType(attributeValue)));
代码示例来源:origin: hibernate/hibernate-tools
if(wantedSqlType!=sqlTypeCode.intValue() ) {
log.debug("Sql type mismatch for " + location + " between DB and wanted hibernate type. Sql type set to " + typeCodeName( sqlTypeCode.intValue() ) + " instead of " + typeCodeName(wantedSqlType) );
column.setSqlTypeCode(Integer.valueOf(wantedSqlType));
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
/**
* Shallow copy, the value is not copied
*/
protected Object clone() {
Column copy = new Column();
copy.setLength( length );
copy.setScale( scale );
copy.setValue( value );
copy.setTypeIndex( typeIndex );
copy.setName( getQuotedName() );
copy.setNullable( nullable );
copy.setPrecision( precision );
copy.setUnique( unique );
copy.setSqlType( sqlType );
copy.setSqlTypeCode( sqlTypeCode );
copy.uniqueInteger = uniqueInteger; //usually useless
copy.setCheckConstraint( checkConstraint );
copy.setComment( comment );
copy.setDefaultValue( defaultValue );
return copy;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* Shallow copy, the value is not copied
*/
protected Object clone() {
Column copy = new Column();
copy.setLength( length );
copy.setScale( scale );
copy.setValue( value );
copy.setTypeIndex( typeIndex );
copy.setName( getQuotedName() );
copy.setNullable( nullable );
copy.setPrecision( precision );
copy.setUnique( unique );
copy.setSqlType( sqlType );
copy.setSqlTypeCode( sqlTypeCode );
copy.uniqueInteger = uniqueInteger; //usually useless
copy.setCheckConstraint( checkConstraint );
copy.setComment( comment );
copy.setDefaultValue( defaultValue );
copy.setCustomRead( customRead );
copy.setCustomWrite( customWrite );
return copy;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* Shallow copy, the value is not copied
*/
protected Object clone() {
Column copy = new Column();
copy.setLength( length );
copy.setScale( scale );
copy.setValue( value );
copy.setTypeIndex( typeIndex );
copy.setName( getQuotedName() );
copy.setNullable( nullable );
copy.setPrecision( precision );
copy.setUnique( unique );
copy.setSqlType( sqlType );
copy.setSqlTypeCode( sqlTypeCode );
copy.uniqueInteger = uniqueInteger; //usually useless
copy.setCheckConstraint( checkConstraint );
copy.setComment( comment );
copy.setDefaultValue( defaultValue );
copy.setCustomRead( customRead );
copy.setCustomWrite( customWrite );
return copy;
}
代码示例来源:origin: com.manydesigns/portofino-database
protected Column createColumn(Mappings mappings,
Table tab,
com.manydesigns.portofino.model.database.Column column) {
Column col = new Column();
col.setName(quoteIdentifier(column.getColumnName()));
if(column.getLength() != null) {
col.setLength(column.getLength());
col.setPrecision(column.getLength());
}
if(column.getScale() != null) {
col.setScale(column.getScale());
}
col.setNullable(column.isNullable());
String columnType = column.getColumnType();
int jdbcType = column.getJdbcType();
col.setSqlTypeCode(jdbcType);
col.setSqlType(columnType);
SimpleValue value = new SimpleValue(mappings, tab);
if (!setHibernateType(value, column)) {
logger.error("Skipping column {}", column.getQualifiedName());
return null;
}
value.addColumn(col);
tab.addColumn(col);
mappings.addColumnBinding(column.getColumnName(), col, tab);
return col;
}
代码示例来源:origin: ManyDesigns/Portofino
protected Column createColumn(Mappings mappings,
Table tab,
com.manydesigns.portofino.model.database.Column column) {
Column col = new Column();
col.setName(quoteIdentifier(column.getColumnName()));
if(column.getLength() != null) {
col.setLength(column.getLength());
col.setPrecision(column.getLength());
}
if(column.getScale() != null) {
col.setScale(column.getScale());
}
col.setNullable(column.isNullable());
String columnType = column.getColumnType();
int jdbcType = column.getJdbcType();
col.setSqlTypeCode(jdbcType);
col.setSqlType(columnType);
SimpleValue value = new SimpleValue(mappings, tab);
if (!setHibernateType(value, column)) {
logger.error("Skipping column {}", column.getQualifiedName());
return null;
}
value.addColumn(col);
tab.addColumn(col);
mappings.addColumnBinding(column.getColumnName(), col, tab);
return col;
}
内容来源于网络,如有侵权,请联系作者删除!