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

net.sf.andromedaioc.model.beans.PropertyModel Maven / Gradle / Ivy

The newest version!
package net.sf.andromedaioc.model.beans;

public class PropertyModel extends AbstractParameterModel {

    private String name;
    private PropertyAccessType accessType;

    public static PropertyModelBuilder getBuilder() {
        return new PropertyModelBuilder();
    }

    private PropertyModel() {
    }

    public String getName() {
        return name;
    }

    private void setName(String name) {
        this.name = name;
    }

    public PropertyAccessType getAccessType() {
        return accessType;
    }

    private void setAccessType(PropertyAccessType accessType) {
        this.accessType = accessType;
    }

    public static class PropertyModelBuilder {

        private final PropertyModel instance;

        private PropertyModelBuilder() {
            instance = new PropertyModel();
        }

        public PropertyModelBuilder withName(String name) {
            instance.setName(name);
            return this;
        }

        public PropertyModelBuilder withAccessType(PropertyAccessType accessType) {
            instance.setAccessType(accessType);
            return this;
        }

        public PropertyModelBuilder withValue(ValueModel value) {
            instance.setValue(value);
            return this;
        }

        public PropertyModel build() {
            return instance;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy