package org.whole.lang.xsd.mapping.model.impl;
import org.whole.lang.model.AbstractDataEntity;
import org.whole.lang.xsd.mapping.model.*;
import org.whole.lang.xsd.mapping.visitors.IMappingVisitor;
import org.whole.lang.xsd.mapping.reflect.MappingEntityDescriptorEnum;
import org.whole.lang.reflect.EntityDescriptor;
/**
* @generator Whole
*/
public class BooleanTypeImpl extends AbstractDataEntity implements BooleanType {
private static final long serialVersionUID = 1;
private boolean value;
public boolean isValue() {
return notifyRequested(value);
}
public void setValue(boolean value) {
notifyChanged(this.value, this.value = value);
}
public void accept(IMappingVisitor visitor) {
try {
visitor.visit(this);
} catch (Exception e) {
throw org.whole.lang.exceptions.IWholeRuntimeException.asWholeException(e, this, visitor.getBindings());
}
}
public int wGetEntityOrd() {
return MappingEntityDescriptorEnum.BooleanType_ord;
}
public EntityDescriptor<BooleanType> wGetEntityDescriptor() {
return MappingEntityDescriptorEnum.BooleanType;
}
public Object wGetValue() {
return new Boolean(isValue());
}
public void wSetValue(Object value) {
setValue(((Boolean) value).booleanValue());
}
public String wStringValue() {
return toString();
}
public void wSetValue(String value) {
try {
setValue(Boolean.valueOf(value).booleanValue());
} catch (NumberFormatException e) {
}
}
public boolean wBooleanValue() {
return isValue();
}
public void wSetValue(boolean value) {
setValue(value);
}
}