Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * See the file LICENSE for redistribution information.
  * Copyright (c) 2000, 2010 Oracle and/or its affiliates.  All rights reserved.
 package com.sleepycat.bind.serial;
A concrete key creator that works in conjunction with a TupleSerialMarshalledBinding. This key creator works by calling the methods of the com.sleepycat.bind.tuple.MarshalledTupleKeyEntity interface to create and clear the index key fields.

Mark Hayes
See also:
Class Evolution
public class TupleSerialMarshalledKeyCreator<D extends
    extends TupleSerialKeyCreator<D> {
    private String keyName;

Creates a tuple-serial marshalled key creator.

binding is the binding used for the tuple-serial entity.
keyName is the key name passed to the com.sleepycat.bind.tuple.MarshalledTupleKeyEntity.marshalSecondaryKey(java.lang.String,com.sleepycat.bind.tuple.TupleOutput) method to identify the index key.
                                           String keyName) {
        this. = binding;
        this. = keyName;
        if ( == null) {
            throw new NullPointerException("dataBinding may not be null");
    // javadoc is inherited
    public boolean createSecondaryKey(TupleInput primaryKeyInput,
                                      D dataInput,
                                      TupleOutput indexKeyOutput) {
         * The primary key is unmarshalled before marshalling the index key, to
         * account for cases where the index key includes fields taken from the
         * primary key.
        MarshalledTupleKeyEntity entity =
        return entity.marshalSecondaryKey(indexKeyOutput);
    // javadoc is inherited
    public D nullifyForeignKey(D dataInput) {
        MarshalledTupleKeyEntity entity =
        return entity.nullifyForeignKey() ? dataInput : null;
New to GrepCode? Check out our FAQ X