001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008-2009 Sun Microsystems, Inc.
025 *      Portions Copyright 2013-2015 ForgeRock AS
026 */
027package org.opends.server.core;
028
029import java.util.Set;
030
031import org.opends.server.types.AttributeType;
032import org.forgerock.opendj.ldap.ByteString;
033import org.opends.server.types.DN;
034
035/**
036 * This abstract class wraps/decorates a given compare operation.
037 * This class will be extended by sub-classes to enhance the
038 * functionality of the CompareOperationBasis.
039 */
040public abstract class CompareOperationWrapper extends
041    OperationWrapper<CompareOperation> implements CompareOperation
042{
043
044  /**
045   * Creates a new compare operation based on the provided compare operation.
046   *
047   * @param compare The compare operation to wrap
048   */
049  public CompareOperationWrapper(CompareOperation compare)
050  {
051    super(compare);
052  }
053
054
055  /** {@inheritDoc} */
056  @Override
057  public ByteString getRawEntryDN()
058  {
059    return getOperation().getRawEntryDN();
060  }
061
062
063  /** {@inheritDoc} */
064  @Override
065  public void setRawEntryDN(ByteString rawEntryDN)
066  {
067    getOperation().setRawEntryDN(rawEntryDN);
068  }
069
070
071  /** {@inheritDoc} */
072  @Override
073  public DN getEntryDN()
074  {
075    return getOperation().getEntryDN();
076  }
077
078
079  /** {@inheritDoc} */
080  @Override
081  public String getRawAttributeType()
082  {
083    return getOperation().getRawAttributeType();
084  }
085
086
087  /** {@inheritDoc} */
088  @Override
089  public void setRawAttributeType(String rawAttributeType)
090  {
091    getOperation().setRawAttributeType(rawAttributeType);
092  }
093
094
095  /** {@inheritDoc} */
096  @Override
097  public AttributeType getAttributeType()
098  {
099    return getOperation().getAttributeType();
100  }
101
102
103  /** {@inheritDoc} */
104  @Override
105  public void setAttributeType(AttributeType attributeType)
106  {
107    getOperation().setAttributeType(attributeType);
108  }
109
110
111  /** {@inheritDoc} */
112  @Override
113  public Set<String> getAttributeOptions()
114  {
115    return getOperation().getAttributeOptions();
116  }
117
118
119  /** {@inheritDoc} */
120  @Override
121  public void setAttributeOptions(Set<String> attributeOptions)
122  {
123    getOperation().setAttributeOptions(attributeOptions);
124  }
125
126
127  /** {@inheritDoc} */
128  @Override
129  public ByteString getAssertionValue()
130  {
131    return getOperation().getAssertionValue();
132  }
133
134
135  /** {@inheritDoc} */
136  @Override
137  public void setAssertionValue(ByteString assertionValue)
138  {
139    getOperation().setAssertionValue(assertionValue);
140  }
141
142
143}