content: /**
   ********************************************************************************
   *** The implementation of the MatcherValue..java                             ***
   *** Generator: net.anotheria.asg.generator.model.db.VOGenerator              ***
   *** generated by AnoSiteGenerator (ASG), Version: 1.3.3                      ***
   *** Copyright (C) 2005 - 2010 Anotheria.net, www.anotheria.net               ***
   *** All Rights Reserved.                                                     ***
   ********************************************************************************
   *** Don't edit this code, if you aren't sure                                 ***
   *** that you do exactly know what you are doing!                             ***
   *** It's better to invest time in the generator, as into the generated code. ***
   ********************************************************************************
   */
  
  package net.anotheria.moskito.sql.callingAspect;
  
  import net.anotheria.util.crypt.MD5Util;
  
  public class MatcherValueVO implements MatcherValue{
  
      private String id;
      private int type;
      private String value;
      private String matcherid;
      private long daocreated;
      private long daoupdated;
  
      MatcherValueVO(MatcherValueBuilder builder) {
          id = "";
          type = builder.type;
          value = builder.value;
          matcherid = builder.matcherId;
      }
  
  
      public MatcherValueVO(String anId) {
          id = anId;
      }
  
      public MatcherValueVO(MatcherValueVO toClone) {
          this.id = toClone.id;
          copyAttributesFrom(toClone);
      }
  
      public String getId() {
          return id;
      }
  
      public int getType() {
          return type;
      }
  
      public void setType(int value) {
          this.type = value;
      }
  
      public String getValue() {
          return value;
      }
  
      public void setValue(String value) {
          this.value = value;
      }
  
      public String getMatcherId() {
          return matcherid;
      }
  
      public void setMatcherId(String value) {
          this.matcherid = value;
      }
  
      public long getDaoCreated() {
          return daocreated;
      }
  
      public void setDaoCreated(long value) {
          this.daocreated = value;
      }
  
      public long getDaoUpdated() {
          return daoupdated;
      }
  
      public void setDaoUpdated(long value) {
          this.daoupdated = value;
      }
  
      public String toString() {
          String ret = "MatcherValue ";
          ret += "[" + getId() + "] ";
          ret += "type: " + getType();
          ret += ", ";
          ret += "value: " + getValue();
          return ret;
      }
  
      public void copyAttributesFrom(MatcherValue toCopy) {
          this.type = toCopy.getType();
          this.value = toCopy.getValue();
          this.matcherid = toCopy.getMatcherId();
      }
  
      public Object getPropertyValue(String propertyName) {
          if (PROP_ID.equals(propertyName))
              return getId();
          if (PROP_TYPE.equals(propertyName))
              return getType();
          if (PROP_VALUE.equals(propertyName))
              return getValue();
          if (LINK_PROP_MATCHER_ID.equals(propertyName))
              return getMatcherId();
          throw new RuntimeException("No property getter for " + propertyName);
      }
  
      public String getDefinedName() {
          return "MatcherValue";
      }
  
      public String getDefinedParentName() {
          return "MatcherValues";
      }
  
      public String getFootprint() {
          StringBuilder footprint = new StringBuilder();
          footprint.append(getType());
          footprint.append(getValue());
          footprint.append(getMatcherId());
          return MD5Util.getMD5Hash(footprint);
      }
  
      public boolean equals(Object o) {
          return o == this || ((o instanceof MatcherValueVO) && ((MatcherValueVO) o).getId().equals(getId()));
      }
  }
  