Class SeqEntry

java.lang.Object
com.isode.dsapi.util.SeqEntry
All Implemented Interfaces:
ISeqEntry, Iterable<Attribute>

public class SeqEntry extends Object implements ISeqEntry
SeqEntry is a JNI-free representation of an Entry designed for fast sequential processing of attributes. The basic operations are adding Attributes (to fill the entry), iterating through the entry, and DN modification.
Author:
jp
  • Field Details

    • dn

      public DN dn
      DN
    • orig_dn

      public DN orig_dn
      Original DN (to detect changes)
    • attrs

      public List<Attribute> attrs
      List of attributes
  • Constructor Details

    • SeqEntry

      public SeqEntry(DN dn)
      Constructor from DN
    • SeqEntry

      public SeqEntry(DN dn, DN orig_dn)
      Constructor from DN and original DN
    • SeqEntry

      public SeqEntry(Entry entry)
      Constructor from Entry
    • SeqEntry

      public SeqEntry(AddEntry entry)
      Constructor from AddEntry
    • SeqEntry

      public SeqEntry(MapEntry map)
      Constructor from MapEntry
  • Method Details

    • add

      public void add(Attribute attr)
      Add a new attribute. Note that for efficiency, there is no check whether the attribute is already present. Attributes without any values are skipped.
      Specified by:
      add in interface ISeqEntry
      Parameters:
      attr - Attribute to add
    • iterator

      public Iterator<Attribute> iterator()
      Iterator
      Specified by:
      iterator in interface ISeqEntry
      Specified by:
      iterator in interface Iterable<Attribute>
      Returns:
      Iterator
    • isEmpty

      public boolean isEmpty()
      Is the entry empty (no attributes)?
      Specified by:
      isEmpty in interface ISeqEntry
    • getDN

      public DN getDN()
      Get the DN
      Specified by:
      getDN in interface ISeqEntry
      Returns:
      DN
    • setDN

      public void setDN(DN dn)
      Set the DN
      Specified by:
      setDN in interface ISeqEntry
    • getOrigDN

      public DN getOrigDN()
      Get the original DN
      Specified by:
      getOrigDN in interface ISeqEntry
      Returns:
      DN
    • setOrigDN

      public void setOrigDN(DN dn)
      Set the original DN. This is normally a bad idea, as the original DN must usually be maintained to refer back to the original source of the entry correctly.
      Specified by:
      setOrigDN in interface ISeqEntry
    • hasDNChanged

      public boolean hasDNChanged()
      Check whether the DN has changed.
      Specified by:
      hasDNChanged in interface ISeqEntry
    • toAddEntry

      public AddEntry toAddEntry()
      Convert to an AddEntry
      Specified by:
      toAddEntry in interface ISeqEntry
      Returns:
      AddEntry
    • toEntry

      public Entry toEntry()
      Convert to an Entry
      Specified by:
      toEntry in interface ISeqEntry
      Returns:
      Entry
    • getMapEntry

      public MapEntry getMapEntry()
      Convert to a MapEntry.
      Specified by:
      getMapEntry in interface ISeqEntry
      Returns:
      MapEntry