コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SingleColumnValueFilter" /> class.
        /// </summary>
        /// <param name="family">The name of the column family.</param>
        /// <param name="qualifier">The name of the column qualifier.</param>
        /// <param name="compareOp">The operator.</param>
        /// <param name="comparator">The comparator to use.</param>
        /// <param name="filterIfMissing">
        /// When <c>true</c>, the entire row will be skipped if the column is not found;
        /// when <c>false</c>, the row will pass if the column is not found.
        /// </param>
        /// <param name="latestVersion">
        /// When <c>true</c>, the row will be returned if only the latest version of the column value matches;
        /// when <c>false</c>, the row will be returned if any version of the column value matches.
        /// </param>
        /// <remarks>
        /// Constructor for binary compare of the value of a single column.
        /// </remarks>
        public SingleColumnValueFilter(
            byte[] family,
            byte[] qualifier,
            CompareFilter.CompareOp compareOp,
            ByteArrayComparable comparator,
            bool filterIfMissing = false,
            bool latestVersion   = true)
        {
            family.ArgumentNotNull("family");
            qualifier.ArgumentNotNull("qualifier");

            if (!Enum.IsDefined(typeof(CompareFilter.CompareOp), compareOp))
            {
                throw new InvalidEnumArgumentException("compareOp", (int)compareOp, typeof(CompareFilter.CompareOp));
            }

            comparator.ArgumentNotNull("comparator");

            _family          = (byte[])family.Clone();
            _qualifier       = (byte[])qualifier.Clone();
            CompareOperation = compareOp;
            Comparator       = comparator;

            FilterIfMissing = filterIfMissing;
            LatestVersion   = latestVersion;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SingleColumnValueExcludeFilter" /> class.
 /// </summary>
 /// <param name="family">The name of the column family.</param>
 /// <param name="qualifier">The name of the column qualifier.</param>
 /// <param name="compareOp">The operator.</param>
 /// <param name="comparator">The comparator to use.</param>
 /// <param name="filterIfMissing">
 /// When <c>true</c>, the entire row will be skipped if the column is not found;
 /// when <c>false</c>, the row will pass if the column is not found.
 /// </param>
 /// <param name="latestVersion">
 /// When <c>true</c>, the row will be returned if only the latest version of the column value matches;
 /// when <c>false</c>, the row will be returned if any version of the column value matches.
 /// </param>
 /// <remarks>
 /// Constructor for binary compare of the value of a single column.
 /// </remarks>
 public SingleColumnValueExcludeFilter(
     byte[] family,
     byte[] qualifier,
     CompareFilter.CompareOp compareOp,
     ByteArrayComparable comparator,
     bool filterIfMissing = false,
     bool latestVersion   = true) : base(family, qualifier, compareOp, comparator, filterIfMissing, latestVersion)
 {
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompareFilter" /> class.
        /// </summary>
        /// <param name="compareOp">The compare op.</param>
        /// <param name="comparator">The comparator.</param>
        protected CompareFilter(CompareOp compareOp, ByteArrayComparable comparator)
        {
            if (!Enum.IsDefined(typeof(CompareOp), compareOp))
            {
                throw new InvalidEnumArgumentException("compareOp", (int)compareOp, typeof(CompareOp));
            }

            comparator.ArgumentNotNull("comparator");

            CompareOperation = compareOp;
            Comparator       = comparator;
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DependentColumnFilter" /> class.
        /// </summary>
        /// <param name="family">The name of the column family.</param>
        /// <param name="qualifier">The name of the column qualifier.</param>
        /// <param name="dropDependentColumn">Specifies whether or not the dependent column should be dropped.</param>
        /// <param name="valueCompareOp">The operator.</param>
        /// <param name="valueComparator">The value comparator.</param>
        public DependentColumnFilter(
            byte[] family,
            byte[] qualifier,
            bool dropDependentColumn,
            CompareOp valueCompareOp,
            ByteArrayComparable valueComparator) : base(valueCompareOp, valueComparator)
        {
            family.ArgumentNotNull("family");
            qualifier.ArgumentNotNull("qualifier");

            _family             = (byte[])family.Clone();
            _qualifier          = (byte[])qualifier.Clone();
            DropDependentColumn = dropDependentColumn;
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RowFilter" /> class.
 /// </summary>
 /// <param name="rowCompareOp">The row compare op.</param>
 /// <param name="rowComparator">The row comparator.</param>
 public RowFilter(CompareOp rowCompareOp, ByteArrayComparable rowComparator)
     : base(rowCompareOp, rowComparator)
 {
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QualifierFilter" /> class.
 /// </summary>
 /// <param name="op">The op.</param>
 /// <param name="qualifierComparator">The qualifier comparator.</param>
 public QualifierFilter(CompareOp op, ByteArrayComparable qualifierComparator) : base(op, qualifierComparator)
 {
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilyFilter" /> class.
 /// </summary>
 /// <param name="familyCompareOp">The family compare op.</param>
 /// <param name="familyComparator">The family comparator.</param>
 /// <exception cref="System.ComponentModel.InvalidEnumArgumentException">familyCompareOp</exception>
 public FamilyFilter(CompareOp familyCompareOp, ByteArrayComparable familyComparator) : base(familyCompareOp,
                                                                                             familyComparator)
 {
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValueFilter" /> class.
 /// </summary>
 /// <param name="valueCompareOp">The value compare op.</param>
 /// <param name="valueComparator">The value comparator.</param>
 public ValueFilter(CompareOp valueCompareOp, ByteArrayComparable valueComparator) : base(valueCompareOp,
                                                                                          valueComparator)
 {
 }