All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package ai.platon.pulsar.persist.gora.generated;

import org.apache.gora.persistency.Persistent;

public class GActiveDOMStatus extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GActiveDOMStatus\",\"namespace\":\"ai.platon.pulsar.persist.gora.generated\",\"fields\":[{\"name\":\"n\",\"type\":\"int\",\"default\":0},{\"name\":\"scroll\",\"type\":\"int\",\"default\":0},{\"name\":\"st\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"r\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"idl\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"ec\",\"type\":[\"null\",\"string\"],\"default\":null}]}");
  private static final long serialVersionUID = 570553228940337791L;
  /** Enum containing all data bean's fields. */
  public static enum Field {
    N(0, "n"),
    SCROLL(1, "scroll"),
    ST(2, "st"),
    R(3, "r"),
    IDL(4, "idl"),
    EC(5, "ec"),
    ;
    /**
     * Field's index.
     */
    private int index;

    /**
     * Field's name.
     */
    private String name;

    /**
     * Field's constructor
     * @param index field's index.
     * @param name field's name.
     */
    Field(int index, String name) {this.index=index;this.name=name;}

    /**
     * Gets field's index.
     * @return int field's index.
     */
    public int getIndex() {return index;}

    /**
     * Gets field's name.
     * @return String field's name.
     */
    public String getName() {return name;}

    /**
     * Gets field's attributes to string.
     * @return String field's attributes to string.
     */
    public String toString() {return name;}
  };

  public static final String[] _ALL_FIELDS = {
  "n",
  "scroll",
  "st",
  "r",
  "idl",
  "ec",
  };

  /**
   * Gets the total field count.
   * @return int field count
   */
  public int getFieldsCount() {
    return GActiveDOMStatus._ALL_FIELDS.length;
  }

  @Override
  public Persistent clone() {
    return null;
  }

  private int n;
  private int scroll;
  private java.lang.CharSequence st;
  private java.lang.CharSequence r;
  private java.lang.CharSequence idl;
  private java.lang.CharSequence ec;
  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return n;
    case 1: return scroll;
    case 2: return st;
    case 3: return r;
    case 4: return idl;
    case 5: return ec;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value) {
    switch (field$) {
    case 0: n = (java.lang.Integer)(value); break;
    case 1: scroll = (java.lang.Integer)(value); break;
    case 2: st = (java.lang.CharSequence)(value); break;
    case 3: r = (java.lang.CharSequence)(value); break;
    case 4: idl = (java.lang.CharSequence)(value); break;
    case 5: ec = (java.lang.CharSequence)(value); break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'n' field.
   */
  public java.lang.Integer getN() {
    return n;
  }

  /**
   * Sets the value of the 'n' field.
   * @param value the value to set.
   */
  public void setN(java.lang.Integer value) {
    this.n = value;
    setDirty(0);
  }
  
  /**
   * Checks the dirty status of the 'n' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isNDirty() {
    return isDirty(0);
  }

  /**
   * Gets the value of the 'scroll' field.
   */
  public java.lang.Integer getScroll() {
    return scroll;
  }

  /**
   * Sets the value of the 'scroll' field.
   * @param value the value to set.
   */
  public void setScroll(java.lang.Integer value) {
    this.scroll = value;
    setDirty(1);
  }
  
  /**
   * Checks the dirty status of the 'scroll' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isScrollDirty() {
    return isDirty(1);
  }

  /**
   * Gets the value of the 'st' field.
   */
  public java.lang.CharSequence getSt() {
    return st;
  }

  /**
   * Sets the value of the 'st' field.
   * @param value the value to set.
   */
  public void setSt(java.lang.CharSequence value) {
    this.st = value;
    setDirty(2);
  }
  
  /**
   * Checks the dirty status of the 'st' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isStDirty() {
    return isDirty(2);
  }

  /**
   * Gets the value of the 'r' field.
   */
  public java.lang.CharSequence getR() {
    return r;
  }

  /**
   * Sets the value of the 'r' field.
   * @param value the value to set.
   */
  public void setR(java.lang.CharSequence value) {
    this.r = value;
    setDirty(3);
  }
  
  /**
   * Checks the dirty status of the 'r' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isRDirty() {
    return isDirty(3);
  }

  /**
   * Gets the value of the 'idl' field.
   */
  public java.lang.CharSequence getIdl() {
    return idl;
  }

  /**
   * Sets the value of the 'idl' field.
   * @param value the value to set.
   */
  public void setIdl(java.lang.CharSequence value) {
    this.idl = value;
    setDirty(4);
  }
  
  /**
   * Checks the dirty status of the 'idl' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isIdlDirty() {
    return isDirty(4);
  }

  /**
   * Gets the value of the 'ec' field.
   */
  public java.lang.CharSequence getEc() {
    return ec;
  }

  /**
   * Sets the value of the 'ec' field.
   * @param value the value to set.
   */
  public void setEc(java.lang.CharSequence value) {
    this.ec = value;
    setDirty(5);
  }
  
  /**
   * Checks the dirty status of the 'ec' field. A field is dirty if it represents a change that has not yet been written to the database.
   * @param value the value to set.
   */
  public boolean isEcDirty() {
    return isDirty(5);
  }

  /** Creates a new GActiveDOMStatus RecordBuilder */
  public static ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder newBuilder() {
    return new ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder();
  }
  
  /** Creates a new GActiveDOMStatus RecordBuilder by copying an existing Builder */
  public static ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder newBuilder(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder other) {
    return new ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder(other);
  }
  
  /** Creates a new GActiveDOMStatus RecordBuilder by copying an existing GActiveDOMStatus instance */
  public static ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder newBuilder(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus other) {
    return new ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder(other);
  }
  
  private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer(
      java.nio.ByteBuffer input) {
    java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity());
    int position = input.position();
    input.reset();
    int mark = input.position();
    int limit = input.limit();
    input.rewind();
    input.limit(input.capacity());
    copy.put(input);
    input.rewind();
    copy.rewind();
    input.position(mark);
    input.mark();
    copy.position(mark);
    copy.mark();
    input.position(position);
    copy.position(position);
    input.limit(limit);
    copy.limit(limit);
    return copy.asReadOnlyBuffer();
  }
  
  /**
   * RecordBuilder for GActiveDOMStatus instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private int n;
    private int scroll;
    private java.lang.CharSequence st;
    private java.lang.CharSequence r;
    private java.lang.CharSequence idl;
    private java.lang.CharSequence ec;

    /** Creates a new Builder */
    private Builder() {
      super(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder other) {
      super(other);
    }
    
    /** Creates a Builder by copying an existing GActiveDOMStatus instance */
    private Builder(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus other) {
            super(ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.SCHEMA$);
      if (isValidValue(fields()[0], other.n)) {
        this.n = (java.lang.Integer) data().deepCopy(fields()[0].schema(), other.n);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.scroll)) {
        this.scroll = (java.lang.Integer) data().deepCopy(fields()[1].schema(), other.scroll);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.st)) {
        this.st = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.st);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.r)) {
        this.r = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.r);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.idl)) {
        this.idl = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.idl);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.ec)) {
        this.ec = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.ec);
        fieldSetFlags()[5] = true;
      }
    }

    /** Gets the value of the 'n' field */
    public java.lang.Integer getN() {
      return n;
    }
    
    /** Sets the value of the 'n' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setN(int value) {
      validate(fields()[0], value);
      this.n = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'n' field has been set */
    public boolean hasN() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'n' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearN() {
      fieldSetFlags()[0] = false;
      return this;
    }
    
    /** Gets the value of the 'scroll' field */
    public java.lang.Integer getScroll() {
      return scroll;
    }
    
    /** Sets the value of the 'scroll' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setScroll(int value) {
      validate(fields()[1], value);
      this.scroll = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'scroll' field has been set */
    public boolean hasScroll() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'scroll' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearScroll() {
      fieldSetFlags()[1] = false;
      return this;
    }
    
    /** Gets the value of the 'st' field */
    public java.lang.CharSequence getSt() {
      return st;
    }
    
    /** Sets the value of the 'st' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setSt(java.lang.CharSequence value) {
      validate(fields()[2], value);
      this.st = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'st' field has been set */
    public boolean hasSt() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'st' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearSt() {
      st = null;
      fieldSetFlags()[2] = false;
      return this;
    }
    
    /** Gets the value of the 'r' field */
    public java.lang.CharSequence getR() {
      return r;
    }
    
    /** Sets the value of the 'r' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setR(java.lang.CharSequence value) {
      validate(fields()[3], value);
      this.r = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'r' field has been set */
    public boolean hasR() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'r' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearR() {
      r = null;
      fieldSetFlags()[3] = false;
      return this;
    }
    
    /** Gets the value of the 'idl' field */
    public java.lang.CharSequence getIdl() {
      return idl;
    }
    
    /** Sets the value of the 'idl' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setIdl(java.lang.CharSequence value) {
      validate(fields()[4], value);
      this.idl = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'idl' field has been set */
    public boolean hasIdl() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'idl' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearIdl() {
      idl = null;
      fieldSetFlags()[4] = false;
      return this;
    }
    
    /** Gets the value of the 'ec' field */
    public java.lang.CharSequence getEc() {
      return ec;
    }
    
    /** Sets the value of the 'ec' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder setEc(java.lang.CharSequence value) {
      validate(fields()[5], value);
      this.ec = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'ec' field has been set */
    public boolean hasEc() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'ec' field */
    public ai.platon.pulsar.persist.gora.generated.GActiveDOMStatus.Builder clearEc() {
      ec = null;
      fieldSetFlags()[5] = false;
      return this;
    }
    
    @Override
    public GActiveDOMStatus build() {
      try {
        GActiveDOMStatus record = new GActiveDOMStatus();
        record.n = fieldSetFlags()[0] ? this.n : (java.lang.Integer) defaultValue(fields()[0]);
        record.scroll = fieldSetFlags()[1] ? this.scroll : (java.lang.Integer) defaultValue(fields()[1]);
        record.st = fieldSetFlags()[2] ? this.st : (java.lang.CharSequence) defaultValue(fields()[2]);
        record.r = fieldSetFlags()[3] ? this.r : (java.lang.CharSequence) defaultValue(fields()[3]);
        record.idl = fieldSetFlags()[4] ? this.idl : (java.lang.CharSequence) defaultValue(fields()[4]);
        record.ec = fieldSetFlags()[5] ? this.ec : (java.lang.CharSequence) defaultValue(fields()[5]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
  
  public GActiveDOMStatus.Tombstone getTombstone(){
  	return TOMBSTONE;
  }

  public GActiveDOMStatus newInstance(){
    return newBuilder().build();
  }

  private static final Tombstone TOMBSTONE = new Tombstone();
  
  public static final class Tombstone extends GActiveDOMStatus implements org.apache.gora.persistency.Tombstone {
  
      private Tombstone() { }
  
	  		  /**
	   * Gets the value of the 'n' field.
		   */
	  public java.lang.Integer getN() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'n' field.
		   * @param value the value to set.
	   */
	  public void setN(java.lang.Integer value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'n' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isNDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
				  /**
	   * Gets the value of the 'scroll' field.
		   */
	  public java.lang.Integer getScroll() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'scroll' field.
		   * @param value the value to set.
	   */
	  public void setScroll(java.lang.Integer value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'scroll' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isScrollDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
				  /**
	   * Gets the value of the 'st' field.
		   */
	  public java.lang.CharSequence getSt() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'st' field.
		   * @param value the value to set.
	   */
	  public void setSt(java.lang.CharSequence value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'st' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isStDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
				  /**
	   * Gets the value of the 'r' field.
		   */
	  public java.lang.CharSequence getR() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'r' field.
		   * @param value the value to set.
	   */
	  public void setR(java.lang.CharSequence value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'r' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isRDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
				  /**
	   * Gets the value of the 'idl' field.
		   */
	  public java.lang.CharSequence getIdl() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'idl' field.
		   * @param value the value to set.
	   */
	  public void setIdl(java.lang.CharSequence value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'idl' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isIdlDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
				  /**
	   * Gets the value of the 'ec' field.
		   */
	  public java.lang.CharSequence getEc() {
	    throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
	  }
	
	  /**
	   * Sets the value of the 'ec' field.
		   * @param value the value to set.
	   */
	  public void setEc(java.lang.CharSequence value) {
	    throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
	  }
	  
	  /**
	   * Checks the dirty status of the 'ec' field. A field is dirty if it represents a change that has not yet been written to the database.
		   * @param value the value to set.
	   */
	  public boolean isEcDirty() {
	    throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
	  }
	
		  
  }

  private static final org.apache.avro.io.DatumWriter
            DATUM_WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
  private static final org.apache.avro.io.DatumReader
            DATUM_READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);

  /**
   * Writes AVRO data bean to output stream in the form of AVRO Binary encoding format. This will transform
   * AVRO data bean from its Java object form to it s serializable form.
   *
   * @param out java.io.ObjectOutput output stream to write data bean in serializable form
   */
  @Override
  public void writeExternal(java.io.ObjectOutput out)
          throws java.io.IOException {
    out.write(super.getDirtyBytes().array());
    DATUM_WRITER$.write(this, org.apache.avro.io.EncoderFactory.get()
            .directBinaryEncoder((java.io.OutputStream) out,
                    null));
  }

  /**
   * Reads AVRO data bean from input stream in it s AVRO Binary encoding format to Java object format.
   * This will transform AVRO data bean from it s serializable form to deserialized Java object form.
   *
   * @param in java.io.ObjectOutput input stream to read data bean in serializable form
   */
  @Override
  public void readExternal(java.io.ObjectInput in)
          throws java.io.IOException {
    byte[] __g__dirty = new byte[getFieldsCount()];
    in.read(__g__dirty);
    super.setDirtyBytes(java.nio.ByteBuffer.wrap(__g__dirty));
    DATUM_READER$.read(this, org.apache.avro.io.DecoderFactory.get()
            .directBinaryDecoder((java.io.InputStream) in,
                    null));
  }
  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy