HHH-6392 Formatting

This commit is contained in:
Hardy Ferentschik 2011-07-12 12:07:55 +02:00
parent 2500a70668
commit 593066b7f3
4 changed files with 29 additions and 26 deletions

View File

@ -1,5 +1,6 @@
//$Id$
package org.hibernate.test.annotations.embedded;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
@ -34,10 +35,10 @@ public class Book {
this.name = name;
}
@AttributeOverrides({
@AttributeOverride(name = "size", column = @Column(name="summ_size", table = "BookSummary")),
@AttributeOverride(name = "text", column = @Column(table = "BookSummary"))
})
@AttributeOverrides( {
@AttributeOverride(name = "size", column = @Column(name = "summ_size", table = "BookSummary")),
@AttributeOverride(name = "text", column = @Column(table = "BookSummary"))
})
public Summary getSummary() {
return summary;
}

View File

@ -1,5 +1,6 @@
//$Id$
package org.hibernate.test.annotations.embedded;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
@ -9,9 +10,9 @@ import javax.persistence.MappedSuperclass;
* @author Emmanuel Bernard
*/
@AttributeOverrides(value = {
@AttributeOverride(name = "swap.tenor", column = @Column(name = "TENOR")), //should be ovvriden by deal
@AttributeOverride(name = "id", column = @Column(name = "NOTONIALDEAL_ID"))
})
@AttributeOverride(name = "swap.tenor", column = @Column(name = "TENOR")), //should be ovvriden by deal
@AttributeOverride(name = "id", column = @Column(name = "NOTONIALDEAL_ID"))
})
@MappedSuperclass
public class NotonialDeal extends Deal {
/**

View File

@ -1,5 +1,6 @@
//$Id$
package org.hibernate.test.annotations.embedded;
import java.io.Serializable;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
@ -26,9 +27,9 @@ public class Person implements Serializable {
Address address;
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "iso2", column = @Column(name = "bornIso2")),
@AttributeOverride(name = "name", column = @Column(name = "bornCountryName"))
})
@AttributeOverrides( {
@AttributeOverride(name = "iso2", column = @Column(name = "bornIso2")),
@AttributeOverride(name = "name", column = @Column(name = "bornCountryName"))
})
Country bornIn;
}

View File

@ -1,4 +1,5 @@
package org.hibernate.test.annotations.embedded;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
@ -12,13 +13,13 @@ import javax.persistence.Entity;
*/
@Entity
@AttributeOverrides(value = {
@AttributeOverride(name = "swap.tenor", column = @Column(name = "MEDIUM_TENOR")),
@AttributeOverride(name = "swap.fixedLeg.paymentFrequency", column = @Column(name = "MEDIUM_FIXED_FREQUENCY")),
@AttributeOverride(name = "swap.fixedLeg.rate", column = @Column(name = "MEDIUM_FIXED_RATE")),
@AttributeOverride(name = "swap.floatLeg.paymentFrequency", column = @Column(name = "MEDIUM_FLOAT_FREQUENCY")),
@AttributeOverride(name = "swap.floatLeg.rateIndex", column = @Column(name = "MEDIUM_FLOAT_RATEINDEX")),
@AttributeOverride(name = "swap.floatLeg.rateSpread", column = @Column(name = "MEDIUM_FLOAT_RATESPREAD"))
})
@AttributeOverride(name = "swap.tenor", column = @Column(name = "MEDIUM_TENOR")),
@AttributeOverride(name = "swap.fixedLeg.paymentFrequency", column = @Column(name = "MEDIUM_FIXED_FREQUENCY")),
@AttributeOverride(name = "swap.fixedLeg.rate", column = @Column(name = "MEDIUM_FIXED_RATE")),
@AttributeOverride(name = "swap.floatLeg.paymentFrequency", column = @Column(name = "MEDIUM_FLOAT_FREQUENCY")),
@AttributeOverride(name = "swap.floatLeg.rateIndex", column = @Column(name = "MEDIUM_FLOAT_RATEINDEX")),
@AttributeOverride(name = "swap.floatLeg.rateSpread", column = @Column(name = "MEDIUM_FLOAT_RATESPREAD"))
})
public class SpreadDeal extends NotonialDeal {
/**
@ -41,16 +42,15 @@ public class SpreadDeal extends NotonialDeal {
*/
private Swap shortSwap;
@Embedded
@AttributeOverrides(value = {
@AttributeOverride(name = "tenor", column = @Column(name = "SHORT_TENOR")),
@AttributeOverride(name = "fixedLeg.paymentFrequency", column = @Column(name = "SHORT_FIXED_FREQUENCY")),
@AttributeOverride(name = "fixedLeg.rate", column = @Column(name = "SHORT_FIXED_RATE")),
@AttributeOverride(name = "floatLeg.paymentFrequency", column = @Column(name = "SHORT_FLOAT_FREQUENCY")),
@AttributeOverride(name = "floatLeg.rateIndex", column = @Column(name = "SHORT_FLOAT_RATEINDEX")),
@AttributeOverride(name = "floatLeg.rateSpread", column = @Column(name = "SHORT_FLOAT_RATESPREAD"))
})
@AttributeOverride(name = "tenor", column = @Column(name = "SHORT_TENOR")),
@AttributeOverride(name = "fixedLeg.paymentFrequency", column = @Column(name = "SHORT_FIXED_FREQUENCY")),
@AttributeOverride(name = "fixedLeg.rate", column = @Column(name = "SHORT_FIXED_RATE")),
@AttributeOverride(name = "floatLeg.paymentFrequency", column = @Column(name = "SHORT_FLOAT_FREQUENCY")),
@AttributeOverride(name = "floatLeg.rateIndex", column = @Column(name = "SHORT_FLOAT_RATEINDEX")),
@AttributeOverride(name = "floatLeg.rateSpread", column = @Column(name = "SHORT_FLOAT_RATESPREAD"))
})
public Swap getShortSwap() {
return shortSwap;
}