com.github.lontime.extjobrunr.beans.problems.NewJobRunrVersionProblemBean Maven / Gradle / Ivy
package com.github.lontime.extjobrunr.beans.problems;
import java.util.Map;
import org.jobrunr.dashboard.ui.model.problems.NewJobRunrVersionProblem;
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 NewJobRunrVersionProblemBean implements Bean {
@PropertyDefinition
public String type;
@PropertyDefinition
private String latestVersion;
public NewJobRunrVersionProblemBean() {
}
public NewJobRunrVersionProblemBean(NewJobRunrVersionProblem problem) {
this.type = NewJobRunrVersionProblem.PROBLEM_TYPE;
this.latestVersion = problem.getLatestVersion();
}
//------------------------- AUTOGENERATED START -------------------------
/**
* The meta-bean for {@code NewJobRunrVersionProblemBean}.
* @return the meta-bean, not null
*/
public static NewJobRunrVersionProblemBean.Meta meta() {
return NewJobRunrVersionProblemBean.Meta.INSTANCE;
}
static {
MetaBean.register(NewJobRunrVersionProblemBean.Meta.INSTANCE);
}
@Override
public NewJobRunrVersionProblemBean.Meta metaBean() {
return NewJobRunrVersionProblemBean.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 latestVersion.
* @return the value of the property
*/
public String getLatestVersion() {
return latestVersion;
}
/**
* Sets the latestVersion.
* @param latestVersion the new value of the property
*/
public void setLatestVersion(String latestVersion) {
this.latestVersion = latestVersion;
}
/**
* Gets the the {@code latestVersion} property.
* @return the property, not null
*/
public final Property latestVersion() {
return metaBean().latestVersion().createProperty(this);
}
//-----------------------------------------------------------------------
@Override
public NewJobRunrVersionProblemBean clone() {
return JodaBeanUtils.cloneAlways(this);
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj != null && obj.getClass() == this.getClass()) {
NewJobRunrVersionProblemBean other = (NewJobRunrVersionProblemBean) obj;
return JodaBeanUtils.equal(getType(), other.getType()) &&
JodaBeanUtils.equal(getLatestVersion(), other.getLatestVersion());
}
return false;
}
@Override
public int hashCode() {
int hash = getClass().hashCode();
hash = hash * 31 + JodaBeanUtils.hashCode(getType());
hash = hash * 31 + JodaBeanUtils.hashCode(getLatestVersion());
return hash;
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder(96);
buf.append("NewJobRunrVersionProblemBean{");
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("latestVersion").append('=').append(JodaBeanUtils.toString(getLatestVersion())).append(',').append(' ');
}
//-----------------------------------------------------------------------
/**
* The meta-bean for {@code NewJobRunrVersionProblemBean}.
*/
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", NewJobRunrVersionProblemBean.class, String.class);
/**
* The meta-property for the {@code latestVersion} property.
*/
private final MetaProperty latestVersion = DirectMetaProperty.ofReadWrite(
this, "latestVersion", NewJobRunrVersionProblemBean.class, String.class);
/**
* The meta-properties.
*/
private final Map> metaPropertyMap$ = new DirectMetaPropertyMap(
this, null,
"type",
"latestVersion");
/**
* Restricted constructor.
*/
protected Meta() {
}
@Override
protected MetaProperty> metaPropertyGet(String propertyName) {
switch (propertyName.hashCode()) {
case 3575610: // type
return type;
case -2027622575: // latestVersion
return latestVersion;
}
return super.metaPropertyGet(propertyName);
}
@Override
public BeanBuilder extends NewJobRunrVersionProblemBean> builder() {
return new DirectBeanBuilder<>(new NewJobRunrVersionProblemBean());
}
@Override
public Class extends NewJobRunrVersionProblemBean> beanType() {
return NewJobRunrVersionProblemBean.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 latestVersion} property.
* @return the meta-property, not null
*/
public final MetaProperty latestVersion() {
return latestVersion;
}
//-----------------------------------------------------------------------
@Override
protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
switch (propertyName.hashCode()) {
case 3575610: // type
return ((NewJobRunrVersionProblemBean) bean).getType();
case -2027622575: // latestVersion
return ((NewJobRunrVersionProblemBean) bean).getLatestVersion();
}
return super.propertyGet(bean, propertyName, quiet);
}
@Override
protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
switch (propertyName.hashCode()) {
case 3575610: // type
((NewJobRunrVersionProblemBean) bean).setType((String) newValue);
return;
case -2027622575: // latestVersion
((NewJobRunrVersionProblemBean) bean).setLatestVersion((String) newValue);
return;
}
super.propertySet(bean, propertyName, newValue, quiet);
}
}
//-------------------------- AUTOGENERATED END --------------------------
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy