content: package org.apache.cayenne.testdo.inheritance_flat.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.NumericProperty;
  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_flat.User;
  import org.apache.cayenne.testdo.inheritance_flat.UserProperties;
  
  /**
   * Class _UserProperties 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 _UserProperties extends PersistentObject {
  
      private static final long serialVersionUID = 1L;
  
      public static final SelfProperty<UserProperties> SELF = PropertyFactory.createSelf(UserProperties.class);
  
      public static final String ID_PK_COLUMN = "id";
  
      public static final NumericProperty<Long> ID = PropertyFactory.createNumeric("id", Long.class);
      public static final StringProperty<String> NICKNAME = PropertyFactory.createString("nickname", String.class);
      public static final EntityProperty<User> USER = PropertyFactory.createEntity("user", User.class);
  
      protected Long id;
      protected String nickname;
  
      protected Object user;
  
      public void setId(Long id) {
          beforePropertyWrite("id", this.id, id);
          this.id = id;
      }
  
      public Long getId() {
          beforePropertyRead("id");
          return this.id;
      }
  
      public void setNickname(String nickname) {
          beforePropertyWrite("nickname", this.nickname, nickname);
          this.nickname = nickname;
      }
  
      public String getNickname() {
          beforePropertyRead("nickname");
          return this.nickname;
      }
  
      public void setUser(User user) {
          setToOneTarget("user", user, true);
      }
  
      public User getUser() {
          return (User)readProperty("user");
      }
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "id":
                  return this.id;
              case "nickname":
                  return this.nickname;
              case "user":
                  return this.user;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "id":
                  this.id = (Long)val;
                  break;
              case "nickname":
                  this.nickname = (String)val;
                  break;
              case "user":
                  this.user = 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.id);
          out.writeObject(this.nickname);
          out.writeObject(this.user);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.id = (Long)in.readObject();
          this.nickname = (String)in.readObject();
          this.user = in.readObject();
      }
  
  }
  