Package com.isode.dsapi.util
Interface ISeqEntry
ISeqEntry is an interface that both SeqEntry and MapEntry
implement, covering just the SeqEntry features. This allows a
MapEntry to be returned as an ISeqEntry, avoiding conversion. It
also allows the original MapEntry to be recovered without
conversion: getMapEntry() does this, or converts the entry to a
MapEntry if it is in fact a SeqEntry.
- Author:
- jp
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new attribute.getDN()
Get the DNGet this entry as a MapEntry.Get the original DNboolean
Check whether the DN has changed (relative to the original DN).boolean
isEmpty()
Is the entry empty (no attributes)?iterator()
Iteratorvoid
Set the DNvoid
Set the original DN.Convert to an AddEntrytoEntry()
Convert to an EntryMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
Add a new attribute. Note that for efficiency, there is no check whether the attribute is already present. The caller should know that the attribute doesn't already exist. Attributes without any values are skipped.- Parameters:
attr
- Attribute to add
-
iterator
Iterator -
isEmpty
boolean isEmpty()Is the entry empty (no attributes)? -
getDN
DN getDN()Get the DN- Returns:
- DN
-
setDN
Set the DN -
getOrigDN
DN getOrigDN()Get the original DN- Returns:
- DN
-
setOrigDN
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. -
hasDNChanged
boolean hasDNChanged()Check whether the DN has changed (relative to the original DN). -
toAddEntry
AddEntry toAddEntry()Convert to an AddEntry- Returns:
- AddEntry
-
toEntry
Entry toEntry()Convert to an Entry- Returns:
- Entry
-
getMapEntry
MapEntry getMapEntry()Get this entry as a MapEntry. If the underlying class is a SeqEntry, it will be converted. If the underlying class is already a MapEntry, then the same reference is returned.- Returns:
- MapEntry
-