org.hibernate.mapping.Column.setCustomRead()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.hibernate.mapping.Column.setCustomRead()方法的一些代码示例,展示了Column.setCustomRead()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Column.setCustomRead()方法的具体详情如下:
包路径:org.hibernate.mapping.Column
类名称:Column
方法名:setCustomRead

Column.setCustomRead介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-orm

this.mappingColumn.setCustomRead( readExpression );

代码示例来源: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: hibernate/hibernate-orm

column.setCustomRead( columnSource.getReadFragment() );
column.setCustomWrite( columnSource.getWriteFragment() );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public static void bindColumn(Element node, Column column, boolean isNullable) throws MappingException {
  Attribute lengthNode = node.attribute( "length" );
  if ( lengthNode != null ) column.setLength( Integer.parseInt( lengthNode.getValue() ) );
  Attribute scalNode = node.attribute( "scale" );
  if ( scalNode != null ) column.setScale( Integer.parseInt( scalNode.getValue() ) );
  Attribute precNode = node.attribute( "precision" );
  if ( precNode != null ) column.setPrecision( Integer.parseInt( precNode.getValue() ) );
  Attribute nullNode = node.attribute( "not-null" );
  column.setNullable( nullNode == null ? isNullable : nullNode.getValue().equals( "false" ) );
  Attribute unqNode = node.attribute( "unique" );
  if ( unqNode != null ) column.setUnique( unqNode.getValue().equals( "true" ) );
  column.setCheckConstraint( node.attributeValue( "check" ) );
  column.setDefaultValue( node.attributeValue( "default" ) );
  Attribute typeNode = node.attribute( "sql-type" );
  if ( typeNode != null ) column.setSqlType( typeNode.getValue() );
  String customWrite = node.attributeValue( "write" );
  if(customWrite != null && !customWrite.matches("[^?]*\\?[^?]*")) {
    throw new MappingException("write expression must contain exactly one value placeholder ('?') character");
  }
  column.setCustomWrite( customWrite );
  column.setCustomRead( node.attributeValue( "read" ) );
  Element comment = node.element("comment");
  if (comment!=null) column.setComment( comment.getTextTrim() );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public static void bindColumn(Element node, Column column, boolean isNullable) throws MappingException {
  Attribute lengthNode = node.attribute( "length" );
  if ( lengthNode != null ) column.setLength( Integer.parseInt( lengthNode.getValue() ) );
  Attribute scalNode = node.attribute( "scale" );
  if ( scalNode != null ) column.setScale( Integer.parseInt( scalNode.getValue() ) );
  Attribute precNode = node.attribute( "precision" );
  if ( precNode != null ) column.setPrecision( Integer.parseInt( precNode.getValue() ) );
  Attribute nullNode = node.attribute( "not-null" );
  column.setNullable( nullNode == null ? isNullable : nullNode.getValue().equals( "false" ) );
  Attribute unqNode = node.attribute( "unique" );
  if ( unqNode != null ) column.setUnique( unqNode.getValue().equals( "true" ) );
  column.setCheckConstraint( node.attributeValue( "check" ) );
  column.setDefaultValue( node.attributeValue( "default" ) );
  Attribute typeNode = node.attribute( "sql-type" );
  if ( typeNode != null ) column.setSqlType( typeNode.getValue() );
  String customWrite = node.attributeValue( "write" );
  if(customWrite != null && !customWrite.matches("[^?]*\\?[^?]*")) {
    throw new MappingException("write expression must contain exactly one value placeholder ('?') character");
  }
  column.setCustomWrite( customWrite );
  column.setCustomRead( node.attributeValue( "read" ) );
  Element comment = node.element("comment");
  if (comment!=null) column.setComment( comment.getTextTrim() );
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

this.mappingColumn.setCustomRead( readExpression );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

this.mappingColumn.setCustomRead( readExpression );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

this.mappingColumn.setCustomRead( readExpression );

代码示例来源:origin: org.hibernate.orm/hibernate-core

/**
 * Shallow copy, the value is not copied
 */
@Override
public Column clone() {
  Column copy = new Column( name, unique );
  copy.setTableName( tableName );
  copy.setLength( length );
  copy.setScale( scale );
  copy.setNullable( nullable );
  copy.setPrecision( precision );
  copy.setSqlType( sqlType );
  copy.setUniqueInteger( uniqueInteger ); //usually useless
  copy.setCheckConstraint( checkConstraint );
  copy.setComment( comment );
  copy.setDefaultValue( defaultValue );
  copy.setCustomRead( customRead );
  copy.setCustomWrite( customWrite );
  copy.setSqlTypeDescriptorAccess( sqlTypeDescriptorAccess );
  copy.setJavaTypeMapping( javaTypeMapping );
  return copy;
}

代码示例来源:origin: org.grails/grails-datastore-gorm-hibernate-core

column.setComment(cc.getComment());
column.setDefaultValue(cc.getDefaultValue());
column.setCustomRead(cc.getRead());
column.setCustomWrite(cc.getWrite());

代码示例来源: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: 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.orm/hibernate-core

column.setCustomRead( columnSource.getReadFragment() );
column.setCustomWrite( columnSource.getWriteFragment() );

相关文章