コード例 #1
0
ファイル: SampleDatabase.java プロジェクト: gildafnai82/craq
    /**
     * 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
ファイル: SampleViews.java プロジェクト: cmjonze/bkdb
    /**
     * 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
ファイル: Biostar92368.java プロジェクト: RobinQi/jvarkit
 @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
ファイル: SampleViews.java プロジェクト: cmjonze/bkdb
    /**
     * 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
ファイル: SampleViews.java プロジェクト: cmjonze/bkdb
    /**
     * 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
ファイル: SampleDatabase.java プロジェクト: gildafnai82/craq
    /**
     * 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
ファイル: NameIdPair.java プロジェクト: prat0318/dbms
 /** 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();
 }
コード例 #11
0
  public void unmarshalPrimaryKey(TupleInput keyInput) {

    primaryKey = keyInput.readString();
  }
コード例 #12
0
  public void unmarshalEntry(TupleInput dataInput) {

    data = dataInput.readString();
    indexKey1 = dataInput.readString();
    indexKey2 = dataInput.readString();
  }
コード例 #13
0
ファイル: SampleViews.java プロジェクト: cmjonze/bkdb
    /** 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
ファイル: SampleViews.java プロジェクト: cmjonze/bkdb
    /** Create the key object from the stored key tuple entry. */
    public Object entryToObject(TupleInput input) {

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