工厂版本管理系统,STRUTS2框架,用于管理商品的版本,便于有效的控制版本

源代码在线查看: fielddefinition.java

软件大小: 1605 K
上传用户: foreverlovely
关键词: STRUTS 版本 工厂
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.utstar.fcs.domain.workinstruction;
				
				public class FieldDefinition {
					private Long id;
					private String name;
					private String parameter1;
					private String parameter2;
					private StationType stationType;
					private FieldType fieldType;// such as string, memo, file
					
				
					public FieldDefinition() {
						// TODO Auto-generated constructor stub
					}
				
					public FieldDefinition(String name, FieldType fieldType) {
						this.name = name;
						this.fieldType = fieldType;
					}
				
					public FieldDefinition(String name, FieldType fieldType, String parameter1) {
						this.name = name;
						this.fieldType = fieldType;
						this.parameter1 = parameter1;
					}
				
					public FieldDefinition(String name, FieldType fieldType, String parameter1,
							String parameter2) {
						this.name = name;
						this.fieldType = fieldType;
						this.parameter1 = parameter1;
						this.parameter2 = parameter2;
					}
					
					@Override
					public int hashCode() {		
						return id.intValue();
					}
					
					@Override
					public boolean equals(Object obj) {
						if(obj!=null && this !=null)
							return this.id.equals(((FieldDefinition)obj).getId());
						else
							return false;
					}
				
					public Long getId() {
						return id;
					}
				
					public void setId(Long id) {
						this.id = id;
					}
				
					public String getName() {
						return name;
					}
				
					public void setName(String name) {
						this.name = name;
					}
				
					public StationType getStationType() {
						return stationType;
					}
				
					public void setStationType(StationType stationType) {
						this.stationType = stationType;
					}
				
					public FieldType getFieldType() {
						return fieldType;
					}
				
					public void setFieldType(FieldType fieldType) {
						this.fieldType = fieldType;
					}
				
					
				
					public String getParameter1() {
						return parameter1;
					}
				
					public void setParameter1(String parameter1) {
						this.parameter1 = parameter1;
					}
				
					public String getParameter2() {
						return parameter2;
					}
				
					public void setParameter2(String parameter2) {
						this.parameter2 = parameter2;
					}
					
					public String[] getParameter1AsArray(){
						return parameter1.split(",");
					}
					
					public String[] getParameter2AsArray(){
						return parameter2.split(",");
					}
				
					public String getStringId(){
						return "fdid"+id;
					}
				}
							

相关资源