com.mindoo.domino.jna.IItemValueTableData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-jna Show documentation
Show all versions of domino-jna Show documentation
Java project to access the HCL Domino C API using Java Native Access (JNA)
The newest version!
package com.mindoo.domino.jna;
import java.util.Calendar;
import java.util.List;
import com.mindoo.domino.jna.constants.ReadMask;
import com.mindoo.domino.jna.constants.Search;
/**
* This is the structure received from NSF searches
* if both {@link Search#NOITEMNAMES} and {@link Search#SUMMARY} are set
* and for view read operations with flag
* {@link ReadMask#SUMMARYVALUES}.
*
* The table contains a list of item data types and value. In contrast to
* {@link IItemTableData}, the {@link IItemValueTableData} does not contain
* column item names.
*
* @author Karsten Lehmann
*/
public interface IItemValueTableData {
/**
* Returns the decoded item value, with the following types:
*
* - {@link NotesItem#TYPE_TEXT} - {@link String}
* - {@link NotesItem#TYPE_TEXT_LIST} - {@link List} of {@link String}
* - {@link NotesItem#TYPE_NUMBER} - {@link Double}
* - {@link NotesItem#TYPE_NUMBER_RANGE} - {@link List} with {@link Double} values for number lists or double[] values for number ranges (not sure if Notes views really supports them)
* - {@link NotesItem#TYPE_TIME} - {@link Calendar}; if {@link #setPreferNotesTimeDates(boolean)} is called, we return {@link NotesTimeDate} instead
* - {@link NotesItem#TYPE_TIME_RANGE} - {@link List} with {@link Calendar} values for datetime lists or Calendar[] values for datetime ranges; if {@link #setPreferNotesTimeDates(boolean)} is called, we return {@link NotesTimeDate} and {@link NotesDateRange} instead
*
*
* @param index item index between 0 and {@link #getItemsCount()}
* @return value or null if unknown type
*/
public Object getItemValue(int index);
/**
* Returns the data type of an item value by its index, e.g. {@link NotesItem#TYPE_TEXT},
* {@link NotesItem#TYPE_TEXT_LIST}, {@link NotesItem#TYPE_NUMBER},
* {@link NotesItem#TYPE_NUMBER_RANGE}
*
* @param index item index between 0 and {@link #getItemsCount()}
* @return data type
*/
public int getItemDataType(int index);
/**
* Returns the number of decoded items
*
* @return number
*/
public int getItemsCount();
/**
* Sets whether methods like {@link #getItemValue(int)} should return {@link NotesTimeDate}
* instead of {@link Calendar} and {@link NotesDateRange} instead of Calendar[].
*
* @param b true to prefer NotesTimeDate (false by default)
*/
public void setPreferNotesTimeDates(boolean b);
/**
* Returns whether methods like {@link #getItemValue(int)} should return {@link NotesTimeDate}
* instead of {@link Calendar} and {@link NotesDateRange} instead of Calendar[].
*
* @return true to prefer NotesTimeDate
*/
public boolean isPreferNotesTimeDates();
}