|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.MetaDataRecordList
public abstract class MetaDataRecordList
The results of a query.
Results of long queries will only return a partial list to save on bandwidth which can be iterated through by further calls to the server.
Subclasses work closely with the file server to do a multi-step query that does not have to return everything immediately. The SRBMetaDataRecordList class, for instance, works with partial query results and, on need, issues a query for the next batch of results.
| Field Summary | |
|---|---|
protected MetaDataField[] |
fields
Stores the descriptions and names of the related fields for all the values returned. |
protected java.lang.Object[] |
records
The query returned from the server might look like: |
| Constructor Summary | |
|---|---|
protected |
MetaDataRecordList(MetaDataField[] fields,
java.lang.Object[] recordValues)
|
|
MetaDataRecordList(MetaDataField field,
float recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
|
MetaDataRecordList(MetaDataField field,
java.lang.Float recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
|
MetaDataRecordList(MetaDataField field,
int recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
|
MetaDataRecordList(MetaDataField field,
java.lang.Integer recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
|
MetaDataRecordList(MetaDataField field,
MetaDataTable recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
|
MetaDataRecordList(MetaDataField field,
java.lang.String recordValue)
Create a new MetaDataRecordList with this field and
recordValue. |
| Method Summary | |
|---|---|
void |
addRecord(MetaDataField field,
float recordValue)
|
void |
addRecord(MetaDataField field,
int recordValue)
|
void |
addRecord(MetaDataField field,
MetaDataTable recordValue)
|
protected boolean |
addRecord(MetaDataField field,
java.lang.Object recordValue)
|
void |
addRecord(MetaDataField field,
java.lang.String recordValue)
|
boolean |
equals(java.lang.Object obj)
Tests this abstract pathname for equality with the given object. |
protected void |
finalize()
Finalizes the object by explicitly letting go of each of its internally held values. |
static MetaDataRecordList[] |
getAllResults(MetaDataRecordList[] rl)
Gets all of the query results of a particular query and returns them in a single array. |
MetaDataField |
getField(int index)
Get the MetaDataField object describing the indicated field. |
int |
getFieldCount()
Returns the number of fields for each record in the list. |
int |
getFieldIndex(java.lang.String fieldName)
Get the index for the named field. |
java.lang.String |
getFieldName(int index)
Get the field name for the indicated field. |
MetaDataField[] |
getFields()
Get the MetaDataFields for this record list. |
int |
getFieldType(int index)
Get the data type for the field's values. |
float |
getFloatValue(int index)
Get the value for the field. |
int |
getIntValue(int index)
Get the value for the field. |
abstract MetaDataRecordList[] |
getMoreResults()
By default a query will only return the first so many values which match the query to make querying faster. |
abstract MetaDataRecordList[] |
getMoreResults(int numOfResults)
Same as getMoreResults(), but returns numOfResults
instead of the default amount. |
int |
getRecordCount()
Returns the number of records in the list. |
java.lang.String |
getStringValue(int index)
Get the value for the field. |
MetaDataTable |
getTableValue(int index)
Get the value for the field. |
java.lang.Object |
getValue(int index)
Returns the values in the list. |
java.lang.Object |
getValue(MetaDataField field)
Returns the value matching this field. |
java.lang.Object |
getValue(java.lang.String field)
Returns the value matching this field. |
abstract boolean |
isQueryComplete()
Tests if the query has more values to be retrieved. |
void |
removeRecord(int index)
|
void |
removeRecord(MetaDataField field)
|
void |
setValue(int index,
float value)
|
void |
setValue(int index,
int value)
|
void |
setValue(int index,
MetaDataTable value)
|
void |
setValue(int index,
java.lang.String value)
|
boolean |
setValue(MetaDataField field,
float value)
Changes the value in this MetaDataRecordList for the approproate field. |
boolean |
setValue(MetaDataField field,
int value)
Changes the value in this MetaDataRecordList for the approproate field. |
boolean |
setValue(MetaDataField field,
MetaDataTable value)
Changes the value in this MetaDataRecordList for the approproate field. |
boolean |
setValue(MetaDataField field,
java.lang.String value)
Changes the value in this MetaDataRecordList for the approproate field. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MetaDataField[] fields
protected java.lang.Object[] records
field name: "data name" "owner" "size"
record1: test1.txt testuser 300
record2: test2.txt testuser 500
record3: image1.jpg demouser 14000
| Constructor Detail |
|---|
protected MetaDataRecordList(MetaDataField[] fields,
java.lang.Object[] recordValues)
public MetaDataRecordList(MetaDataField field,
int recordValue)
field and
recordValue.
public MetaDataRecordList(MetaDataField field,
float recordValue)
field and
recordValue.
public MetaDataRecordList(MetaDataField field,
java.lang.Integer recordValue)
field and
recordValue.
public MetaDataRecordList(MetaDataField field,
java.lang.Float recordValue)
field and
recordValue.
public MetaDataRecordList(MetaDataField field,
java.lang.String recordValue)
field and
recordValue.
public MetaDataRecordList(MetaDataField field,
MetaDataTable recordValue)
field and
recordValue.
| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Objectpublic int getFieldCount()
public MetaDataField[] getFields()
public MetaDataField getField(int index)
public java.lang.String getFieldName(int index)
public int getFieldType(int index)
public int getFieldIndex(java.lang.String fieldName)
public int getRecordCount()
public int getIntValue(int index)
java.lang.IllegalArgumentException - If the value at this index is a table.public float getFloatValue(int index)
java.lang.IllegalArgumentException - If the value at this index is a table.public java.lang.String getStringValue(int index)
java.lang.IllegalArgumentException - If the value at this index is a table.public MetaDataTable getTableValue(int index)
java.lang.IllegalArgumentException - If the value at this index is not a table.public java.lang.Object getValue(int index)
public java.lang.Object getValue(MetaDataField field)
public java.lang.Object getValue(java.lang.String field)
public void setValue(int index,
int value)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void setValue(int index,
float value)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void setValue(int index,
java.lang.String value)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void setValue(int index,
MetaDataTable value)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public boolean setValue(MetaDataField field,
int value)
throws java.lang.ArrayIndexOutOfBoundsException
field.
Returns false if the MetaDataField does not exist in this
MetaDataRecordList.
java.lang.ArrayIndexOutOfBoundsException
public boolean setValue(MetaDataField field,
float value)
throws java.lang.ArrayIndexOutOfBoundsException
field.
Returns false if the MetaDataField does not exist in this
MetaDataRecordList.
java.lang.ArrayIndexOutOfBoundsException
public boolean setValue(MetaDataField field,
java.lang.String value)
throws java.lang.ArrayIndexOutOfBoundsException
field.
Returns false if the MetaDataField does not exist in this
MetaDataRecordList.
java.lang.ArrayIndexOutOfBoundsException
public boolean setValue(MetaDataField field,
MetaDataTable value)
throws java.lang.ArrayIndexOutOfBoundsException
field.
Returns false if the MetaDataField does not exist in this
MetaDataRecordList.
java.lang.ArrayIndexOutOfBoundsException
protected boolean addRecord(MetaDataField field,
java.lang.Object recordValue)
public void addRecord(MetaDataField field,
int recordValue)
public void addRecord(MetaDataField field,
float recordValue)
public void addRecord(MetaDataField field,
java.lang.String recordValue)
public void addRecord(MetaDataField field,
MetaDataTable recordValue)
public void removeRecord(int index)
public void removeRecord(MetaDataField field)
public abstract boolean isQueryComplete()
public abstract MetaDataRecordList[] getMoreResults()
throws java.io.IOException
java.io.IOException - If an IOException occurs.
public abstract MetaDataRecordList[] getMoreResults(int numOfResults)
throws java.io.IOException
numOfResults
instead of the default amount.
java.io.IOException - If an IOException occurs.
public static MetaDataRecordList[] getAllResults(MetaDataRecordList[] rl)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
true if and only if the argument is not
null and is a MetaDataRecordList with all values equal.
equals in class java.lang.Objectobj - The object to be compared with this MetaDataRecordList
true if and only if the objects are the same;
false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||