public void serialized_sample_to_keyhash(
      Object endpoint_data,
      CdrInputStream src,
      KeyHash_t keyhash,
      boolean include_encapsulation,
      Object endpoint_plugin_qos) {
    int position = 0;

    DefaultEndpointData endpointData = (DefaultEndpointData) endpoint_data;
    Object sample = null;

    sample = endpointData.get_sample();

    if (sample == null) {
      throw new RETCODE_ERROR("Missing intermediate sample");
    }

    BaseValueType typedDst = (BaseValueType) sample;

    if (include_encapsulation) {
      src.deserializeAndSetCdrEncapsulation();

      position = src.resetAlignment();
    }

    typedDst.longMember1 = src.readInt();

    if (include_encapsulation) {
      src.restoreAlignment(position);
    }

    instance_to_keyhash(endpoint_data, keyhash, sample);
  }
  public Object serialized_sample_to_key(
      Object endpoint_data,
      Object sample,
      CdrInputStream src,
      boolean deserialize_encapsulation,
      boolean deserialize_key,
      Object endpoint_plugin_qos) {
    int position = 0;

    if (deserialize_encapsulation) {
      src.deserializeAndSetCdrEncapsulation();

      position = src.resetAlignment();
    }

    if (deserialize_key) {
      BaseValueType typedDst = (BaseValueType) sample;

      typedDst.longMember1 = src.readInt();
    }

    if (deserialize_encapsulation) {
      src.restoreAlignment(position);
    }

    return sample;
  }
  public Object deserialize_sample(
      Object endpoint_data,
      Object dst,
      CdrInputStream src,
      boolean deserialize_encapsulation,
      boolean deserialize_sample,
      Object endpoint_plugin_qos) {
    int position = 0;

    if (deserialize_encapsulation) {
      src.deserializeAndSetCdrEncapsulation();

      position = src.resetAlignment();
    }

    if (deserialize_sample) {
      BaseValueType typedDst = (BaseValueType) dst;

      typedDst.clear();
      try {

        typedDst.longMember1 = src.readInt();

      } catch (IllegalCdrStateException stateEx) {
        if (src.available() >= CdrEncapsulation.CDR_ENCAPSULATION_PARAMETER_ID_ALIGNMENT) {
          throw new RETCODE_ERROR(
              "Error deserializing sample! Remainder: "
                  + src.available()
                  + "\n"
                  + "Exception caused by: "
                  + stateEx.getMessage());
        }
      } catch (Exception ex) {
        throw new RETCODE_ERROR(ex.getMessage());
      }
    }

    if (deserialize_encapsulation) {
      src.restoreAlignment(position);
    }

    return dst;
  }
 public Object create_data() {
   return BaseValueType.create();
 }
  /* Fill in the given key based on the key fields of the given instance
   * sample.
   */
  public void instance_to_key(Object endpoint_data, Object key, Object instance) {
    BaseValueType typedDst = (BaseValueType) key;
    BaseValueType typedSrc = (BaseValueType) instance;

    typedDst.longMember1 = typedSrc.longMember1;
  }
  /* Fill in the key fields of the given instance sample based on the key.
   */
  public void key_to_instance(Object endpoint_data, Object instance, Object key) {
    BaseValueType typedDst = (BaseValueType) instance;
    BaseValueType typedSrc = (BaseValueType) key;

    typedDst.longMember1 = typedSrc.longMember1;
  }
  /**
   * This is a concrete implementation of this method inherited from the base class. This method
   * will perform a deep copy of <code>source</code> into <code>destination</code>.
   *
   * @param src The Object which contains the data to be copied.
   * @return Returns <code>destination</code>.
   * @exception NullPointerException If <code>destination</code> or <code>source</code> is null.
   * @exception ClassCastException If either <code>destination</code> or <code>this</code> is not a
   *     <code>BaseValueType</code> type.
   */
  public Object copy_data(Object destination, Object source) {
    BaseValueType typedDst = (BaseValueType) destination;
    BaseValueType typedSrc = (BaseValueType) source;

    return typedDst.copy_from(typedSrc);
  }