/*
 * Copyright 2013 - Elian ORIOU
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.vino.backend.model;

/**
 * User: walien
 * Date: 7/27/13
 * Time: 3:33 PM
 */
public class WineBottle extends Entity {

    private Barcode barcode;

    private WineDomain domain;

    private int vintage;

    public WineBottle(Barcode barcode, WineDomain domain, int vintage) {
        super();
        this.barcode = barcode;
        this.domain = domain;
        this.vintage = vintage;
    }

    public WineBottle() {
    }

    public int getVintage() {
        return vintage;
    }

    public WineBottle setVintage(int vintage) {
        this.vintage = vintage;
        return this;
    }

    public WineDomain getDomain() {
        return domain;
    }

    public WineBottle setDomain(WineDomain domain) {
        this.domain = domain;
        return this;
    }

    public Barcode getBarcode() {
        return barcode;
    }

    public WineBottle setBarcode(Barcode barcode) {
        this.barcode = barcode;
        return this;
    }

    @Override
    public String toString() {
        return "WineBottle{" +
                "barcode=" + barcode +
                ", domain=" + domain +
                ", vintage=" + vintage +
                '}';
    }
}

@@ -622,16 +622,62 @@
 model;%0A%0A
+import com.vino.backend.reference.Reference;%0A%0A
 /**%0A * U
@@ -810,16 +810,26 @@
 private 
+Reference%3C
 WineDoma
@@ -826,24 +826,25 @@
 e%3CWineDomain
+%3E
  domain;%0A%0A  
@@ -906,16 +906,26 @@
 arcode, 
+Reference%3C
 WineDoma
@@ -922,24 +922,25 @@
 e%3CWineDomain
+%3E
  domain, int
@@ -1278,24 +1278,34 @@
 %0A    public 
+Reference%3C
 WineDomain g
@@ -1302,16 +1302,17 @@
 neDomain
+%3E
  getDoma
@@ -1380,16 +1380,26 @@
 tDomain(
+Reference%3C
 WineDoma
@@ -1400,16 +1400,17 @@
 neDomain
+%3E
  domain)

Update model