All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.xmlform.config.DefaultDefinition Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package net.sf.xmlform.config;

import net.sf.xmlform.util.I18NTexts;

/**
 * @author Liu Zhikun
 */

public class DefaultDefinition implements Cloneable {
		static public final String INIT_ALWAYS="3";//只在前台初始值,在手动修改前总是计算
		static public final String NEW_ALWAYS="2"; //前后台只在新建状态计算
		static public final String NEWMODIFIED_ALWAYS="1";//前后台新建和修改状态计算
		static public final String NULL_ALWAYS="0";//前后台只要为空就计算
		String value;
		String always="0";
		private I18NTexts texts=new I18NTexts();
		public String getValue() {
			return value;
		}
		public void setValue(String value) {
			this.value = value;
		}
		public String getAlways() {
			return always;
		}
		public void setAlways(String always) {
			if(NEWMODIFIED_ALWAYS.equals(always))
				this.always=NEWMODIFIED_ALWAYS;
			else if(NEW_ALWAYS.equals(always))
				this.always=NEW_ALWAYS;
			else if(INIT_ALWAYS.equals(always)){
				this.always=INIT_ALWAYS;
			}else
				this.always=NULL_ALWAYS;
		}
		public I18NTexts getTexts() {
			return texts;
		}
		public void setTexts(I18NTexts texts) {
			this.texts = texts;
		}
		public Object clone() {
			try {
				DefaultDefinition cloneObj=(DefaultDefinition)super.clone();
				cloneObj.value=value;
				cloneObj.always=always;
				cloneObj.texts=(I18NTexts)texts.clone();
				return cloneObj;			    
			} catch (CloneNotSupportedException e) {
			    throw new IllegalStateException(e);
			}
		}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy