content: package org.apache.cayenne.testdo.uuid.auto;
  
  import java.io.IOException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  import java.util.UUID;
  
  import org.apache.cayenne.PersistentObject;
  import org.apache.cayenne.exp.property.BaseProperty;
  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.testdo.uuid.UuidTestEntity;
  
  /**
   * Class _UuidTestEntity 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 _UuidTestEntity extends PersistentObject {
  
      private static final long serialVersionUID = 1L;
  
      public static final SelfProperty<UuidTestEntity> SELF = PropertyFactory.createSelf(UuidTestEntity.class);
  
      public static final NumericIdProperty<Integer> ID_PK_PROPERTY = PropertyFactory.createNumericId("ID", "UuidTestEntity", Integer.class);
      public static final String ID_PK_COLUMN = "ID";
  
      public static final BaseProperty<UUID> UUID = PropertyFactory.createBase("uuid", UUID.class);
  
      protected UUID uuid;
  
  
      public void setUuid(UUID uuid) {
          beforePropertyWrite("uuid", this.uuid, uuid);
          this.uuid = uuid;
      }
  
      public UUID getUuid() {
          beforePropertyRead("uuid");
          return this.uuid;
      }
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "uuid":
                  return this.uuid;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "uuid":
                  this.uuid = (UUID)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.uuid);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.uuid = (UUID)in.readObject();
      }
  
  }
  