content: package org.apache.cayenne.testdo.meaningful_pk.auto;
  
  import java.io.IOException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  import java.math.BigInteger;
  
  import org.apache.cayenne.BaseDataObject;
  import org.apache.cayenne.exp.property.NumericProperty;
  import org.apache.cayenne.exp.property.PropertyFactory;
  import org.apache.cayenne.exp.property.StringProperty;
  
  /**
   * Class _MeaningfulPkBigintGenerated was generated by Cayenne.
   * It is probably a good idea to avoid changing this class manually,
   * since it may be overwritten next time code is regenerated.
   * If you need to make any customizations, please use subclass.
   */
  public abstract class _MeaningfulPkBigintGenerated extends BaseDataObject {
  
      private static final long serialVersionUID = 1L;
  
      public static final String PK_PK_COLUMN = "PK";
  
      public static final NumericProperty<BigInteger> PK = PropertyFactory.createNumeric("pk", BigInteger.class);
      public static final StringProperty<String> TEST_ATTR = PropertyFactory.createString("testAttr", String.class);
  
      protected BigInteger pk;
      protected String testAttr;
  
  
      public void setPk(BigInteger pk) {
          beforePropertyWrite("pk", this.pk, pk);
          this.pk = pk;
      }
  
      public BigInteger getPk() {
          beforePropertyRead("pk");
          return this.pk;
      }
  
      public void setTestAttr(String testAttr) {
          beforePropertyWrite("testAttr", this.testAttr, testAttr);
          this.testAttr = testAttr;
      }
  
      public String getTestAttr() {
          beforePropertyRead("testAttr");
          return this.testAttr;
      }
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "pk":
                  return this.pk;
              case "testAttr":
                  return this.testAttr;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "pk":
                  this.pk = (BigInteger)val;
                  break;
              case "testAttr":
                  this.testAttr = (String)val;
                  break;
              default:
                  super.writePropertyDirectly(propName, val);
          }
      }
  
      private void writeObject(ObjectOutputStream out) throws IOException {
          writeSerialized(out);
      }
  
      private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
          readSerialized(in);
      }
  
      @Override
      protected void writeState(ObjectOutputStream out) throws IOException {
          super.writeState(out);
          out.writeObject(this.pk);
          out.writeObject(this.testAttr);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.pk = (BigInteger)in.readObject();
          this.testAttr = (String)in.readObject();
      }
  
  }
  