content: package org.apache.cayenne.testdo.meaningful_pk.auto;
  
  import java.io.IOException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  
  import org.apache.cayenne.PersistentObject;
  import org.apache.cayenne.exp.property.EntityProperty;
  import org.apache.cayenne.exp.property.PropertyFactory;
  import org.apache.cayenne.exp.property.SelfProperty;
  import org.apache.cayenne.exp.property.StringProperty;
  import org.apache.cayenne.testdo.meaningful_pk.MeaningfulPk;
  import org.apache.cayenne.testdo.meaningful_pk.MeaningfulPkDep2;
  
  /**
   * Class _MeaningfulPkDep2 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 _MeaningfulPkDep2 extends PersistentObject {
  
      private static final long serialVersionUID = 1L;
  
      public static final SelfProperty<MeaningfulPkDep2> SELF = PropertyFactory.createSelf(MeaningfulPkDep2.class);
  
      public static final String PK_PK_COLUMN = "PK";
  
      public static final StringProperty<String> DESCR = PropertyFactory.createString("descr", String.class);
      public static final StringProperty<String> PK = PropertyFactory.createString("pk", String.class);
      public static final EntityProperty<MeaningfulPk> MEANINGFUL_PK = PropertyFactory.createEntity("meaningfulPk", MeaningfulPk.class);
  
      protected String descr;
      protected String pk;
  
      protected Object meaningfulPk;
  
      public void setDescr(String descr) {
          beforePropertyWrite("descr", this.descr, descr);
          this.descr = descr;
      }
  
      public String getDescr() {
          beforePropertyRead("descr");
          return this.descr;
      }
  
      public void setPk(String pk) {
          beforePropertyWrite("pk", this.pk, pk);
          this.pk = pk;
      }
  
      public String getPk() {
          beforePropertyRead("pk");
          return this.pk;
      }
  
      public void setMeaningfulPk(MeaningfulPk meaningfulPk) {
          setToOneTarget("meaningfulPk", meaningfulPk, true);
      }
  
      public MeaningfulPk getMeaningfulPk() {
          return (MeaningfulPk)readProperty("meaningfulPk");
      }
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "descr":
                  return this.descr;
              case "pk":
                  return this.pk;
              case "meaningfulPk":
                  return this.meaningfulPk;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "descr":
                  this.descr = (String)val;
                  break;
              case "pk":
                  this.pk = (String)val;
                  break;
              case "meaningfulPk":
                  this.meaningfulPk = 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.descr);
          out.writeObject(this.pk);
          out.writeObject(this.meaningfulPk);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.descr = (String)in.readObject();
          this.pk = (String)in.readObject();
          this.meaningfulPk = in.readObject();
      }
  
  }
  