Beispiel #1
0
    /**
     * Extract the supplier key from a shipment key/value pair. The supplier key is stored in the
     * shipment key, so the shipment value is not used.
     */
    public boolean createSecondaryKey(
        TupleInput primaryKeyInput, Object valueInput, TupleOutput indexKeyOutput) {

      primaryKeyInput.readString(); // skip the partNumber
      String supplierNumber = primaryKeyInput.readString();
      indexKeyOutput.writeString(supplierNumber);
      return true;
    }
Beispiel #2
0
    /**
     * Create the entity by combining the stored key and data. This "tricky" binding returns the
     * stored data as the entity, but first it sets the transient key fields from the stored key.
     */
    public Object entryToObject(TupleInput keyInput, Object dataInput) {

      String partNumber = keyInput.readString();
      String supplierNumber = keyInput.readString();
      Shipment shipment = (Shipment) dataInput;
      shipment.setKey(partNumber, supplierNumber);
      return shipment;
    }
Beispiel #3
0
 @Override
 public Set<String> entryToObject(TupleInput in) {
   int n = in.readInt();
   Set<String> h = new HashSet<String>(n);
   for (int i = 0; i < n; ++i) h.add(in.readString());
   return h;
 }
Beispiel #4
0
    /**
     * Create the entity by combining the stored key and data. This "tricky" binding returns the
     * stored data as the entity, but first it sets the transient key fields from the stored key.
     */
    public Object entryToObject(TupleInput keyInput, Object dataInput) {

      String number = keyInput.readString();
      Supplier supplier = (Supplier) dataInput;
      supplier.setKey(number);
      return supplier;
    }
Beispiel #5
0
    /**
     * Create the entity by combining the stored key and data. This "tricky" binding returns the
     * stored data as the entity, but first it sets the transient key fields from the stored key.
     */
    public Object entryToObject(TupleInput keyInput, Object dataInput) {

      String number = keyInput.readString();
      Part part = (Part) dataInput;
      part.setKey(number);
      return part;
    }
Beispiel #6
0
    /**
     * Extract the part key from a shipment key/value pair. The part key is stored in the shipment
     * key, so the shipment value is not used.
     */
    public boolean createSecondaryKey(
        TupleInput primaryKeyInput, Object valueInput, TupleOutput indexKeyOutput) {

      String partNumber = primaryKeyInput.readString();
      // don't bother reading the supplierNumber
      indexKeyOutput.writeString(partNumber);
      return true;
    }
Beispiel #7
0
 @Override
 public WebURL entryToObject(TupleInput input) {
   WebURL webURL = new WebURL();
   webURL.setPrimeKey(input.readString());
   webURL.setURL(input.readString());
   webURL.setDocid(input.readInt());
   webURL.setParentDocid(input.readInt());
   webURL.setParentUrl(input.readString());
   webURL.setDepth(input.readShort());
   webURL.setCookie(input.readString());
   webURL.setFormParams(input.readString());
   webURL.setMethod(input.readString());
   return webURL;
 }
  public void unmarshalKey(TupleInput keyInput) {

    this.number = keyInput.readString();
  }
Beispiel #9
0
 /** Serializes from a TupleInput after retrieving from storage. */
 public static NameIdPair deserialize(TupleInput buffer) {
   return new NameIdPair(buffer.readString(), buffer.readInt());
 }
 public IdentifierVersionString(TupleInput input) {
   super(input);
   stringDenotation = input.readString();
 }
  public void unmarshalPrimaryKey(TupleInput keyInput) {

    primaryKey = keyInput.readString();
  }
  public void unmarshalEntry(TupleInput dataInput) {

    data = dataInput.readString();
    indexKey1 = dataInput.readString();
    indexKey2 = dataInput.readString();
  }
Beispiel #13
0
    /** Create the key object from the stored key tuple entry. */
    public Object entryToObject(TupleInput input) {

      String partNumber = input.readString();
      String supplierNumber = input.readString();
      return new ShipmentKey(partNumber, supplierNumber);
    }
Beispiel #14
0
    /** Create the key object from the stored key tuple entry. */
    public Object entryToObject(TupleInput input) {

      String number = input.readString();
      return new SupplierKey(number);
    }