/**
 * Created by Alexander Shreyner on 05.11.2016.
 */

package ru.teamrocket.csrSysteamDesktop.Model;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;

import javafx.collections.ArrayChangeListener;
import ru.teamrocket.csrSysteamDesktop.Model.Characteristic;

public class Offer {

    private final StringProperty name;
    private final IntegerProperty activationPrice;
    private final IntegerProperty monthlyPrice;
    private final StringProperty description;
    private final BooleanProperty status;
//    private final ObjectProperty<Characteristic[]> characteristic;


    public Offer() {
        this.name = new SimpleStringProperty("productName");
        this.activationPrice = new SimpleIntegerProperty(123);
        this.monthlyPrice = new SimpleIntegerProperty(1234);
        this.description = new SimpleStringProperty("Description");
        this.status = new SimpleBooleanProperty(true);

//        this.characteristic = new SimpleObjectProperty<Characteristic[]>();

    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public int getActivationPrice() {
        return activationPrice.get();
    }

    public IntegerProperty activationPriceProperty() {
        return activationPrice;
    }

    public void setActivationPrice(int activationPrice) {
        this.activationPrice.set(activationPrice);
    }

    public int getMonthlyPrice() {
        return monthlyPrice.get();
    }

    public IntegerProperty monthlyPriceProperty() {
        return monthlyPrice;
    }

    public void setMonthlyPrice(int monthlyPrice) {
        this.monthlyPrice.set(monthlyPrice);
    }

    public String getDescription() {
        return description.get();
    }

    public StringProperty descriptionProperty() {
        return description;
    }

    public void setDescription(String description) {
        this.description.set(description);
    }

    public boolean isStatus() {
        return status.get();
    }

    public BooleanProperty statusProperty() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status.set(status);
    }
}

@@ -148,53 +148,8 @@
 ty;%0A
-import javafx.beans.property.ObjectProperty;%0A
 impo
@@ -181,32 +181,32 @@
 StringProperty;%0A
+
 import javafx.be
@@ -227,32 +227,75 @@
 ooleanProperty;%0A
+import javafx.beans.property.ListProperty;%0A
 import javafx.be
@@ -385,59 +385,8 @@
 ty;%0A
-import javafx.beans.property.SimpleObjectProperty;%0A
 impo
@@ -433,17 +433,16 @@
 operty;%0A
-%0A
 import j
@@ -451,100 +451,41 @@
 afx.
-collections.ArrayChangeListener;%0Aimport ru.teamrocket.csrSysteamDesktop.Model.Characteristic
+beans.property.SimpleListProperty
 ;%0A%0Ap
@@ -731,18 +731,16 @@
 status;%0A
-//
     priv
@@ -749,21 +749,19 @@
 e final 
-Objec
+Lis
 tPropert
@@ -776,18 +776,16 @@
 teristic
-%5B%5D
 %3E charac
@@ -792,16 +792,17 @@
 teristic
+s
 ;%0A%0A%0A    
@@ -1131,10 +1131,8 @@
 );%0A%0A
-//
     
@@ -1154,16 +1154,17 @@
 teristic
+s
  = new S
@@ -1172,13 +1172,11 @@
 mple
-Objec
+Lis
 tPro
@@ -1199,15 +1199,70 @@
 stic
-%5B%5D
 %3E();%0A
+        this.characteristics.add(new Characteristic());%0A%0A
 %0A   

add proppery characteristics in Offer