public class NSFItem extends NSFBase
Constructor and Description |
---|
NSFItem(NSFItem existing)
Creates an NSFItem based on an existing in-memory NSFItem, including its child structures.
|
NSFItem(NSFNote parent,
String name,
BLOCKID itemBlockId,
ValueType dataType,
BLOCKID valueBlockId,
int valueLen)
Constructs a new
NSFItem object for the provided note and item name. |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(ItemFlag flag) |
protected void |
doFree()
This method is called when the final reference to this object is freed.
|
byte |
getDupItemId() |
Set<ItemFlag> |
getFlags() |
BLOCKID |
getItemBlockId() |
String |
getName() |
NSFNote |
getParent() |
byte |
getSeqByte() |
ValueType |
getType() |
Object[] |
getValue() |
<T> T |
getValue(Class<T> clazz)
This method attempts to coerce the item's value into the provided class.
|
BLOCKID |
getValueBlockId() |
int |
getValueLen() |
boolean |
isRefValid()
Checks whether the object's inner reference is valid.
|
void |
removeFlag(ItemFlag flag) |
void |
setFlags(Collection<ItemFlag> flags) |
String |
toString() |
_checkRefValidity, addChild, addChildStruct, debugPrintChildHierarchy, finalize, free, free, free, getAPI, getChildObjectCount, getChildObjectCount, getChildStructCount, isFreed, isTraceCreation, removeChild, removeChildStruct, removeFromParent, retain, setNeedsFree, setTraceCreation
public NSFItem(NSFNote parent, String name, BLOCKID itemBlockId, ValueType dataType, BLOCKID valueBlockId, int valueLen)
NSFItem
object for the provided note and item name. The item will be the
first item in the note with the provided name.
During construction, the item takes ownership of the provided BLOCKID
s.
parent
- the NSFNote
containing the itemitemName
- the name of the itemitemBlockId
- the itemBlockId
returned by NSFItemInfo
dataType
- the ValueType
enum corresponding to the type returned by NSFItemInfo
valueBlockId
- the valueBlockId
returned by NSFItemInfo
valueLen
- the valueLen
returned by NSFItemInfo
public NSFItem(NSFItem existing)
The original NSFItem will still function, but it is expected that it will be discarded immediately after transfer.
existing
- the existing NSFItem to clonepublic ValueType getType() throws DominoException
ValueType
DominoException
public void addFlag(ItemFlag flag) throws DominoException
DominoException
public void removeFlag(ItemFlag flag) throws DominoException
DominoException
public void setFlags(Collection<ItemFlag> flags) throws DominoException
DominoException
public BLOCKID getItemBlockId()
public BLOCKID getValueBlockId()
public int getValueLen()
public String getName()
public byte getSeqByte()
public byte getDupItemId()
public Object[] getValue() throws DominoException
DominoException
DominoNativeUtils#readItemValueArray(long, int, long)
public <T> T getValue(Class<T> clazz) throws DominoException
In the case of supported single-value classes and multi-value items, the item's first value is returned.
itemName
- the item name whose value to retrieveclazz
- the class to attempt to coerce the item tonull
if the item doesn't exist or can't be coercedDominoException
- if there is a problem retrieving the valueprotected void doFree()
NSFBase
Implemented classes are expected to release any memory or network resources they have open. They are also expected to write this defensively, allowing the method to be called multiple times on the same object without problem.
public boolean isRefValid()
NSFBase
isRefValid
in class NSFBase
Copyright © 2014–2018. All rights reserved.