Example usage for org.apache.thrift TBaseHelper copyBinary

List of usage examples for org.apache.thrift TBaseHelper copyBinary

Introduction

In this page you can find the example usage for org.apache.thrift TBaseHelper copyBinary.

Prototype

public static byte[] copyBinary(final byte[] orig) 

Source Link

Usage

From source file:org.apache.cassandra.thrift.Column.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*from  w  ww  .ja v a 2s.c  om*/
public Column(Column other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    if (other.isSetName()) {
        this.name = TBaseHelper.copyBinary(other.name);
        ;
    }
    if (other.isSetValue()) {
        this.value = TBaseHelper.copyBinary(other.value);
        ;
    }
    this.timestamp = other.timestamp;
    this.ttl = other.ttl;
}

From source file:org.apache.cassandra.thrift.ColumnDef.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 */// ww w.jav a  2 s. com
public ColumnDef(ColumnDef other) {
    if (other.isSetName()) {
        this.name = TBaseHelper.copyBinary(other.name);
        ;
    }
    if (other.isSetValidation_class()) {
        this.validation_class = other.validation_class;
    }
    if (other.isSetIndex_type()) {
        this.index_type = other.index_type;
    }
    if (other.isSetIndex_name()) {
        this.index_name = other.index_name;
    }
}

From source file:org.apache.cassandra.thrift.ColumnParent.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*from www  .  jav a 2 s  .c om*/
public ColumnParent(ColumnParent other) {
    if (other.isSetColumn_family()) {
        this.column_family = other.column_family;
    }
    if (other.isSetSuper_column()) {
        this.super_column = TBaseHelper.copyBinary(other.super_column);
        ;
    }
}

From source file:org.apache.cassandra.thrift.ColumnPath.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*w  ww.ja v a  2s  .  com*/
public ColumnPath(ColumnPath other) {
    if (other.isSetColumn_family()) {
        this.column_family = other.column_family;
    }
    if (other.isSetSuper_column()) {
        this.super_column = TBaseHelper.copyBinary(other.super_column);
        ;
    }
    if (other.isSetColumn()) {
        this.column = TBaseHelper.copyBinary(other.column);
        ;
    }
}

From source file:org.apache.cassandra.thrift.CounterColumn.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*from w w  w.jav  a2s .  c o m*/
public CounterColumn(CounterColumn other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    if (other.isSetName()) {
        this.name = TBaseHelper.copyBinary(other.name);
        ;
    }
    this.value = other.value;
}

From source file:org.apache.cassandra.thrift.CounterDeletion.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *///from w w w .  j  a  v  a  2 s.  c om
public CounterDeletion(CounterDeletion other) {
    if (other.isSetSuper_column()) {
        this.super_column = TBaseHelper.copyBinary(other.super_column);
        ;
    }
    if (other.isSetPredicate()) {
        this.predicate = new SlicePredicate(other.predicate);
    }
}

From source file:org.apache.cassandra.thrift.CounterSuperColumn.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *///  w w  w.j a v  a  2s . co m
public CounterSuperColumn(CounterSuperColumn other) {
    if (other.isSetName()) {
        this.name = TBaseHelper.copyBinary(other.name);
        ;
    }
    if (other.isSetColumns()) {
        List<CounterColumn> __this__columns = new ArrayList<CounterColumn>();
        for (CounterColumn other_element : other.columns) {
            __this__columns.add(new CounterColumn(other_element));
        }
        this.columns = __this__columns;
    }
}

From source file:org.apache.cassandra.thrift.CqlRow.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 */// w  w  w .j  a  v  a2s .co  m
public CqlRow(CqlRow other) {
    if (other.isSetKey()) {
        this.key = TBaseHelper.copyBinary(other.key);
        ;
    }
    if (other.isSetColumns()) {
        List<Column> __this__columns = new ArrayList<Column>();
        for (Column other_element : other.columns) {
            __this__columns.add(new Column(other_element));
        }
        this.columns = __this__columns;
    }
}

From source file:org.apache.cassandra.thrift.Deletion.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*  w ww.j  a v a 2 s .c o  m*/
public Deletion(Deletion other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.timestamp = other.timestamp;
    if (other.isSetSuper_column()) {
        this.super_column = TBaseHelper.copyBinary(other.super_column);
        ;
    }
    if (other.isSetPredicate()) {
        this.predicate = new SlicePredicate(other.predicate);
    }
}

From source file:org.apache.cassandra.thrift.IndexClause.java

License:Apache License

/**
 * Performs a deep copy on <i>other</i>.
 *//*from ww w .  j a  va 2  s . c o  m*/
public IndexClause(IndexClause other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    if (other.isSetExpressions()) {
        List<IndexExpression> __this__expressions = new ArrayList<IndexExpression>();
        for (IndexExpression other_element : other.expressions) {
            __this__expressions.add(new IndexExpression(other_element));
        }
        this.expressions = __this__expressions;
    }
    if (other.isSetStart_key()) {
        this.start_key = TBaseHelper.copyBinary(other.start_key);
        ;
    }
    this.count = other.count;
}