HHH-6392 Formatting
This commit is contained in:
parent
2500a70668
commit
593066b7f3
|
@ -1,5 +1,6 @@
|
||||||
//$Id$
|
//$Id$
|
||||||
package org.hibernate.test.annotations.embedded;
|
package org.hibernate.test.annotations.embedded;
|
||||||
|
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -34,10 +35,10 @@ public class Book {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AttributeOverrides({
|
@AttributeOverrides( {
|
||||||
@AttributeOverride(name = "size", column = @Column(name="summ_size", table = "BookSummary")),
|
@AttributeOverride(name = "size", column = @Column(name = "summ_size", table = "BookSummary")),
|
||||||
@AttributeOverride(name = "text", column = @Column(table = "BookSummary"))
|
@AttributeOverride(name = "text", column = @Column(table = "BookSummary"))
|
||||||
})
|
})
|
||||||
public Summary getSummary() {
|
public Summary getSummary() {
|
||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//$Id$
|
//$Id$
|
||||||
package org.hibernate.test.annotations.embedded;
|
package org.hibernate.test.annotations.embedded;
|
||||||
|
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -9,9 +10,9 @@ import javax.persistence.MappedSuperclass;
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
*/
|
*/
|
||||||
@AttributeOverrides(value = {
|
@AttributeOverrides(value = {
|
||||||
@AttributeOverride(name = "swap.tenor", column = @Column(name = "TENOR")), //should be ovvriden by deal
|
@AttributeOverride(name = "swap.tenor", column = @Column(name = "TENOR")), //should be ovvriden by deal
|
||||||
@AttributeOverride(name = "id", column = @Column(name = "NOTONIALDEAL_ID"))
|
@AttributeOverride(name = "id", column = @Column(name = "NOTONIALDEAL_ID"))
|
||||||
})
|
})
|
||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
public class NotonialDeal extends Deal {
|
public class NotonialDeal extends Deal {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//$Id$
|
//$Id$
|
||||||
package org.hibernate.test.annotations.embedded;
|
package org.hibernate.test.annotations.embedded;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
|
@ -26,9 +27,9 @@ public class Person implements Serializable {
|
||||||
Address address;
|
Address address;
|
||||||
|
|
||||||
@Embedded
|
@Embedded
|
||||||
@AttributeOverrides({
|
@AttributeOverrides( {
|
||||||
@AttributeOverride(name = "iso2", column = @Column(name = "bornIso2")),
|
@AttributeOverride(name = "iso2", column = @Column(name = "bornIso2")),
|
||||||
@AttributeOverride(name = "name", column = @Column(name = "bornCountryName"))
|
@AttributeOverride(name = "name", column = @Column(name = "bornCountryName"))
|
||||||
})
|
})
|
||||||
Country bornIn;
|
Country bornIn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package org.hibernate.test.annotations.embedded;
|
package org.hibernate.test.annotations.embedded;
|
||||||
|
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -12,13 +13,13 @@ import javax.persistence.Entity;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@AttributeOverrides(value = {
|
@AttributeOverrides(value = {
|
||||||
@AttributeOverride(name = "swap.tenor", column = @Column(name = "MEDIUM_TENOR")),
|
@AttributeOverride(name = "swap.tenor", column = @Column(name = "MEDIUM_TENOR")),
|
||||||
@AttributeOverride(name = "swap.fixedLeg.paymentFrequency", column = @Column(name = "MEDIUM_FIXED_FREQUENCY")),
|
@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.fixedLeg.rate", column = @Column(name = "MEDIUM_FIXED_RATE")),
|
||||||
@AttributeOverride(name = "swap.floatLeg.paymentFrequency", column = @Column(name = "MEDIUM_FLOAT_FREQUENCY")),
|
@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.rateIndex", column = @Column(name = "MEDIUM_FLOAT_RATEINDEX")),
|
||||||
@AttributeOverride(name = "swap.floatLeg.rateSpread", column = @Column(name = "MEDIUM_FLOAT_RATESPREAD"))
|
@AttributeOverride(name = "swap.floatLeg.rateSpread", column = @Column(name = "MEDIUM_FLOAT_RATESPREAD"))
|
||||||
})
|
})
|
||||||
public class SpreadDeal extends NotonialDeal {
|
public class SpreadDeal extends NotonialDeal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,16 +42,15 @@ public class SpreadDeal extends NotonialDeal {
|
||||||
*/
|
*/
|
||||||
private Swap shortSwap;
|
private Swap shortSwap;
|
||||||
|
|
||||||
|
|
||||||
@Embedded
|
@Embedded
|
||||||
@AttributeOverrides(value = {
|
@AttributeOverrides(value = {
|
||||||
@AttributeOverride(name = "tenor", column = @Column(name = "SHORT_TENOR")),
|
@AttributeOverride(name = "tenor", column = @Column(name = "SHORT_TENOR")),
|
||||||
@AttributeOverride(name = "fixedLeg.paymentFrequency", column = @Column(name = "SHORT_FIXED_FREQUENCY")),
|
@AttributeOverride(name = "fixedLeg.paymentFrequency", column = @Column(name = "SHORT_FIXED_FREQUENCY")),
|
||||||
@AttributeOverride(name = "fixedLeg.rate", column = @Column(name = "SHORT_FIXED_RATE")),
|
@AttributeOverride(name = "fixedLeg.rate", column = @Column(name = "SHORT_FIXED_RATE")),
|
||||||
@AttributeOverride(name = "floatLeg.paymentFrequency", column = @Column(name = "SHORT_FLOAT_FREQUENCY")),
|
@AttributeOverride(name = "floatLeg.paymentFrequency", column = @Column(name = "SHORT_FLOAT_FREQUENCY")),
|
||||||
@AttributeOverride(name = "floatLeg.rateIndex", column = @Column(name = "SHORT_FLOAT_RATEINDEX")),
|
@AttributeOverride(name = "floatLeg.rateIndex", column = @Column(name = "SHORT_FLOAT_RATEINDEX")),
|
||||||
@AttributeOverride(name = "floatLeg.rateSpread", column = @Column(name = "SHORT_FLOAT_RATESPREAD"))
|
@AttributeOverride(name = "floatLeg.rateSpread", column = @Column(name = "SHORT_FLOAT_RATESPREAD"))
|
||||||
})
|
})
|
||||||
public Swap getShortSwap() {
|
public Swap getShortSwap() {
|
||||||
return shortSwap;
|
return shortSwap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue