DDL
CREATE TABLE `sidelite` (
`id` int(11) NOT NULL auto_increment,
`part_number` text,
`glassstyle_id` int(11) default NULL,
`category` int(11) default NULL,
`doorstyle_id` text,
`surfacetype` text,
`camingcolor_id` int(11) default NULL,
`dimension_ids` text,
`glass_dimension_id` int(11) default NULL,
`cutout_dimension_id` int(11) default NULL,
`is_daylight` int(1) default '0',
`notes` text,
PRIMARY KEY (`id`)
) TYPE=MyISAM
Java Code
Code:
package com.crosscomm.plastpro.model;
import java.util.Set;
public class Sidelite {
private Long id;
private String partNumber;
private GlassStyle glassStyle;
private Category category;
private String style;
private String surfaceType;
private CamingColor caming;
private Set dimensions;
private Dimension glassDimension;
private Dimension cutoutDimension;
private boolean daylight;
private String notes;
public Sidelite() {
glassStyle = new GlassStyle();
category = new Category();
caming = new CamingColor();
glassDimension = new Dimension();
cutoutDimension = new Dimension();
}
public CamingColor getCaming() {
return caming;
}
public void setCaming(CamingColor caming) {
this.caming = caming;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public Dimension getCutoutDimension() {
return cutoutDimension;
}
public void setCutoutDimension(Dimension cutoutDimension) {
this.cutoutDimension = cutoutDimension;
}
public boolean isDaylight() {
return daylight;
}
public void setDaylight(boolean daylight) {
this.daylight = daylight;
}
public Set getDimensions() {
return dimensions;
}
public void setDimensions(Set dimensions) {
this.dimensions = dimensions;
}
public Dimension getGlassDimension() {
return glassDimension;
}
public void setGlassDimension(Dimension glassDimension) {
this.glassDimension = glassDimension;
}
public GlassStyle getGlassStyle() {
if (glassStyle == null) {
glassStyle = new GlassStyle();
}
return glassStyle;
}
public void setGlassStyle(GlassStyle glassStyle) {
this.glassStyle = glassStyle;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPartNumber() {
return partNumber;
}
public void setPartNumber(String partNumber) {
this.partNumber = partNumber;
}
public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
public String getSurfaceType() {
return surfaceType;
}
public void setSurfaceType(String surfaceType) {
this.surfaceType = surfaceType;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
}