Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String codeTax;
- private Compte compte;
- private String libTax;
- private double valeurTax;
- private String natureTax;
- private String typeTax;
- private String sensTax;
- public Taxe() {
- }
- public Taxe(Compte compte, String libTax, double valeurTax,
- String natureTax, String typeTax, String sensTax) {
- this.compte = compte;
- this.libTax = libTax;
- this.valeurTax = valeurTax;
- this.natureTax = natureTax;
- this.typeTax = typeTax;
- this.sensTax = sensTax;
- }
- public Taxe(String libTax, double valeurTax,
- String natureTax, String typeTax, String sensTax) {
- this.libTax = libTax;
- this.valeurTax = valeurTax;
- this.natureTax = natureTax;
- this.typeTax = typeTax;
- this.sensTax = sensTax;
- }
- @GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "compte"))
- @Id
- @GeneratedValue(generator = "generator")
- @Column(name = "CODE_TAX", unique = true, nullable = false, length = 50)
- public String getCodeTax() {
- return this.codeTax;
- }
- public void setCodeTax(String codeTax) {
- this.codeTax = codeTax;
- }
- @OneToOne(fetch = FetchType.LAZY)
- @PrimaryKeyJoinColumn
- public Compte getCompte() {
- return this.compte;
- }
- public void setCompte(Compte compte) {
- this.compte = compte;
- }
- @Column(name = "LIB_TAX", nullable = false, length = 50)
- public String getLibTax() {
- return this.libTax;
- }
- public void setLibTax(String libTax) {
- this.libTax = libTax;
- }
- @Column(name = "VALEUR_TAX", nullable = false, precision = 53, scale = 0)
- public double getValeurTax() {
- return this.valeurTax;
- }
- public void setValeurTax(double valeurTax) {
- this.valeurTax = valeurTax;
- }
- @Column(name = "NATURE_TAX", nullable = false, length = 50)
- public String getNatureTax() {
- return this.natureTax;
- }
- public void setNatureTax(String natureTax) {
- this.natureTax = natureTax;
- }
- @Column(name = "TYPE_TAX", nullable = false, length = 50)
- public String getTypeTax() {
- return this.typeTax;
- }
- public void setTypeTax(String typeTax) {
- this.typeTax = typeTax;
- }
- @Column(name = "SENS_TAX", nullable = false, length = 50)
- public String getSensTax() {
- return this.sensTax;
- }
- public void setSensTax(String sensTax) {
- this.sensTax = sensTax;
- }
- Compte cpt = cptManager.getCompteById(numCpt);
- Taxe tax = new Taxe(cpt,libTax, Double.parseDouble(valeurTax), natureTax, typeTax, sensTax);
- tax.setCodeTax(codeTax);
- cpt.setTaxe(tax);
- taxManager.addTaxe(tax);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement