Search through the buffers for this bookmark.
@return int index in table; or -1 if not found.
@param bookmark java.lang.Object The bookmark to search for.
@param iHandleType The bookmark type.
424671
public int bookmarkToIndex(Object bookmark, int iHandleType)
    {
        if (bookmark == null)
            return -1;
        int iTargetPosition = m_gridBuffer.bookmarkToIndex(bookmark, iHandleType);
        if (iTargetPosition == -1)
            iTargetPosition = m_gridList.bookmarkToIndex(bookmark, iHandleType);
        return iTargetPosition;   // Target position
    }
137121
public int indexOf(final OIdentifiable iElement) {
		if (delegate.isEmpty())
			return -1;

		final boolean prevConvert = delegate.isAutoConvertToRecord();
		if (prevConvert)
			delegate.setAutoConvertToRecord(false);

		final int pos = Collections.binarySearch(delegate, iElement);

		if (prevConvert)
			// RESET PREVIOUS SETTINGS
			delegate.setAutoConvertToRecord(true);

		return pos;
	}
846396
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException
    {
        synchronized(m_objSync)
        {
            return m_tableRemote.doSetHandle(bookmark, iOpenMode, strFields, iHandleType);
        }
    }
235921
private int getTableIndex(String tableName) {

        int index;

        // System.out.println("begin searching for "+tableName);
        for (index = 0; index < vHoldTableNames.size(); index++) {

            // System.out.println("in getTableIndex searching for "+tableName+", index: "+index);
            if (tableName.equals((String) vHoldTableNames.elementAt(index))) {
                return index;
            }    // end of if (tableName.equals(vHoldTableNames.elementAt(index)))
        }        // end of for (index = 0; index < vHoldTableNames.size(); index ++)

        return -1;
    }
325398
public Object getHandle(int iHandleType) throws DBException
    {
        if (iHandleType == DBConstants.OBJECT_ID_HANDLE)
            iHandleType = DBConstants.FULL_OBJECT_HANDLE; // Get the source table also
        if (this.getCurrentTable() == null)
            return null;
        Object object = this.getCurrentTable().getHandle(iHandleType);
        if (iHandleType == DBConstants.DATA_SOURCE_HANDLE)
            object = new FullDataSource(this.getCurrentTable(), object);
        return object;
    }
125941
public int bookmarkToIndex(Object bookmark, int iHandleType)
    {
        int iTargetPosition;
        DataRecord thisBookmark = null;
        if (bookmark == null)
            return -1;
//+ Not found, look through the recordlist
        for (iTargetPosition = 0; iTargetPosition < m_iRecordListEnd; iTargetPosition += m_iRecordListStep)
        {
            thisBookmark = (DataRecord)this.elementAt(iTargetPosition);
            if (bookmark.equals(thisBookmark.getHandle(iHandleType)))
                return iTargetPosition;
        }
//+ Still not found, do a binary search through the recordlist for a matching key
        return -1;  // Not found
    }
174936
private int compare(int i) {

        if (sortOnValues) {
            if (targetSearchValue > values[i]) {
                return 1;
            } else if (targetSearchValue < values[i]) {
                return -1;
            }
        } else {
            if (targetSearchValue > keys[i]) {
                return 1;
            } else if (targetSearchValue < keys[i]) {
                return -1;
            }
        }

        return 0;
    }
195235
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        FieldList record = super.setHandle(bookmark, iHandleType);
        Iterator<BaseTable> iterator = this.getTables();
        while (iterator.hasNext())
        {
            BaseTable table = iterator.next();
            if ((table != null) && (table != this.getNextTable()))
                this.syncTables(table, this.getRecord());
        }
        return record;
    }
158456
public Object getHandle(int iHandleType) throws DBException
    {
        Object bookmark = this.getCurrentTable().getHandle(iHandleType);
        return bookmark;
    }
688120
final public int getPageIndexInParent(WebSiteRequest req) throws IOException, SQLException {
		WebPage[] myPages=getParent().getCachedPages(req);
		int len=myPages.length;
		for(int c=0;c<len;c++) if(myPages[c].equals(this)) return c;
		throw new RuntimeException("Unable to find page index in parent.");
	}
439659
public double get(int i) {
		if (i < 0 || i >= N) throw new IllegalArgumentException("Illegal index " + i + " should be > 0 and < " + N);
		if (symbolTable.contains(i)) return symbolTable.get(i);
		else                return 0.0;
	}
1200297
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        this.setCurrentRecord(this.getBaseRecord());
        Object[] rgobjEnabledFields = this.getBaseRecord().setEnableFieldListeners(false);
        try {
            Record record = (Record)super.setHandle(bookmark, iHandleType);
            if (record == null)
                return null;

            this.getBaseRecord().setEnableFieldListeners(rgobjEnabledFields);

            this.getBaseRecord().handleValidRecord(); // Display Fields
            record = this.moveToCurrentRecord(record);
            if (record != null) if (record != this.getBaseRecord())
                record.handleValidRecord(); // Display Fields

            return record;
        } catch (DBException ex)    {
            throw ex;
        } finally {
            this.getBaseRecord().setEnableFieldListeners(rgobjEnabledFields);
        }
    }
895718
public Object setupBookmark(int iAreaDesc)
    {
        if (this.getKeyFields() == 1)   // Special case - single unique key;
            return this.getField(iAreaDesc).getData();
        BaseBuffer buffer = new org.jbundle.thin.base.db.buff.str.StrBuffer(null);
        this.setupKeyBuffer(buffer, iAreaDesc);
        return buffer;
    }
354065
public int indexOf(DurationFieldType type) {
        for (int i = 0, isize = size(); i < isize; i++) {
            if (iTypes[i] == type) {
                return i;
            }
        }
        return -1;
    }
737004
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        m_objectID = null;      // No current record
        m_dataSource = null;
        FieldList fieldList = this.getNextTable().setHandle(bookmark, iHandleType);
        if (fieldList != null)
            m_iRecordStatus = DBConstants.RECORD_NORMAL;
        else
            m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF | DBConstants.RECORD_AT_EOF;
        return fieldList;
    }
453848
public Object getBookmark(int iHandleType)
    {
        Map<String,Object> properties = this.getProperties();
        Object bookmark = properties.get(BOOKMARK);
        if (iHandleType == DBConstants.BOOKMARK_HANDLE)
            return bookmark;
        if (iHandleType == DBConstants.FULL_OBJECT_HANDLE)
        {
            String strDatabaseName = (String)properties.get(DB_NAME);
            String strTableName = (String)properties.get(TABLE_NAME);
            // Must match the FULL_OBJECT_HANDLE format!
            String strSource = m_strSourceType + BaseTable.HANDLE_SEPARATOR + strDatabaseName + BaseTable.HANDLE_SEPARATOR + strTableName;
            strSource += BaseTable.HANDLE_SEPARATOR + bookmark.toString();
            return strSource;
        }
        return null;
    }
747391
public Annotation getRangeList(int i) {
    if (OntRelationMention_Type.featOkTst && ((OntRelationMention_Type)jcasType).casFeat_rangeList == null)
      jcasType.jcas.throwFeatMissing("rangeList", "de.julielab.jules.types.OntRelationMention");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((OntRelationMention_Type)jcasType).casFeatCode_rangeList), i);
    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((OntRelationMention_Type)jcasType).casFeatCode_rangeList), i)));}