/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.web.function; import java.util.Map; import org.joda.beans.Bean; import org.joda.beans.BeanBuilder; import org.joda.beans.BeanDefinition; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaProperty; import org.joda.beans.Property; import org.joda.beans.PropertyDefinition; import org.joda.beans.impl.direct.DirectBean; 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; /** * A function search request from the green screen. */ @BeanDefinition public class WebFunctionSearchRequest extends DirectBean { @PropertyDefinition private String _name; @PropertyDefinition private String _parameterized; //------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF /** * The meta-bean for {@code WebFunctionSearchRequest}. * @return the meta-bean, not null */ public static WebFunctionSearchRequest.Meta meta() { return WebFunctionSearchRequest.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(WebFunctionSearchRequest.Meta.INSTANCE); } @Override public WebFunctionSearchRequest.Meta metaBean() { return WebFunctionSearchRequest.Meta.INSTANCE; } //----------------------------------------------------------------------- /** * Gets the name. * @return the value of the property */ public String getName() { return _name; } /** * Sets the name. * @param name the new value of the property */ public void setName(String name) { this._name = name; } /** * Gets the the {@code name} property. * @return the property, not null */ public final Property<String> name() { return metaBean().name().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the parameterized. * @return the value of the property */ public String getParameterized() { return _parameterized; } /** * Sets the parameterized. * @param parameterized the new value of the property */ public void setParameterized(String parameterized) { this._parameterized = parameterized; } /** * Gets the the {@code parameterized} property. * @return the property, not null */ public final Property<String> parameterized() { return metaBean().parameterized().createProperty(this); } //----------------------------------------------------------------------- @Override public WebFunctionSearchRequest clone() { return JodaBeanUtils.cloneAlways(this); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == this.getClass()) { WebFunctionSearchRequest other = (WebFunctionSearchRequest) obj; return JodaBeanUtils.equal(getName(), other.getName()) && JodaBeanUtils.equal(getParameterized(), other.getParameterized()); } return false; } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + JodaBeanUtils.hashCode(getName()); hash = hash * 31 + JodaBeanUtils.hashCode(getParameterized()); return hash; } @Override public String toString() { StringBuilder buf = new StringBuilder(96); buf.append("WebFunctionSearchRequest{"); 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("name").append('=').append(JodaBeanUtils.toString(getName())).append(',').append(' '); buf.append("parameterized").append('=').append(JodaBeanUtils.toString(getParameterized())).append(',').append(' '); } //----------------------------------------------------------------------- /** * The meta-bean for {@code WebFunctionSearchRequest}. */ 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 name} property. */ private final MetaProperty<String> _name = DirectMetaProperty.ofReadWrite( this, "name", WebFunctionSearchRequest.class, String.class); /** * The meta-property for the {@code parameterized} property. */ private final MetaProperty<String> _parameterized = DirectMetaProperty.ofReadWrite( this, "parameterized", WebFunctionSearchRequest.class, String.class); /** * The meta-properties. */ private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap( this, null, "name", "parameterized"); /** * Restricted constructor. */ protected Meta() { } @Override protected MetaProperty<?> metaPropertyGet(String propertyName) { switch (propertyName.hashCode()) { case 3373707: // name return _name; case -378779463: // parameterized return _parameterized; } return super.metaPropertyGet(propertyName); } @Override public BeanBuilder<? extends WebFunctionSearchRequest> builder() { return new DirectBeanBuilder<WebFunctionSearchRequest>(new WebFunctionSearchRequest()); } @Override public Class<? extends WebFunctionSearchRequest> beanType() { return WebFunctionSearchRequest.class; } @Override public Map<String, MetaProperty<?>> metaPropertyMap() { return _metaPropertyMap$; } //----------------------------------------------------------------------- /** * The meta-property for the {@code name} property. * @return the meta-property, not null */ public final MetaProperty<String> name() { return _name; } /** * The meta-property for the {@code parameterized} property. * @return the meta-property, not null */ public final MetaProperty<String> parameterized() { return _parameterized; } //----------------------------------------------------------------------- @Override protected Object propertyGet(Bean bean, String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case 3373707: // name return ((WebFunctionSearchRequest) bean).getName(); case -378779463: // parameterized return ((WebFunctionSearchRequest) bean).getParameterized(); } return super.propertyGet(bean, propertyName, quiet); } @Override protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case 3373707: // name ((WebFunctionSearchRequest) bean).setName((String) newValue); return; case -378779463: // parameterized ((WebFunctionSearchRequest) bean).setParameterized((String) newValue); return; } super.propertySet(bean, propertyName, newValue, quiet); } } ///CLOVER:ON //-------------------------- AUTOGENERATED END -------------------------- }