Author: elecharny
Date: Sun Jul 3 10:14:24 2005
New Revision: 208952
URL: http://svn.apache.org/viewcvs?rev=208952&view=rev
Log:
Added the CompareRequest pojo
Added:
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
Added: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java?rev=208952&view=auto
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
(added)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
Sun Jul 3 10:14:24 2005
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.asn1.ldap.pojo;
+
+import org.apache.asn1.ldap.codec.primitives.LdapDN;
+import org.apache.asn1.ldap.codec.primitives.LdapString;
+import org.apache.asn1.primitives.OctetString;
+
+
+/**
+ * A CompareRequest Message. Its syntax is :
+ * CompareRequest ::= [APPLICATION 14] SEQUENCE {
+ * entry LDAPDN,
+ * ava AttributeValueAssertion }
+ *
+ * AttributeValueAssertion ::= SEQUENCE {
+ * attributeDesc AttributeDescription,
+ * assertionValue AssertionValue }
+ *
+ * AttributeDescription ::= LDAPString
+ *
+ * AssertionValue ::= OCTET STRING
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class CompareRequest extends LdapMessage
+{
+ //~ Instance fields ----------------------------------------------------------------------------
+
+ /** The entry to be compared */
+ private LdapDN entry;
+
+ /** The attribute to be compared */
+ private LdapString attributeDesc;
+
+ /** The value to be compared */
+ private OctetString assertionValue;
+
+ //~ Constructors -------------------------------------------------------------------------------
+
+ /**
+ * Creates a new CompareRequest object.
+ */
+ public CompareRequest()
+ {
+ super( );
+ }
+
+ //~ Methods ------------------------------------------------------------------------------------
+
+ /**
+ * Get the entry to be deleted
+ *
+ * @return Returns the entry.
+ */
+ public String getEntry()
+ {
+ return ( ( entry == null ) ? "" : entry.toString() );
+ }
+
+ /**
+ * Set the entry to be deleted
+ *
+ * @param entry The entry to set.
+ */
+ public void setEntry( LdapDN entry )
+ {
+ this.entry = entry;
+ }
+
+ /**
+ * Get the assertion value
+ *
+ * @return Returns the assertionValue.
+ */
+ public OctetString getAssertionValue()
+ {
+ return assertionValue;
+ }
+
+ /**
+ * Set the assertion value
+ *
+ * @param assertionValue The assertionValue to set.
+ */
+ public void setAssertionValue( OctetString assertionValue )
+ {
+ this.assertionValue = assertionValue;
+ }
+
+ /**
+ * Get the attribute description
+ *
+ * @return Returns the attributeDesc.
+ */
+ public String getAttributeDesc()
+ {
+ return ( ( attributeDesc == null ) ? "" : attributeDesc.toString() );
+ }
+
+ /**
+ * Set the attribute description
+ *
+ * @param attributeDesc The attributeDesc to set.
+ */
+ public void setAttributeDesc( LdapString attributeDesc )
+ {
+ this.attributeDesc = attributeDesc;
+ }
+}
|