|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmobilecore.dstore.RecordStructure
public class RecordStructure
A RecordStructure
represents a description of a database record
Field Summary | |
---|---|
int |
descLength
Total length of all descriptor fields |
java.util.Vector |
fieldStructure
A Vector of field structures in the current RecordStructure |
Constructor Summary | |
---|---|
RecordStructure(byte[] binaryForm)
Creates new RecordStructure from binary form |
|
RecordStructure(int fieldsNum)
Creates new RecordStructure of specified size |
Method Summary | |
---|---|
boolean |
addField(FieldStructure fStruct)
Add new record field to the RecordStructure |
boolean |
addField(java.lang.String fName,
int fType)
Add new record field to the RecordStructure |
int |
getFieldNum(java.lang.String fName)
Get field number for specified field name |
FieldStructure |
getFieldStructure(int fIndex)
Get field structure for specified field number |
FieldStructure |
getFieldStructure(java.lang.String fName)
Get field structure for specified field name |
byte[] |
toByteArray()
Export current RecordStructure to binary form |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int descLength
public java.util.Vector fieldStructure
Vector
of field structures in the current RecordStructure
Constructor Detail |
---|
public RecordStructure(byte[] binaryForm)
RecordStructure
from binary form
binaryForm
- binary representation of RecordStructure
toByteArray()
public RecordStructure(int fieldsNum)
RecordStructure
of specified size
fieldsNum
- number of fields in the record.Method Detail |
---|
public boolean addField(FieldStructure fStruct)
RecordStructure
fStruct
- the field structure.
true
if field was successfully added to the record, false
otherwisepublic boolean addField(java.lang.String fName, int fType)
RecordStructure
fName
- the field name.fType
- the field type.
true
if field was successfully added to the record, false
otherwisepublic int getFieldNum(java.lang.String fName)
fName
- the field name.
-1
if field name was not foundpublic FieldStructure getFieldStructure(int fIndex)
fIndex
- the field index, the first field is 0, second is 1.
public FieldStructure getFieldStructure(java.lang.String fName)
fName
- the field name.
null
otherwisepublic byte[] toByteArray()
RecordStructure
to binary form
RecordStructure
RecordStructure(byte[] binaryForm)
|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |