gt:             return setByName("FieldName", value);
context: /**
   * Genji Scrum Tool and Issue Tracker
   * Copyright (C) 2015 Steinbeis GmbH & Co. KG Task Management Solutions
  
   * <a href="http://www.trackplus.com">Genji Scrum Tool</a>
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   * GNU General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
   * along with this program. If not, see <http://www.gnu.org/licenses/>.
   */
  
  /* $Id:$ */
  
  package com.aurel.track.persist;
  
  
  import java.math.BigDecimal;
  import java.sql.Connection;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Date;
  import java.util.List;
  
  import org.apache.commons.lang.ObjectUtils;
  import org.apache.torque.TorqueException;
  import org.apache.torque.map.TableMap;
  import org.apache.torque.om.BaseObject;
  import org.apache.torque.om.ComboKey;
  import org.apache.torque.om.DateKey;
  import org.apache.torque.om.NumberKey;
  import org.apache.torque.om.ObjectKey;
  import org.apache.torque.om.SimpleKey;
  import org.apache.torque.om.StringKey;
  import org.apache.torque.om.Persistent;
  import org.apache.torque.util.Criteria;
  import org.apache.torque.util.Transaction;
  
  
  
  import com.aurel.track.persist.TListType;
  import com.aurel.track.persist.TListTypePeer;
  import com.aurel.track.persist.TProjectType;
  import com.aurel.track.persist.TProjectTypePeer;
  
    import org.apache.commons.collections.map.IdentityMap;
  import java.util.Iterator;
  import com.aurel.track.beans.TDisableFieldBean;
  import com.aurel.track.beans.TListTypeBean;
  import com.aurel.track.beans.TProjectTypeBean;
  
  
  
  /**
   * You should not use this class directly.  It should not even be
   * extended all references should be to TDisableField
   */
  public abstract class BaseTDisableField extends TpBaseObject
  {
      /** The Peer class */
      private static final TDisableFieldPeer peer =
          new TDisableFieldPeer();
  
  
      /** The value for the objectID field */
      private Integer objectID;
  
      /** The value for the fieldName field */
      private String fieldName;
  
      /** The value for the listType field */
      private Integer listType;
  
      /** The value for the projectType field */
      private Integer projectType;
  
      /** The value for the uuid field */
      private String uuid;
  
  
      /**
       * Get the ObjectID
       *
       * @return Integer
       */
      public Integer getObjectID()
      {
          return objectID;
      }
  
  
      /**
       * Set the value of ObjectID
       *
       * @param v new value
       */
      public void setObjectID(Integer v) 
      {
  
          if (!ObjectUtils.equals(this.objectID, v))
          {
              this.objectID = v;
              setModified(true);
          }
  
  
      }
  
      /**
       * Get the FieldName
       *
       * @return String
       */
      public String getFieldName()
      {
          return fieldName;
      }
  
  
      /**
       * Set the value of FieldName
       *
       * @param v new value
       */
      public void setFieldName(String v) 
      {
  
          if (!ObjectUtils.equals(this.fieldName, v))
          {
              this.fieldName = v;
              setModified(true);
          }
  
  
      }
  
      /**
       * Get the ListType
       *
       * @return Integer
       */
      public Integer getListType()
      {
          return listType;
      }
  
  
      /**
       * Set the value of ListType
       *
       * @param v new value
       */
      public void setListType(Integer v) throws TorqueException
      {
  
          if (!ObjectUtils.equals(this.listType, v))
          {
              this.listType = v;
              setModified(true);
          }
  
  
          if (aTListType != null && !ObjectUtils.equals(aTListType.getObjectID(), v))
          {
              aTListType = null;
          }
  
      }
  
      /**
       * Get the ProjectType
       *
       * @return Integer
       */
      public Integer getProjectType()
      {
          return projectType;
      }
  
  
      /**
       * Set the value of ProjectType
       *
       * @param v new value
       */
      public void setProjectType(Integer v) throws TorqueException
      {
  
          if (!ObjectUtils.equals(this.projectType, v))
          {
              this.projectType = v;
              setModified(true);
          }
  
  
          if (aTProjectType != null && !ObjectUtils.equals(aTProjectType.getObjectID(), v))
          {
              aTProjectType = null;
          }
  
      }
  
      /**
       * Get the Uuid
       *
       * @return String
       */
      public String getUuid()
      {
          return uuid;
      }
  
  
      /**
       * Set the value of Uuid
       *
       * @param v new value
       */
      public void setUuid(String v) 
      {
  
          if (!ObjectUtils.equals(this.uuid, v))
          {
              this.uuid = v;
              setModified(true);
          }
  
  
      }
  
      
  
  
  
      private TListType aTListType;
  
      /**
       * Declares an association between this object and a TListType object
       *
       * @param v TListType
       * @throws TorqueException
       */
      public void setTListType(TListType v) throws TorqueException
      {
          if (v == null)
          {
              setListType((Integer) null);
          }
          else
          {
              setListType(v.getObjectID());
          }
          aTListType = v;
      }
  
  
      /**
       * Returns the associated TListType object.
       * If it was not retrieved before, the object is retrieved from
       * the database
       *
       * @return the associated TListType object
       * @throws TorqueException
       */
      public TListType getTListType()
          throws TorqueException
      {
          if (aTListType == null && (!ObjectUtils.equals(this.listType, null)))
          {
              aTListType = TListTypePeer.retrieveByPK(SimpleKey.keyFor(this.listType));
          }
          return aTListType;
      }
  
      /**
       * Return the associated TListType object
       * If it was not retrieved before, the object is retrieved from
       * the database using the passed connection
       *
       * @param connection the connection used to retrieve the associated object
       *        from the database, if it was not retrieved before
       * @return the associated TListType object
       * @throws TorqueException
       */
      public TListType getTListType(Connection connection)
          throws TorqueException
      {
          if (aTListType == null && (!ObjectUtils.equals(this.listType, null)))
          {
              aTListType = TListTypePeer.retrieveByPK(SimpleKey.keyFor(this.listType), connection);
          }
          return aTListType;
      }
  
      /**
       * Provides convenient way to set a relationship based on a
       * ObjectKey, for example
       * <code>bar.setFooKey(foo.getPrimaryKey())</code>
       *
       */
      public void setTListTypeKey(ObjectKey key) throws TorqueException
      {
  
          setListType(new Integer(((NumberKey) key).intValue()));
      }
  
  
  
  
      private TProjectType aTProjectType;
  
      /**
       * Declares an association between this object and a TProjectType object
       *
       * @param v TProjectType
       * @throws TorqueException
       */
      public void setTProjectType(TProjectType v) throws TorqueException
      {
          if (v == null)
          {
              setProjectType((Integer) null);
          }
          else
          {
              setProjectType(v.getObjectID());
          }
          aTProjectType = v;
      }
  
  
      /**
       * Returns the associated TProjectType object.
       * If it was not retrieved before, the object is retrieved from
       * the database
       *
       * @return the associated TProjectType object
       * @throws TorqueException
       */
      public TProjectType getTProjectType()
          throws TorqueException
      {
          if (aTProjectType == null && (!ObjectUtils.equals(this.projectType, null)))
          {
              aTProjectType = TProjectTypePeer.retrieveByPK(SimpleKey.keyFor(this.projectType));
          }
          return aTProjectType;
      }
  
      /**
       * Return the associated TProjectType object
       * If it was not retrieved before, the object is retrieved from
       * the database using the passed connection
       *
       * @param connection the connection used to retrieve the associated object
       *        from the database, if it was not retrieved before
       * @return the associated TProjectType object
       * @throws TorqueException
       */
      public TProjectType getTProjectType(Connection connection)
          throws TorqueException
      {
          if (aTProjectType == null && (!ObjectUtils.equals(this.projectType, null)))
          {
              aTProjectType = TProjectTypePeer.retrieveByPK(SimpleKey.keyFor(this.projectType), connection);
          }
          return aTProjectType;
      }
  
      /**
       * Provides convenient way to set a relationship based on a
       * ObjectKey, for example
       * <code>bar.setFooKey(foo.getPrimaryKey())</code>
       *
       */
      public void setTProjectTypeKey(ObjectKey key) throws TorqueException
      {
  
          setProjectType(new Integer(((NumberKey) key).intValue()));
      }
     
          
      private static List<String> fieldNames = null;
  
      /**
       * Generate a list of field names.
       *
       * @return a list of field names
       */
      public static synchronized List<String> getFieldNames()
      {
          if (fieldNames == null)
          {
              fieldNames = new ArrayList<String>();
              fieldNames.add("ObjectID");
              fieldNames.add("FieldName");
              fieldNames.add("ListType");
              fieldNames.add("ProjectType");
              fieldNames.add("Uuid");
              fieldNames = Collections.unmodifiableList(fieldNames);
          }
          return fieldNames;
      }
  
      /**
       * Retrieves a field from the object by field (Java) name passed in as a String.
       *
       * @param name field name
       * @return value
       */
      public Object getByName(String name)
      {
          if (name.equals("ObjectID"))
          {
              return getObjectID();
          }
          if (name.equals("FieldName"))
          {
              return getFieldName();
          }
          if (name.equals("ListType"))
          {
              return getListType();
          }
          if (name.equals("ProjectType"))
          {
              return getProjectType();
          }
          if (name.equals("Uuid"))
          {
              return getUuid();
          }
          return null;
      }
  
      /**
       * Set a field in the object by field (Java) name.
       *
       * @param name field name
       * @param value field value
       * @return True if value was set, false if not (invalid name / protected field).
       * @throws IllegalArgumentException if object type of value does not match field object type.
       * @throws TorqueException If a problem occurs with the set[Field] method.
       */
      public boolean setByName(String name, Object value )
          throws TorqueException, IllegalArgumentException
      {
          if (name.equals("ObjectID"))
          {
              // Object fields can be null
              if (value != null && ! Integer.class.isInstance(value))
              {
                  throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
              }
              setObjectID((Integer) value);
              return true;
          }
          if (name.equals("FieldName"))
          {
              // Object fields can be null
              if (value != null && ! String.class.isInstance(value))
              {
                  throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
              }
              setFieldName((String) value);
              return true;
          }
          if (name.equals("ListType"))
          {
              // Object fields can be null
              if (value != null && ! Integer.class.isInstance(value))
              {
                  throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
              }
              setListType((Integer) value);
              return true;
          }
          if (name.equals("ProjectType"))
          {
              // Object fields can be null
              if (value != null && ! Integer.class.isInstance(value))
              {
                  throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
              }
              setProjectType((Integer) value);
              return true;
          }
          if (name.equals("Uuid"))
          {
              // Object fields can be null
              if (value != null && ! String.class.isInstance(value))
              {
                  throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
              }
              setUuid((String) value);
              return true;
          }
          return false;
      }
  
      /**
       * Retrieves a field from the object by name passed in
       * as a String.  The String must be one of the static
       * Strings defined in this Class' Peer.
       *
       * @param name peer name
       * @return value
       */
      public Object getByPeerName(String name)
      {
          if (name.equals(TDisableFieldPeer.OBJECTID))
          {
              return getObjectID();
          }
          if (name.equals(TDisableFieldPeer.FIELDNAME))
          {
              return getFieldName();
          }
          if (name.equals(TDisableFieldPeer.LISTTYPE))
          {
              return getListType();
          }
          if (name.equals(TDisableFieldPeer.PROJECTTYPE))
          {
              return getProjectType();
          }
          if (name.equals(TDisableFieldPeer.TPUUID))
          {
              return getUuid();
          }
          return null;
      }
  
      /**
       * Set field values by Peer Field Name
       *
       * @param name field name
       * @param value field value
       * @return True if value was set, false if not (invalid name / protected field).
       * @throws IllegalArgumentException if object type of value does not match field object type.
       * @throws TorqueException If a problem occurs with the set[Field] method.
       */
      public boolean setByPeerName(String name, Object value)
          throws TorqueException, IllegalArgumentException
      {
        if (TDisableFieldPeer.OBJECTID.equals(name))
          {
              return setByName("ObjectID", value);
          }
        if (TDisableFieldPeer.FIELDNAME.equals(name))
          {
              return setByName("FieldName", value);
          }
        if (TDisableFieldPeer.LISTTYPE.equals(name))
          {
              return setByName("ListType", value);
          }
        if (TDisableFieldPeer.PROJECTTYPE.equals(name))
          {
              return setByName("ProjectType", value);
          }
        if (TDisableFieldPeer.TPUUID.equals(name))
          {
              return setByName("Uuid", value);
          }
          return false;
      }
  
      /**
       * Retrieves a field from the object by Position as specified
       * in the xml schema.  Zero-based.
       *
       * @param pos position in xml schema
       * @return value
       */
      public Object getByPosition(int pos)
      {
          if (pos == 0)
          {
              return getObjectID();
          }
          if (pos == 1)
          {
              return getFieldName();
          }
          if (pos == 2)
          {
              return getListType();
          }
          if (pos == 3)
          {
              return getProjectType();
          }
          if (pos == 4)
          {
              return getUuid();
          }
          return null;
      }
  
      /**
       * Set field values by its position (zero based) in the XML schema.
       *
       * @param position The field position
       * @param value field value
       * @return True if value was set, false if not (invalid position / protected field).
       * @throws IllegalArgumentException if object type of value does not match field object type.
       * @throws TorqueException If a problem occurs with the set[Field] method.
       */
      public boolean setByPosition(int position, Object value)
          throws TorqueException, IllegalArgumentException
      {
      if (position == 0)
          {
              return setByName("ObjectID", value);
          }
      if (position == 1)
          {
  