content: package org.apache.cayenne.testdo.annotation.auto;
  
  import java.io.IOException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  
  import org.apache.cayenne.PersistentObject;
  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.annotation.ArtistAnnotation;
  
  /**
   * Class _ArtistAnnotation 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 _ArtistAnnotation extends PersistentObject {
  
      private static final long serialVersionUID = 1L;
  
      public static final SelfProperty<ArtistAnnotation> SELF = PropertyFactory.createSelf(ArtistAnnotation.class);
  
      public static final NumericIdProperty<Integer> ID_PK_PROPERTY = PropertyFactory.createNumericId("ID", "ArtistAnnotation", Integer.class);
      public static final String ID_PK_COLUMN = "ID";
  
      public static final StringProperty<String> POST_CALLBACK = PropertyFactory.createString("postCallback", String.class);
      public static final StringProperty<String> PRE_CALLBACK = PropertyFactory.createString("preCallback", String.class);
  
      protected String postCallback;
      protected String preCallback;
  
  
      public void setPostCallback(String postCallback) {
          beforePropertyWrite("postCallback", this.postCallback, postCallback);
          this.postCallback = postCallback;
      }
  
      public String getPostCallback() {
          beforePropertyRead("postCallback");
          return this.postCallback;
      }
  
      public void setPreCallback(String preCallback) {
          beforePropertyWrite("preCallback", this.preCallback, preCallback);
          this.preCallback = preCallback;
      }
  
      public String getPreCallback() {
          beforePropertyRead("preCallback");
          return this.preCallback;
      }
  
      protected abstract void onPostAdd();
  
      @Override
      public Object readPropertyDirectly(String propName) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch(propName) {
              case "postCallback":
                  return this.postCallback;
              case "preCallback":
                  return this.preCallback;
              default:
                  return super.readPropertyDirectly(propName);
          }
      }
  
      @Override
      public void writePropertyDirectly(String propName, Object val) {
          if(propName == null) {
              throw new IllegalArgumentException();
          }
  
          switch (propName) {
              case "postCallback":
                  this.postCallback = (String)val;
                  break;
              case "preCallback":
                  this.preCallback = (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.postCallback);
          out.writeObject(this.preCallback);
      }
  
      @Override
      protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
          super.readState(in);
          this.postCallback = (String)in.readObject();
          this.preCallback = (String)in.readObject();
      }
  
  }
  