org.apache.directory.server.xdbm
Class ParentIdAndRdn<ID extends Comparable<ID>>

java.lang.Object
  extended by org.apache.directory.server.xdbm.ParentIdAndRdn<ID>
All Implemented Interfaces:
Externalizable, Serializable, Comparable<ParentIdAndRdn<ID>>

public class ParentIdAndRdn<ID extends Comparable<ID>>
extends Object
implements Externalizable, Comparable<ParentIdAndRdn<ID>>

A wrapper for the tuple of parentId and Rdn, used for the Rdn index. If the refered entry is a ContextEntry, we may have more than one Rdn stored

Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
protected  ID parentId
          The entry ID
protected  org.apache.directory.shared.ldap.model.name.Rdn[] rdns
          The list of Rdn for this instance
 
Constructor Summary
ParentIdAndRdn()
          Serializable constructor.
ParentIdAndRdn(ID parentId, List<org.apache.directory.shared.ldap.model.name.Rdn> rdns)
          Creates a new instance of ParentIdAndRdn.
ParentIdAndRdn(ID parentId, org.apache.directory.shared.ldap.model.name.Rdn... rdns)
          Creates a new instance of ParentIdAndRdn.
 
Method Summary
 int compareTo(ParentIdAndRdn<ID> that)
          
 boolean equals(Object obj)
           
 ID getParentId()
          Gets the parent ID.
 org.apache.directory.shared.ldap.model.name.Rdn[] getRdns()
          Gets the RDNs.
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 void setParentId(ID parentId)
          Sets the parent ID.
 void setRdns(org.apache.directory.shared.ldap.model.name.Rdn[] rdns)
          Sets the Rdn.
 String toString()
          
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parentId

protected ID extends Comparable<ID> parentId
The entry ID


rdns

protected org.apache.directory.shared.ldap.model.name.Rdn[] rdns
The list of Rdn for this instance

Constructor Detail

ParentIdAndRdn

public ParentIdAndRdn()
Serializable constructor.


ParentIdAndRdn

public ParentIdAndRdn(ID parentId,
                      org.apache.directory.shared.ldap.model.name.Rdn... rdns)
Creates a new instance of ParentIdAndRdn.

Parameters:
parentId - the parent ID
rdns - the RDNs

ParentIdAndRdn

public ParentIdAndRdn(ID parentId,
                      List<org.apache.directory.shared.ldap.model.name.Rdn> rdns)
Creates a new instance of ParentIdAndRdn.

Parameters:
parentId - the parent ID
rdns - the RDNs
Method Detail

getParentId

public ID getParentId()
Gets the parent ID.

Returns:
the parent ID

setParentId

public void setParentId(ID parentId)
Sets the parent ID.

Parameters:
parentId - the new parent ID

getRdns

public org.apache.directory.shared.ldap.model.name.Rdn[] getRdns()
Gets the RDNs.

Returns:
the RDNs

setRdns

public void setRdns(org.apache.directory.shared.ldap.model.name.Rdn[] rdns)
Sets the Rdn.

Parameters:
rdns - the new Rdn

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(ParentIdAndRdn<ID> that)

Specified by:
compareTo in interface Comparable<ParentIdAndRdn<ID extends Comparable<ID>>>

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.