Added more methods for the Db class.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@750 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
dsandersoremutah
2006-08-08 20:55:27 +00:00
parent 6a71caf32f
commit 6e080deb8f
17 changed files with 1239 additions and 132 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_CommitClient */
#ifndef _Included_xflaim_CommitClient
#define _Included_xflaim_CommitClient
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -719,6 +719,70 @@ JNIEXPORT jbyteArray JNICALL Java_xflaim_Db__1getSerialNumber
JNIEXPORT jobject JNICALL Java_xflaim_Db__1getCheckpointInfo
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _exportXML
* Signature: (JJLjava/lang/String;I)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1exportXML__JJLjava_lang_String_2I
(JNIEnv *, jobject, jlong, jlong, jstring, jint);
/*
* Class: xflaim_Db
* Method: _exportXML
* Signature: (JJI)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_xflaim_Db__1exportXML__JJI
(JNIEnv *, jobject, jlong, jlong, jint);
/*
* Class: xflaim_Db
* Method: _getLockWaiters
* Signature: (J)[Lxflaim/LockUser;
*/
JNIEXPORT jobjectArray JNICALL Java_xflaim_Db__1getLockWaiters
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _setDeleteStatusObject
* Signature: (JLxflaim/DeleteStatus;)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1setDeleteStatusObject
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: xflaim_Db
* Method: _setIndexingClientObject
* Signature: (JLxflaim/IxClient;)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1setIndexingClientObject
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: xflaim_Db
* Method: _setIndexingStatusObject
* Signature: (JLxflaim/IxStatus;)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1setIndexingStatusObject
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: xflaim_Db
* Method: _setCommitClientObject
* Signature: (JLxflaim/CommitClient;)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1setCommitClientObject
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: xflaim_Db
* Method: _upgrade
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1upgrade
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,13 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_DeleteStatus */
#ifndef _Included_xflaim_DeleteStatus
#define _Included_xflaim_DeleteStatus
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,21 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_ExportFormatType */
#ifndef _Included_xflaim_ExportFormatType
#define _Included_xflaim_ExportFormatType
#ifdef __cplusplus
extern "C" {
#endif
#undef xflaim_ExportFormatType_XFLM_EXPORT_NO_FORMAT
#define xflaim_ExportFormatType_XFLM_EXPORT_NO_FORMAT 0L
#undef xflaim_ExportFormatType_XFLM_EXPORT_NEW_LINE
#define xflaim_ExportFormatType_XFLM_EXPORT_NEW_LINE 1L
#undef xflaim_ExportFormatType_XFLM_EXPORT_INDENT
#define xflaim_ExportFormatType_XFLM_EXPORT_INDENT 2L
#undef xflaim_ExportFormatType_XFLM_EXPORT_INDENT_DATA
#define xflaim_ExportFormatType_XFLM_EXPORT_INDENT_DATA 3L
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,13 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_IxClient */
#ifndef _Included_xflaim_IxClient
#define _Included_xflaim_IxClient
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,13 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_IxStatus */
#ifndef _Included_xflaim_IxStatus
#define _Included_xflaim_IxStatus
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,21 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_LockUser */
#ifndef _Included_xflaim_LockUser
#define _Included_xflaim_LockUser
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: xflaim_LockUser
* Method: initIDs
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_xflaim_LockUser_initIDs
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// Desc: CommitClient Interface
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
interface CommitClient
{
public void commit(
Db db);
}

View File

@@ -1312,6 +1312,76 @@ public class Db
return( _getCheckpointInfo( m_this));
}
/**
* Export XML to a text file.
*
* @param startNode The node in the XML document to export. All of its
* sub-tree will be exported.
* @param sFileName File the XML is to be exported to. File will be
* overwritten.
* @param iFormat Formatting to use when exporting. Should be one of
* {@link xflaim.ExportFormatType ExportFormatType}.
* @throws XFlaimException
*/
public void exportXML(
DOMNode startNode,
String sFileName,
int iFormat) throws XFlaimException
{
_exportXML( m_this, startNode.getThis(), sFileName, iFormat);
}
/**
* Export XML to a string.
*
* @param startNode The node in the XML document to export. All of its
* sub-tree will be exported.
* @param iFormat Formatting to use when exporting. Should be one of
* {@link xflaim.ExportFormatType ExportFormatType}.
* @throws XFlaimException
*/
public String exportXML(
DOMNode startNode,
int iFormat) throws XFlaimException
{
return( _exportXML( m_this, startNode.getThis(), iFormat));
}
public LockUser[] getLockWaiters() throws XFlaimException
{
return( _getLockWaiters( m_this));
}
public void setDeleteStatusObject(
DeleteStatus deleteStatusObj) throws XFlaimException
{
_setDeleteStatusObject( m_this, deleteStatusObj);
}
public void setIndexingClientObject(
IxClient ixClientObj) throws XFlaimException
{
_setIndexingClientObject( m_this, ixClientObj);
}
public void setIndexingStatusObject(
IxStatus ixStatusObj) throws XFlaimException
{
_setIndexingStatusObject( m_this, ixStatusObj);
}
public void setCommitClientObject(
CommitClient commitClientObj) throws XFlaimException
{
_setCommitClientObject( m_this, commitClientObj);
}
public void upgrade() throws XFlaimException
{
_upgrade( m_this);
}
private native void _release(
long lThis);
@@ -1624,44 +1694,40 @@ public class Db
private native CheckpointInfo _getCheckpointInfo(
long lThis) throws XFlaimException;
private native void _exportXML(
long lThis,
long lStartNode,
String sFileName,
int iFormat) throws XFlaimException;
private native String _exportXML(
long lThis,
long lStartNode,
int iFormat) throws XFlaimException;
private native LockUser[] _getLockWaiters(
long lThis) throws XFlaimException;
private native void _setDeleteStatusObject(
long lThis,
DeleteStatus deleteStatusObj) throws XFlaimException;
private native void _setIndexingClientObject(
long lThis,
IxClient ixClientObj) throws XFlaimException;
private native void _setIndexingStatusObject(
long lThis,
IxStatus ixStatusObj) throws XFlaimException;
private native void _setCommitClientObject(
long lThis,
CommitClient commitClientObj) throws XFlaimException;
private native void _upgrade(
long lThis) throws XFlaimException;
long m_this;
private DbSystem m_dbSystem;
}
/*
LIST OF METHODS NOT YET IMPLEMENTED
virtual RCODE FLMAPI upgrade(
IF_UpgradeClient * pUpgradeClient) = 0;
virtual RCODE FLMAPI importDocument(
IF_IStream * ifpStream,
FLMUINT uiCollection,
IF_DOMNode ** ppDocumentNode = NULL,
XFLM_IMPORT_STATS * pImportStats = NULL) = 0;
virtual RCODE FLMAPI exportXML(
IF_DOMNode * pStartNode,
IF_OStream * pOStream,
eExportFormatType eFormat = XFLM_EXPORT_INDENT) = 0;
virtual void FLMAPI setDeleteStatusObject(
IF_DeleteStatus * pDeleteStatus) = 0;
virtual void FLMAPI setCommitClientObject(
IF_CommitClient * pCommitClient) = 0;
virtual void FLMAPI setIndexingClientObject(
IF_IxClient * pIxClient) = 0;
virtual void FLMAPI setIndexingStatusObject(
IF_IxStatus * pIxStatus) = 0;
virtual void FLMAPI getCheckpointInfo(
XFLM_CHECKPOINT_INFO * pCheckpointInfo) = 0;
virtual RCODE FLMAPI getLockWaiters(
IF_LockInfoClient * pLockInfo) = 0;
*/

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// Desc: DeleteStatus Interface
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
interface DeleteStatus
{
public int reportDelete(
int iBlocksDeleted,
int iBlockSize);
}

View File

@@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// Desc: ExportFormatType
//
// Tabs: 3
//
// Copyright (c) 2003-2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
/**
* Provides enums for index states.
*/
public final class ExportFormatType
{
public static final int XFLM_EXPORT_NO_FORMAT = 0;
public static final int XFLM_EXPORT_NEW_LINE = 1;
public static final int XFLM_EXPORT_INDENT = 2;
public static final int XFLM_EXPORT_INDENT_DATA = 3;
}

View File

@@ -25,7 +25,7 @@
package xflaim;
/**
* The IndexState class provides members that give an index's current state.
* The ImportStats class provides members that import statistics.
*/
public class ImportStats
{

View File

@@ -25,7 +25,7 @@
package xflaim;
/**
* The IndexState class provides members that give an index's current state.
* The IndexStatus class provides members that give an index's current status.
*/
public class IndexStatus
{

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// Desc: IxClient Interface
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
interface IxClient
{
public int doIndexing(
int iIndex,
int iCollection,
long lDocNodeId);
}

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// Desc: IxStatus Interface
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
interface IxStatus
{
public int reportIndex(
long iLastDocumentId);
}

View File

@@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// Desc: LockUser
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
/**
* The LockUser class provides members that gives information about
* a lock holder and the lock waiters.
*/
public class LockUser
{
public int iThreadId;
public int iTime;
private static native void initIDs();
}