Constructor and Description |
---|
CTIndex()
Default constructor for the CTIndex class.
|
CTIndex(CTIndex Index)
Copy constructor for the CTIndex class.
|
Modifier and Type | Method and Description |
---|---|
CTSegment |
AddJSONSegment(CTField Field,
java.lang.String Key,
int Type,
int Size)
Adds a new JSON segment to index
|
CTSegment |
AddSegment(CTField Field,
int SegMode)
Adds a new segment to index
|
CTSegment |
AddSegment(int offset,
int length,
int SegMode)
Adds a new segment to index
|
void |
DelSegment(int SegmentNumber)
Deletes a index segment
|
void |
finalize()
Destroys an allocated CTIndex object
This method should be called in order to avoid memory leaks.
|
boolean |
GetDuplicateFlag()
Retrieves the "allow duplicated" flag for this index
|
char |
GetEmptyChar()
Retrieves the current "empty char" value
|
java.lang.String |
GetFilename()
Retrieves the index file name
|
int |
GetIdxno()
Retrieves the index file number
|
int |
GetKeyLength()
Retrieves the key length of the current index
|
int |
GetKeyType()
Retrieves the key type of the current index
|
java.lang.String |
GetName()
Retrieves the index name
|
boolean |
GetNullFlag()
Retrieves the null flag
|
int |
GetNumber()
Retrieves index position in table indices list
|
CTSegment |
GetSegment(int SegmentNumber)
Retrieves the index segment by its position number
|
int |
GetSegmentCount()
Retrieves the segment count.
|
int |
GetStatus()
Retrieves the status of the index handle.
|
boolean |
GetTemporaryFlag()
Retrives the temporary index flag
|
long |
GetUID()
Retrieves the unique index identification from the database
|
CTSegment |
InsertSegment(int BeforeSegment,
CTField Field,
int SegMode)
Inserts a new index segment before the segment number.
|
CTSegment |
InsertSegment(int BeforeSegment,
int offset,
int length,
int SegMode)
Inserts a new index segment before the segment number.
|
void |
MoveSegment(int SegmentNumber,
int NewIndex)
Moves a key segment to a location indicated by newIndex.
|
void |
SetCndxExpression(java.lang.String Expression)
Sets the conditional expression for the current index
|
void |
SetDuplicateFlag(boolean DupFlag)
Sets the "allow duplicate key" flag for the current index
|
void |
SetEmptyChar(char EmptyChar)
Sets the index "empty char" property for the current index
|
void |
SetFilename(java.lang.String Path,
java.lang.String Name)
Sets the index path and filename.
|
void |
SetKeyType(int keytype)
Sets the Index
KEY_TYPE |
void |
SetName(java.lang.String IndexName)
Sets the index name, before the table is created.
|
void |
SetNullFlag(boolean NullFlag)
Sets the "allow null key" flag for the current index
|
void |
SetTemporaryFlag(boolean TempFlag)
Sets the temporary flag for the current index
|
Abort, Begin, ClearSavePoint, Commit, GetAutoCommit, GetHandle, GetKeepLock, GetLockMode, GetOperation, GetTransactionMode, IsLockActive, IsTransActive, IsUnicodeLib, Lock, PrepareCommit, RestoreSavePoint, SetAutoCommit, SetHandle, SetKeepLock, SetOperation, SetSavePoint, SetTransactionMode, Unlock
public CTIndex()
CTIndex(CTIndex)
,
finalize()
public CTIndex(CTIndex Index)
Index
- CTIndex object to be copiedCTIndex()
,
finalize()
public void finalize()
finalize
in class java.lang.Object
CTIndex(FairCom.CtreeDb.CTIndex)
public int GetKeyLength()
GetKeyType()
,
GetSegmentCount()
public int GetKeyType() throws CTException
KEY_TYPE
valueCTException
- in case of errorGetKeyLength()
,
GetSegmentCount()
public char GetEmptyChar()
SetEmptyChar(char)
,
GetDuplicateFlag()
,
GetNullFlag()
,
GetTemporaryFlag()
public boolean GetDuplicateFlag()
SetDuplicateFlag(boolean)
,
GetEmptyChar()
,
GetNullFlag()
,
GetTemporaryFlag()
public boolean GetNullFlag()
SetNullFlag(boolean)
,
GetEmptyChar()
,
GetDuplicateFlag()
,
GetTemporaryFlag()
public boolean GetTemporaryFlag()
SetTemporaryFlag(boolean)
,
GetEmptyChar()
,
GetDuplicateFlag()
,
GetNullFlag()
public void SetEmptyChar(char EmptyChar) throws CTException
EmptyChar
- New "empty character" to be setCTException
- in case of errorGetEmptyChar()
,
SetDuplicateFlag(boolean)
,
SetTemporaryFlag(boolean)
,
SetNullFlag(boolean)
public void SetDuplicateFlag(boolean DupFlag) throws CTException
DupFlag
- true if the current index will allow duplicated, otherwise falseCTException
- in case of errorGetDuplicateFlag()
,
SetEmptyChar(char)
,
SetTemporaryFlag(boolean)
,
SetNullFlag(boolean)
public void SetNullFlag(boolean NullFlag) throws CTException
NullFlag
- true if the current index will allow null key, otherwise falseCTException
- in case of errorGetNullFlag()
,
SetEmptyChar(char)
,
SetTemporaryFlag(boolean)
,
SetDuplicateFlag(boolean)
public void SetTemporaryFlag(boolean TempFlag) throws CTException
TempFlag
- true if the current index is temporary, otherwise falseCTException
- in case of errorGetTemporaryFlag()
,
SetEmptyChar(char)
,
SetNullFlag(boolean)
,
SetDuplicateFlag(boolean)
public int GetSegmentCount()
GetKeyType()
,
GetKeyLength()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public CTSegment AddSegment(CTField Field, int SegMode) throws CTException
Field
- CTField
object to be added as a keySegMode
- New SEG_MODE
CTSegment
CTException
- in case of errorGetSegmentCount()
,
AddSegment(int, int, int)
,
InsertSegment(int, FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public CTSegment AddSegment(int offset, int length, int SegMode) throws CTException
offset
- Segment offsetlength
- Segment length in bytesSegMode
- New SEG_MODE
CTSegment
CTException
- in case of errorGetSegmentCount()
,
AddSegment(CTField, int)
,
InsertSegment(int, FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public CTSegment AddJSONSegment(CTField Field, java.lang.String Key, int Type, int Size) throws CTException
Field
- CTField
object to be added as a keyKey
- JSON key name that is being indexedType
- c-tree data type of key valueSize
- Key segment lengthCTSegment
CTException
- in case of errorGetSegmentCount()
,
AddSegment(int, int, int)
,
InsertSegment(int, FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public CTSegment InsertSegment(int BeforeSegment, CTField Field, int SegMode) throws CTException
BeforeSegment
- Insert the new segment before this index segment positionField
- CTField
object to be added as a keySegMode
- New SEG_MODE
CTSegment
CTException
- in case of errorGetSegmentCount()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public CTSegment InsertSegment(int BeforeSegment, int offset, int length, int SegMode) throws CTException
BeforeSegment
- Insert the new segment before this index segment positionoffset
- Segment offsetlength
- Segment length in bytesSegMode
- New SEG_MODE
CTSegment
CTException
- in case of errorGetSegmentCount()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public void DelSegment(int SegmentNumber) throws CTException
SegmentNumber
- Segment number to be deletedCTException
- in case of errorGetSegmentCount()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
InsertSegment(int, FairCom.CtreeDb.CTField, int)
,
GetSegment(int)
public CTSegment GetSegment(int SegmentNumber) throws CTException
SegmentNumber
- Segment number to be retrievedCTSegment
objectCTException
- in case of errorGetSegmentCount()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
InsertSegment(int, FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
public int GetNumber() throws CTException
CTTable
ownerCTException
- in case of errorGetIdxno()
,
GetName()
,
GetUID()
,
GetFilename()
public java.lang.String GetName()
SetName(java.lang.String)
,
GetIdxno()
,
GetNumber()
,
GetUID()
,
GetFilename()
public long GetUID() throws CTException
CTException
- in case of errorGetIdxno()
,
GetNumber()
,
GetName()
,
GetFilename()
public void SetName(java.lang.String IndexName) throws CTException
IndexName
- New index name.CTException
- in case of errorGetName()
,
SetFilename(java.lang.String, java.lang.String)
,
SetKeyType(int)
public void SetKeyType(int keytype) throws CTException
KEY_TYPE
keytype
- KEY_TYPE
valueCTException
- in case of errorGetKeyType()
,
SetFilename(java.lang.String, java.lang.String)
,
SetName(java.lang.String)
public void SetFilename(java.lang.String Path, java.lang.String Name) throws CTException
Path
- Specify the directory were the index file is located. If Null
the directory is located in same directory of table.Name
- Specify the name of index file. If Null the index file will
have the name of the table.CTException
- in case of errorGetFilename()
,
SetKeyType(int)
,
SetName(java.lang.String)
public java.lang.String GetFilename()
SetFilename(java.lang.String, java.lang.String)
,
GetKeyType()
,
GetName()
public int GetIdxno() throws CTException
CTException
- in case of errorGetNumber()
,
GetName()
,
GetUID()
,
GetFilename()
public int GetStatus()
INDEX_STATUS
valueINDEX_STATUS
valueGetNumber()
,
GetName()
,
GetUID()
,
GetFilename()
public void MoveSegment(int SegmentNumber, int NewIndex) throws CTException
SegmentNumber
- Current segment number to be moved.NewIndex
- Index of the new location of the segment.CTException
- in case of errorGetSegmentCount()
,
AddSegment(FairCom.CtreeDb.CTField, int)
,
DelSegment(int)
,
GetSegment(int)
public void SetCndxExpression(java.lang.String Expression) throws CTException
Expression
- Conditional expression stringCTException
- in case of errorSetTemporaryFlag(boolean)
,
SetName(java.lang.String)
,
SetKeyType(int)
,
SetFilename(java.lang.String, java.lang.String)