com.mindoo.domino.jna.NotesCollationInfo 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)
package com.mindoo.domino.jna;
import java.util.List;
import com.mindoo.domino.jna.internal.NotesConstants;
/**
* Container object that provides access to the available sortings for a {@link NotesCollection}
*
* @author Karsten Lehmann
*/
public class NotesCollationInfo {
public byte m_flags;
private List m_collateDescriptors;
public NotesCollationInfo(byte flags, List descriptors) {
m_flags = flags;
m_collateDescriptors = descriptors;
}
/**
* Indicates unique keys. Used for ODBC Access: Generate unique keys in index.
*
* @return true for unique keys
*/
public boolean isUnique() {
return (m_flags & NotesConstants.COLLATION_FLAG_UNIQUE) == NotesConstants.COLLATION_FLAG_UNIQUE;
}
/**
* Flag to indicate only build on demand.
*
* @return true for build on demand
*/
public boolean isBuildOnDemand() {
return (m_flags & NotesConstants.COLLATION_FLAG_BUILD_ON_DEMAND) == NotesConstants.COLLATION_FLAG_BUILD_ON_DEMAND;
}
/**
* Returns the collate descriptors with the sortings used for this collation
*
* @return descriptors
*/
public List getDescriptors() {
return m_collateDescriptors;
}
}