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

com.github.lontime.extjobrunr.beans.problems.ScheduledJobsNotFoundProblemBean Maven / Gradle / Ivy

package com.github.lontime.extjobrunr.beans.problems;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.jobrunr.dashboard.ui.model.problems.ScheduledJobsNotFoundProblem;
import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaBean;
import org.joda.beans.MetaProperty;
import org.joda.beans.Property;
import org.joda.beans.gen.BeanDefinition;
import org.joda.beans.gen.PropertyDefinition;
import org.joda.beans.impl.direct.DirectBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaBean;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;

@BeanDefinition
public class ScheduledJobsNotFoundProblemBean implements Bean {
    @PropertyDefinition
    public String type;

    @PropertyDefinition
    private Set jobsNotFound;

    public ScheduledJobsNotFoundProblemBean() {
    }

    public ScheduledJobsNotFoundProblemBean(ScheduledJobsNotFoundProblem problem) {
        this.type = ScheduledJobsNotFoundProblem.PROBLEM_TYPE;
        this.jobsNotFound = new HashSet<>(problem.getJobsNotFound());
    }
    //------------------------- AUTOGENERATED START -------------------------
    /**
     * The meta-bean for {@code ScheduledJobsNotFoundProblemBean}.
     * @return the meta-bean, not null
     */
    public static ScheduledJobsNotFoundProblemBean.Meta meta() {
        return ScheduledJobsNotFoundProblemBean.Meta.INSTANCE;
    }

    static {
        MetaBean.register(ScheduledJobsNotFoundProblemBean.Meta.INSTANCE);
    }

    @Override
    public ScheduledJobsNotFoundProblemBean.Meta metaBean() {
        return ScheduledJobsNotFoundProblemBean.Meta.INSTANCE;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the type.
     * @return the value of the property
     */
    public String getType() {
        return type;
    }

    /**
     * Sets the type.
     * @param type  the new value of the property
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * Gets the the {@code type} property.
     * @return the property, not null
     */
    public final Property type() {
        return metaBean().type().createProperty(this);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the jobsNotFound.
     * @return the value of the property
     */
    public Set getJobsNotFound() {
        return jobsNotFound;
    }

    /**
     * Sets the jobsNotFound.
     * @param jobsNotFound  the new value of the property
     */
    public void setJobsNotFound(Set jobsNotFound) {
        this.jobsNotFound = jobsNotFound;
    }

    /**
     * Gets the the {@code jobsNotFound} property.
     * @return the property, not null
     */
    public final Property> jobsNotFound() {
        return metaBean().jobsNotFound().createProperty(this);
    }

    //-----------------------------------------------------------------------
    @Override
    public ScheduledJobsNotFoundProblemBean clone() {
        return JodaBeanUtils.cloneAlways(this);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj != null && obj.getClass() == this.getClass()) {
            ScheduledJobsNotFoundProblemBean other = (ScheduledJobsNotFoundProblemBean) obj;
            return JodaBeanUtils.equal(getType(), other.getType()) &&
                    JodaBeanUtils.equal(getJobsNotFound(), other.getJobsNotFound());
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = getClass().hashCode();
        hash = hash * 31 + JodaBeanUtils.hashCode(getType());
        hash = hash * 31 + JodaBeanUtils.hashCode(getJobsNotFound());
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder buf = new StringBuilder(96);
        buf.append("ScheduledJobsNotFoundProblemBean{");
        int len = buf.length();
        toString(buf);
        if (buf.length() > len) {
            buf.setLength(buf.length() - 2);
        }
        buf.append('}');
        return buf.toString();
    }

    protected void toString(StringBuilder buf) {
        buf.append("type").append('=').append(JodaBeanUtils.toString(getType())).append(',').append(' ');
        buf.append("jobsNotFound").append('=').append(JodaBeanUtils.toString(getJobsNotFound())).append(',').append(' ');
    }

    //-----------------------------------------------------------------------
    /**
     * The meta-bean for {@code ScheduledJobsNotFoundProblemBean}.
     */
    public static class Meta extends DirectMetaBean {
        /**
         * The singleton instance of the meta-bean.
         */
        static final Meta INSTANCE = new Meta();

        /**
         * The meta-property for the {@code type} property.
         */
        private final MetaProperty type = DirectMetaProperty.ofReadWrite(
                this, "type", ScheduledJobsNotFoundProblemBean.class, String.class);
        /**
         * The meta-property for the {@code jobsNotFound} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty> jobsNotFound = DirectMetaProperty.ofReadWrite(
                this, "jobsNotFound", ScheduledJobsNotFoundProblemBean.class, (Class) Set.class);
        /**
         * The meta-properties.
         */
        private final Map> metaPropertyMap$ = new DirectMetaPropertyMap(
                this, null,
                "type",
                "jobsNotFound");

        /**
         * Restricted constructor.
         */
        protected Meta() {
        }

        @Override
        protected MetaProperty metaPropertyGet(String propertyName) {
            switch (propertyName.hashCode()) {
                case 3575610:  // type
                    return type;
                case 1040405221:  // jobsNotFound
                    return jobsNotFound;
            }
            return super.metaPropertyGet(propertyName);
        }

        @Override
        public BeanBuilder builder() {
            return new DirectBeanBuilder<>(new ScheduledJobsNotFoundProblemBean());
        }

        @Override
        public Class beanType() {
            return ScheduledJobsNotFoundProblemBean.class;
        }

        @Override
        public Map> metaPropertyMap() {
            return metaPropertyMap$;
        }

        //-----------------------------------------------------------------------
        /**
         * The meta-property for the {@code type} property.
         * @return the meta-property, not null
         */
        public final MetaProperty type() {
            return type;
        }

        /**
         * The meta-property for the {@code jobsNotFound} property.
         * @return the meta-property, not null
         */
        public final MetaProperty> jobsNotFound() {
            return jobsNotFound;
        }

        //-----------------------------------------------------------------------
        @Override
        protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
            switch (propertyName.hashCode()) {
                case 3575610:  // type
                    return ((ScheduledJobsNotFoundProblemBean) bean).getType();
                case 1040405221:  // jobsNotFound
                    return ((ScheduledJobsNotFoundProblemBean) bean).getJobsNotFound();
            }
            return super.propertyGet(bean, propertyName, quiet);
        }

        @SuppressWarnings("unchecked")
        @Override
        protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
            switch (propertyName.hashCode()) {
                case 3575610:  // type
                    ((ScheduledJobsNotFoundProblemBean) bean).setType((String) newValue);
                    return;
                case 1040405221:  // jobsNotFound
                    ((ScheduledJobsNotFoundProblemBean) bean).setJobsNotFound((Set) newValue);
                    return;
            }
            super.propertySet(bean, propertyName, newValue, quiet);
        }

    }

    //-------------------------- AUTOGENERATED END --------------------------
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy