content: package org.apache.cayenne.testdo.inheritance_people.auto;
  
  import java.io.IOException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  
  import org.apache.cayenne.exp.property.EntityProperty;
  import org.apache.cayenne.exp.property.NumericIdProperty;
  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.inheritance_people.AbstractPerson;
  import org.apache.cayenne.testdo.inheritance_people.ClientCompany;
  import org.apache.cayenne.testdo.inheritance_people.CustomerRepresentative;
  
  /**
   * Class _CustomerRepresentative 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 _CustomerRepresentative extends AbstractPerson {
  
      private static final long serialVersionUID = 1L;
  
      public static final SelfProperty<CustomerRepresentative> SELF = PropertyFactory.createSelf(CustomerRepresentative.class);
  
      public static final NumericIdProperty<Integer> PERSON_ID_PK_PROPERTY = PropertyFactory.createNumericId("PERSON_ID", "CustomerRepresentative", Integer.class);
      public static final String PERSON_ID_PK_COLUMN = "PERSON_ID";
  
      public static final StringProperty<String> CLIENT_CONTACT_TYPE = PropertyFactory.createString("clientContactType", String.class);
      public static final EntityProperty<ClientCompany> TO_CLIENT_COMPANY = PropertyFactory.createEntity("toClientCompany", ClientCompany.class);
  
      protected String clientContactType;
  
      protected Object toClientCompany;
  
      public void setClientContactType(String clientContactType) {
          beforePropertyWrite("clientContactType", this.clientContactType, clientContactType);
          this.clientContactType = clientContactType;
      }
  
      public String getClientContactType() {
          beforePropertyRead("clientContactType");
          return this.clientContactType;
      }
  
      public void setToClientCompany(ClientCompany toClientCompany) {
          setToOneTarget("toClientCompany", toClientCompany, true);
      }
  
      public ClientCompany getToClientCompany() {
          return (ClientCompany)readProperty("toClientCompany");
      }
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "clientContactType":
                  return this.clientContactType;
              case "toClientCompany":
                  return this.toClientCompany;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "clientContactType":
                  this.clientContactType = (String)val;
                  break;
              case "toClientCompany":
                  this.toClientCompany = 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.clientContactType);
          out.writeObject(this.toClientCompany);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.clientContactType = (String)in.readObject();
          this.toClientCompany = in.readObject();
      }
  
  }
  