Package FairCom.CtreeDb
Class CTSegment
Index segment management class.
The segment is part of the index;
one single index may be composed of several segments.
It uses CTBase as the base class, and implements the constructor/destructor
allocating/freeing memory to the segment operations.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
finalize()
Destroys an allocated CTSegment objectGetField()
Retrieves the segmentCTField
objectRetrieves the segment field nameint
GetMode()
Retrieves theSEG_MODE
int
Retrieves the segment index position in index segments listRetrieves the segmentCTField
objectRetrieve the segment field nameint
Retrieves theSEGMENT_STATUS
void
MoveSegment
(int newIndex) Moves a key segment to a location indicated by newIndex.void
Changes the underlying segmentCTField
void
SetJSONField
(CTField field, String Key, int Type, int Size) Changes the underlying segmentCTField
void
SetMode
(int SegMode) Sets theSEG_MODE
Methods inherited from class CTBase
Abort, Begin, ClearSavePoint, Commit, GetAutoCommit, GetHandle, GetKeepLock, GetLockMode, GetOperation, GetTransactionMode, IsLockActive, IsTransActive, IsUnicodeLib, Lock, PrepareCommit, RestoreSavePoint, SetAutoCommit, SetHandle, SetKeepLock, SetOperation, SetSavePoint, SetTransactionMode, Unlock
-
Constructor Details
-
CTSegment
public CTSegment()Default constructor for CTSegment class- See Also:
-
CTSegment
Copy constructor for the CTSegment class.- Parameters:
Seg
- CTSegment object to be copied- See Also:
-
-
Method Details
-
finalize
public void finalize()Destroys an allocated CTSegment object -
GetField
Retrieves the segmentCTField
object- Returns:
CTField
object representing the field used by the current segment- Throws:
CTException
- in case of error- See Also:
-
GetPartialField
Retrieves the segmentCTField
object- Returns:
CTField
object representing the field used by the current segment- Throws:
CTException
- in case of error- See Also:
-
GetFieldName
Retrieves the segment field name- Returns:
- Current field name
- Throws:
CTException
- in case of error- See Also:
-
GetPartialFieldName
Retrieve the segment field name- Returns:
- Current field name
- Throws:
CTException
- in case of error- See Also:
-
GetMode
Retrieves theSEG_MODE
- Returns:
- Current
SEG_MODE
value - Throws:
CTException
- in case of error- See Also:
-
SetMode
Sets theSEG_MODE
- Parameters:
SegMode
- NewSEG_MODE
value- Throws:
CTException
- in case of error- See Also:
-
GetNumber
Retrieves the segment index position in index segments list- Returns:
- Current position in the index
- Throws:
CTException
- in case of error- See Also:
-
GetStatus
public int GetStatus()Retrieves theSEGMENT_STATUS
- Returns:
- Current
SEGMENT_STATUS
value - See Also:
-
MoveSegment
Moves a key segment to a location indicated by newIndex.- Parameters:
newIndex
- Index of the new location of the segment.- Throws:
CTException
- in case of error- See Also:
-
SetField
Changes the underlying segmentCTField
- Parameters:
field
- NewCTField
object- Throws:
CTException
- in case of error- See Also:
-
SetJSONField
Changes the underlying segmentCTField
- Parameters:
field
- NewCTField
objectKey
- JSON key name that is being indexedType
- c-tree data type of key valueSize
- Key segment length- Throws:
CTException
- in case of error- See Also:
-