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
010     * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011     * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012     * See the License for the specific language governing permissions
013     * and limitations under the License.
014     *
015     * When distributing Covered Code, include this CDDL HEADER in each
016     * file and include the License file at
017     * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
018     * add the following below this CDDL HEADER, with the fields enclosed
019     * by brackets "[]" replaced with your own identifying information:
020     *      Portions Copyright [yyyy] [name of copyright owner]
021     *
022     * CDDL HEADER END
023     *
024     *
025     *      Copyright 2008 Sun Microsystems, Inc.
026     */
027    package org.opends.server.core;
028    
029    
030    import org.opends.server.types.AttributeType;
031    import org.opends.server.types.ByteString;
032    import org.opends.server.types.DN;
033    
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     * functionnality of the CompareOperationBasis.
039     */
040    public abstract class CompareOperationWrapper
041      extends OperationWrapper
042      implements CompareOperation
043    {
044      // The wrapped operation
045      private CompareOperation compare;
046    
047    
048      /**
049       * Creates a new compare operation based on the provided compare operation.
050       *
051       * @param compare The compare operation to wrap
052       */
053      public CompareOperationWrapper(CompareOperation compare)
054      {
055        super(compare);
056        this.compare = compare;
057      }
058    
059    
060      /**
061       * {@inheritDoc}
062       */
063      public ByteString getRawEntryDN()
064      {
065        return compare.getRawEntryDN();
066      }
067    
068    
069      /**
070       * {@inheritDoc}
071       */
072      public void setRawEntryDN(ByteString rawEntryDN)
073      {
074        compare.setRawEntryDN(rawEntryDN);
075      }
076    
077    
078      /**
079       * {@inheritDoc}
080       */
081      public DN getEntryDN()
082      {
083        return compare.getEntryDN();
084      }
085    
086    
087      /**
088       * {@inheritDoc}
089       */
090      public String getRawAttributeType()
091      {
092        return compare.getRawAttributeType();
093      }
094    
095    
096      /**
097       * {@inheritDoc}
098       */
099      public void setRawAttributeType(String rawAttributeType)
100      {
101        compare.setRawAttributeType(rawAttributeType);
102      }
103    
104    
105      /**
106       * {@inheritDoc}
107       */
108      public AttributeType getAttributeType()
109      {
110        return compare.getAttributeType();
111      }
112    
113    
114      /**
115       * {@inheritDoc}
116       */
117      public void setAttributeType(AttributeType attributeType)
118      {
119        compare.setAttributeType(attributeType);
120      }
121    
122    
123      /**
124       * {@inheritDoc}
125       */
126      public ByteString getAssertionValue()
127      {
128        return compare.getAssertionValue();
129      }
130    
131    
132      /**
133       * {@inheritDoc}
134       */
135      public void setAssertionValue(ByteString assertionValue)
136      {
137        compare.setAssertionValue(assertionValue);
138      }
139    
140    
141      /**
142       * {@inheritDoc}
143       */
144      public DN getProxiedAuthorizationDN()
145      {
146        return compare.getProxiedAuthorizationDN();
147      }
148    
149    
150      /**
151       * {@inheritDoc}
152       */
153      public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
154      {
155        compare.setProxiedAuthorizationDN(proxiedAuthorizationDN);
156      }
157    
158    }