|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.browse.BrowseDAOPostgres
public class BrowseDAOPostgres
This class is the PostgreSQL driver class for reading information from the Browse tables. It implements the BrowseDAO interface, and also has a constructor of the form: BrowseDAOPostgres(Context context) As required by BrowseDAOFactory. This class should only ever be loaded by that Factory object.
| Constructor Summary | |
|---|---|
BrowseDAOPostgres(Context context)
Required constructor for use by BrowseDAOFactory |
|
| 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 |
doQuery()
This executes a query which returns a List object containing BrowseItem objects represening the results of a full item browse. |
List |
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). |
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BrowseDAOPostgres(Context context)
throws BrowseException
context - DSpace context
BrowseException| Method Detail |
|---|
public int doCountQuery()
throws BrowseException
BrowseDAO
doCountQuery in interface BrowseDAOBrowseException
public String doMaxQuery(String column,
String table,
int itemID)
throws BrowseException
BrowseDAO
doMaxQuery in interface BrowseDAOcolumn - the column to interrogatetable - the table to queryitemID - the item id
BrowseException
public int doOffsetQuery(String column,
String value,
boolean isAscending)
throws BrowseException
BrowseDAO
doOffsetQuery in interface BrowseDAOcolumn - the column to interrogatevalue - the item idisAscending - browsing in ascending or descending order
BrowseException
public int doDistinctOffsetQuery(String column,
String value,
boolean isAscending)
throws BrowseException
BrowseDAO
doDistinctOffsetQuery in interface BrowseDAOcolumn - the column to interrogatevalue - the item idisAscending - browsing in ascending or descending order
BrowseException
public List doQuery()
throws BrowseException
BrowseDAO
doQuery in interface BrowseDAOBrowseException
public List doValueQuery()
throws BrowseException
BrowseDAO
doValueQuery in interface BrowseDAOBrowseExceptionpublic int getContainerID()
BrowseDAO
getContainerID in interface BrowseDAOpublic String getContainerIDField()
BrowseDAO
getContainerIDField in interface BrowseDAOpublic String getContainerTable()
BrowseDAO
getContainerTable in interface BrowseDAOpublic String[] getCountValues()
BrowseDAO
getCountValues in interface BrowseDAOpublic String getJumpToField()
BrowseDAO
getJumpToField in interface BrowseDAOpublic String getJumpToValue()
BrowseDAO
getJumpToValue in interface BrowseDAOpublic int getLimit()
BrowseDAO
getLimit in interface BrowseDAOpublic int getOffset()
BrowseDAO
getOffset in interface BrowseDAOpublic String getOrderField()
BrowseDAO
getOrderField in interface BrowseDAOpublic String[] getSelectValues()
BrowseDAO
getSelectValues in interface BrowseDAOpublic String getTable()
BrowseDAO
getTable in interface BrowseDAOpublic String getFilterValue()
BrowseDAO
getFilterValue in interface BrowseDAOpublic String getFilterValueField()
BrowseDAO
getFilterValueField in interface BrowseDAOpublic boolean isAscending()
BrowseDAO
isAscending in interface BrowseDAOpublic boolean isDistinct()
BrowseDAO
isDistinct in interface BrowseDAOpublic void setAscending(boolean ascending)
BrowseDAO
setAscending in interface BrowseDAOascending - true to ascend, false to descendpublic void setContainerID(int containerID)
BrowseDAO
setContainerID in interface BrowseDAOpublic void setContainerIDField(String containerIDField)
BrowseDAO
setContainerIDField in interface BrowseDAOcontainerIDField - the name of the container id field.
For example "collection_id" or "community_id"public void setContainerTable(String containerTable)
BrowseDAO
setContainerTable in interface BrowseDAOcontainerTable - the name of the container table mappingpublic void setCountValues(String[] fields)
BrowseDAO
setCountValues in interface BrowseDAOfields - an array of fields to be counted overpublic void setDistinct(boolean bool)
BrowseDAO
setDistinct in interface BrowseDAObool - true if distinct value, false if notpublic void setEqualsComparator(boolean equalsComparator)
BrowseDAO
setEqualsComparator in interface BrowseDAOequalsComparator - true to use, false to not.public void setJumpToField(String focusField)
BrowseDAO
setJumpToField in interface BrowseDAOpublic void setJumpToValue(String focusValue)
BrowseDAO
setJumpToValue in interface BrowseDAOfocusValue - the value in the focus field on which to start browsingpublic void setLimit(int limit)
BrowseDAO
setLimit in interface BrowseDAOlimit - the maximum number of results to return.public void setOffset(int offset)
BrowseDAO
setOffset in interface BrowseDAOpublic void setOrderField(String orderField)
BrowseDAO
setOrderField in interface BrowseDAOorderField - the field by which results will be sortedpublic void setSelectValues(String[] selectValues)
BrowseDAO
setSelectValues in interface BrowseDAOselectValues - the values to select onpublic void setTable(String table)
BrowseDAO
setTable in interface BrowseDAOtable - the name of the table
public void setFilterMappingTables(String tableDis,
String tableMap)
BrowseDAO
setFilterMappingTables in interface BrowseDAOtableDis - the name of the table holding the distinct valuestableMap - the name of the table holding the mappingspublic void setFilterValue(String value)
BrowseDAO
setFilterValue in interface BrowseDAOvalue - the value to which to constrain resultspublic void setFilterValuePartial(boolean part)
BrowseDAO
setFilterValuePartial in interface BrowseDAOpart - true if partial, false if exactpublic void setFilterValueField(String valueField)
BrowseDAO
setFilterValueField in interface BrowseDAOvalueField - the name of the fieldpublic boolean useEqualsComparator()
BrowseDAO
useEqualsComparator in interface BrowseDAO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||