@Override protected void augmentIdTableDefinition(Table idTable) { Column sessionIdColumn = new Column( Helper.SESSION_ID_COLUMN_NAME ); sessionIdColumn.setSqlType( "CHAR(36)" ); sessionIdColumn.setComment( "Used to hold the Hibernate Session identifier" ); idTable.addColumn( sessionIdColumn ); }
/** * 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; }
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); key.addColumn( copy );
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
column.setSqlType( columnSource.getSqlType() ); column.setComment( columnSource.getComment() );
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); key.addColumn( copy );
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
public static void bindColumn(Element node, Column column, boolean isNullable) { 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" ) ); Attribute typeNode = node.attribute( "sql-type" ); if ( typeNode != null ) column.setSqlType( typeNode.getValue() ); Element comment = node.element("comment"); if (comment!=null) column.setComment( comment.getTextTrim() ); }
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() ); }
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() ); }
/** * 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; }
/** * 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; }
column.setComment(cc.getComment()); column.setDefaultValue(cc.getDefaultValue()); column.setCustomRead(cc.getRead());
/** * 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; }
/** * 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; }
column.setComment(cc.getComment()); column.setDefaultValue(cc.getDefaultValue());
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); key.addColumn( copy );
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); key.addColumn( copy );
copy.setSqlType( column.getSqlType() ); copy.setCheckConstraint( column.getCheckConstraint() ); copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); key.addColumn( copy );
column.setSqlType( columnSource.getSqlType() ); column.setComment( columnSource.getComment() );