Пример #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;
    }
Пример #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;
    }
Пример #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;
 }
Пример #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;
    }
Пример #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;
    }
Пример #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;
    }
Пример #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;
 }
Пример #8
0
  public void unmarshalKey(TupleInput keyInput) {

    this.number = keyInput.readString();
  }
Пример #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();
  }
Пример #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);
    }
Пример #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);
    }