|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object relop.Schema
public class Schema
Each tuple has a schema that defines the logical view of the raw bytes; it describes the types, lengths, offsets, and names of a tuple's fields.
Field Summary | |
---|---|
static int |
MIN_WIDTH
Minimum column width for output. |
Constructor Summary | |
---|---|
Schema(int fldcnt)
Constructs a schema for the given number of fields. |
Method Summary | |
---|---|
int |
fieldLength(int fldno)
Gets the length of the given field. |
java.lang.String |
fieldName(int fldno)
Gets the name of the given field. |
int |
fieldNumber(java.lang.String name)
Gets the number of the field with the given name, or -1 if not found. |
int |
fieldOffset(int fldno)
Gets the offset of the given field. |
int |
fieldType(int fldno)
Gets the type of the given field. |
int |
getCount()
Gets the number of fields in the schema. |
int |
getLength()
Gets the size of a tuple (in bytes). |
void |
initField(int fldno,
int type,
int length,
java.lang.String name)
Sets the type, length, and name for the given field; this automatically calculates its offset, provided that fields are set in ascending order. |
void |
initField(int fldno,
Schema schema,
int srcno)
Copies a field from another schema. |
static Schema |
join(Schema s1,
Schema s2)
Builds and returns a new schema resulting from joining two schemas. |
void |
print()
Prints the schema (i.e. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_WIDTH
Constructor Detail |
---|
public Schema(int fldcnt)
Method Detail |
---|
public void initField(int fldno, int type, int length, java.lang.String name)
public void initField(int fldno, Schema schema, int srcno)
fldno
- number of this field to setschema
- contains the info to copysrcno
- number of the field to copypublic static Schema join(Schema s1, Schema s2)
s1
- the left schemas2
- the right schemapublic int getCount()
public int getLength()
public int fieldType(int fldno)
public int fieldLength(int fldno)
public int fieldOffset(int fldno)
public java.lang.String fieldName(int fldno)
public int fieldNumber(java.lang.String name)
public void print()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |