package my.co.sample.{{ cls.package.parent.name | case_package }}.{{ cls.package.name | case_package }};

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class {{ cls.name | case_class }}()
{
    {% for attr in cls.attributes %}{% if attr.is_id %}
    @Id{% endif %}
    @Column (name = "{{attr.name | case_attribute}}"{% if attr.dest_type == 'String' %}, length={{attr.length}}{% endif %})
    private {{attr.dest_type}} {{attr.name}};
    {% endfor %}{% for assoc in cls.associations_from %}
    @Expandable (name = "{{assoc.source_name | case_attribute}}", expandableClass = {{ assoc.destination.name | case_attribute }}.class)
    private {{assoc.destination.name | case_attribute}} {{assoc.source_name | case_attribute}};
    {% endfor %}{% for attr in cls.attributes %}
    public {{ attr.dest_type }} get{{ attr.name | case_attribute }}() {
        return {{ attr.name }};
    }

    public void set{{ attr.name | case_attribute }}({{ attr.dest_type }} {{ attr.name | case_attribute }}) {
        this.{{ attr.name | case_attribute }} = {{ attr.name | case_attribute }};
    }    
    {% endfor %}
}
