diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Book.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Book.java index 232eaf0a3f..7e321e341c 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Book.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Book.java @@ -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; } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/NotonialDeal.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/NotonialDeal.java index eafb080455..f30a9f7d03 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/NotonialDeal.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/NotonialDeal.java @@ -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 { /** diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Person.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Person.java index 4c62e23851..0239b54889 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Person.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/Person.java @@ -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; } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/SpreadDeal.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/SpreadDeal.java index 4c36844c27..25c599dffd 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/SpreadDeal.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/SpreadDeal.java @@ -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; }