|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BrowseDAO
Interface for any class wishing to interact with the Browse storage layer for Read Only operations. If you wish to modify the contents of the browse indices or create and destroy index tables you should look at implementations for BrowseCreateDAO. If you implement this class, and you wish it to be loaded via the BrowseDAOFactory you must supply a constructor of the form: public BrowseDAOImpl(Context context) {} Where Context is the DSpace Context object Where tables are referred to in this class, they can be obtained from the BrowseIndex class, which will answer queries given the context of the request on which table is the relevant target.
| Method Summary | |
|---|---|
int |
doCountQuery()
This executes a query which will count the number of results for the parameters you set. |
int |
doDistinctOffsetQuery(String column,
String value,
boolean isAscending)
This executes a query which returns the offset where the value (or nearest greater equivalent) can be found in the specified table ordered by the column. |
String |
doMaxQuery(String column,
String table,
int itemID)
This executes a query which returns the value of the "highest" (max) value in the given table's column for the given item id. |
int |
doOffsetQuery(String column,
String value,
boolean isAscending)
This executes a query which returns the offset where the value (or nearest greater equivalent) can be found in the specified table ordered by the column. |
List<BrowseItem> |
doQuery()
This executes a query which returns a List object containing BrowseItem objects representing the results of a full item browse. |
List<String[]> |
doValueQuery()
This executes a query which returns a List object containing String values which represent the results of a single value browse (for example, the list of all subject headings). |
String |
getAuthorityValue()
|
int |
getContainerID()
Get the database ID of the container object. |
String |
getContainerIDField()
get the name of the field in which to look for the container id. |
String |
getContainerTable()
Get the name of the container table that is being used to map items to distinct values when in a container constrained browse |
String[] |
getCountValues()
Get the array of fields that we will be counting on. |
String |
getFilterValue()
Get the value which we are constraining all our browse results to contain. |
String |
getFilterValueField()
Get the name of the field in which the value to constrain results is contained |
String |
getJumpToField()
Get the field in which we will match a focus value from which to start the browse. |
String |
getJumpToValue()
Get the value at which the browse will start. |
int |
getLimit()
get the integer number which is the limit of the results that will be returned by any query. |
int |
getOffset()
Get the offset from the first result from which to return results. |
String |
getOrderField()
Get the database field which will be used to do the sorting of result sets on. |
String[] |
getSelectValues()
Get the array of values that we will be selecting on. |
String |
getTable()
get the name of the table that we are querying |
boolean |
isAscending()
Is the sort order ascending or descending? Default value is true |
boolean |
isDistinct()
Is this a distinct value browse? |
void |
setAscending(boolean ascending)
Set whether the results should be sorted in ascending order (on the given sort column) or descending order. |
void |
setAuthorityValue(String value)
|
void |
setContainerID(int containerID)
Set the database id of the container object. |
void |
setContainerIDField(String containerIDField)
set the name of the field in which to look for the container id. |
void |
setContainerTable(String containerTable)
If we have specified a container id and container field, we must also specify a container table. |
void |
setCountValues(String[] fields)
Set the array of columns that we will be counting over. |
void |
setDistinct(boolean bool)
Set whether this is a distinct value browse or not |
void |
setEqualsComparator(boolean equalsComparator)
Set whether the query should use an equals comparator when doing less than or greater than comparisons. |
void |
setFilterMappingTables(String tableDis,
String tableMap)
Set the name of the mapping tables to use for filtering |
void |
setFilterValue(String value)
Set the value to which all our browse results should be constrained. |
void |
setFilterValueField(String valueField)
Set he name of the field in which the value to constrain results is contained |
void |
setFilterValuePartial(boolean part)
Sets whether we will treat the filter value as partial (like match), or exact |
void |
setJumpToField(String focusField)
Set the focus field upon which we will match a value from which to start the browse. |
void |
setJumpToValue(String focusValue)
Set the value upon which to start the browse from. |
void |
setLimit(int limit)
Set the limit for how many results should be returned. |
void |
setOffset(int offset)
Get the offset from the first result from which to return results. |
void |
setOrderField(String orderField)
Set the database field which will be used to sort result sets on |
void |
setSelectValues(String[] selectValues)
Set the array of values to select on. |
void |
setTable(String table)
Set the name of the table to query |
boolean |
useEqualsComparator()
Does the query use the equals comparator when doing less than or greater than comparisons. |
| Method Detail |
|---|
int doCountQuery()
throws BrowseException
BrowseException
List<String[]> doValueQuery()
throws BrowseException
BrowseException
List<BrowseItem> doQuery()
throws BrowseException
BrowseException
String doMaxQuery(String column,
String table,
int itemID)
throws BrowseException
column - the column to interrogatetable - the table to queryitemID - the item id
BrowseException
int doOffsetQuery(String column,
String value,
boolean isAscending)
throws BrowseException
column - the column to interrogatevalue - the item idisAscending - browsing in ascending or descending order
BrowseException
int doDistinctOffsetQuery(String column,
String value,
boolean isAscending)
throws BrowseException
column - the column to interrogatevalue - the item idisAscending - browsing in ascending or descending order
BrowseExceptionboolean useEqualsComparator()
void setEqualsComparator(boolean equalsComparator)
equalsComparator - true to use, false to not.boolean isAscending()
void setAscending(boolean ascending)
ascending - true to ascend, false to descendint getContainerID()
void setContainerID(int containerID)
containerID - String getContainerIDField()
void setContainerIDField(String containerIDField)
containerIDField - the name of the container id field.
For example "collection_id" or "community_id"String getJumpToField()
void setJumpToField(String focusField)
String getJumpToValue()
void setJumpToValue(String focusValue)
focusValue - the value in the focus field on which to start browsingint getLimit()
void setLimit(int limit)
limit - the maximum number of results to return.int getOffset()
void setOffset(int offset)
offset - String getOrderField()
void setOrderField(String orderField)
orderField - the field by which results will be sortedString[] getSelectValues()
void setSelectValues(String[] selectValues)
selectValues - the values to select onString[] getCountValues()
void setCountValues(String[] fields)
fields - an array of fields to be counted overString getTable()
void setTable(String table)
table - the name of the table
void setFilterMappingTables(String tableDis,
String tableMap)
tableDis - the name of the table holding the distinct valuestableMap - the name of the table holding the mappingsString getFilterValue()
void setFilterValue(String value)
value - the value to which to constrain resultsvoid setFilterValuePartial(boolean part)
part - true if partial, false if exactString getFilterValueField()
void setFilterValueField(String valueField)
valueField - the name of the fieldvoid setDistinct(boolean bool)
bool - true if distinct value, false if notboolean isDistinct()
void setContainerTable(String containerTable)
containerTable - the name of the container table mappingString getContainerTable()
void setAuthorityValue(String value)
String getAuthorityValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||