ArcGIS Server Geoportal extension
10

com.esri.gpt.catalog.management
Class MmdQueryCriteria

java.lang.Object
  extended by com.esri.gpt.framework.request.Criteria
      extended by com.esri.gpt.framework.request.QueryCriteria
          extended by com.esri.gpt.catalog.management.MmdQueryCriteria
All Implemented Interfaces:
Serializable

public class MmdQueryCriteria
extends QueryCriteria

Maintains the query criteria for a manage metadata request.

See Also:
Serialized Form

Constructor Summary
MmdQueryCriteria()
          Default constructor.
 
Method Summary
protected  void appendExpression(StringBuilder whereClause, String expression)
          Appends an expression to an SQL where clause.
protected  String appendValueFilter(StringBuilder whereClause, String field, String value, boolean forceLike)
          Appends a value filter to an SQL where clause.
 Map<String,Object> appendWherePhrase(String tableAlias, StringBuilder wherePhrase, Publisher publisher)
          Appends WHERE phrase.
 void applyArgs(PreparedStatement st, int n, Map<String,Object> args)
          Applies arguments to the statement.
 String getApprovalStatus()
          Gets the approval status.
 String getContentAsEncryptedString()
          Gets content as encrypted string.
 String getContentAsXml()
          Gets query criteria as XML string.
 DateRange getDateRange()
          Gets the date range.
 boolean getIsEmpty()
          Checks if query criteria are empty.
 String getOwner()
          Gets the document owner.
 String getProtocolType()
          Gets protocol type.
 String getPublicationMethod()
          Gets the publication method.
 String getSiteUuid()
          Gets site UUID.
 String getTitle()
          Gets the document title.
 String getUuid()
          Gets the document UUID.
 void reset()
          Resets criteria.
 void setApprovalStatus(String status)
          Sets the approval status.
 void setContentAsEncryptedString(String content)
          Sets content as encrypted string.
 void setContentAsXml(String content)
          Sets query criteria from XML string.
 void setOwner(String owner)
          Sets the document owner.
 void setProtocolType(String protocolType)
          Sets protocol type.
 void setPublicationMethod(String method)
          Sets the publication method.
 void setSiteUuid(String siteUuid)
          Sets site UUID.
 void setTitle(String title)
          Sets the document title.
 void setUuid(String uuid)
          Sets the document UUID.
 
Methods inherited from class com.esri.gpt.framework.request.QueryCriteria
getSortOption, setSortOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MmdQueryCriteria

public MmdQueryCriteria()
Default constructor.

Method Detail

getIsEmpty

public boolean getIsEmpty()
Checks if query criteria are empty.

Returns:
true if query criteria are empty
Since:
10.0

getContentAsXml

public String getContentAsXml()
Gets query criteria as XML string.

Returns:
query criteria as XML string
Since:
10.0

setContentAsXml

public void setContentAsXml(String content)
Sets query criteria from XML string.

Parameters:
content - query criteria from XML string
Since:
10.0

getContentAsEncryptedString

public String getContentAsEncryptedString()
Gets content as encrypted string.

Returns:
content as encrypted string
Since:
10.0

setContentAsEncryptedString

public void setContentAsEncryptedString(String content)
Sets content as encrypted string.

Parameters:
content - content as encrypted string
Since:
10.0

reset

public void reset()
Resets criteria.

Overrides:
reset in class QueryCriteria
Since:
10.0

getApprovalStatus

public String getApprovalStatus()
Gets the approval status.

Returns:
the approval status

setApprovalStatus

public void setApprovalStatus(String status)
Sets the approval status.

Parameters:
status - the approval status

getDateRange

public DateRange getDateRange()
Gets the date range.

Returns:
the date range

getOwner

public String getOwner()
Gets the document owner.

Returns:
the document owner

setOwner

public void setOwner(String owner)
Sets the document owner.

Parameters:
owner - the document owner

getPublicationMethod

public String getPublicationMethod()
Gets the publication method.

Returns:
the publication method

setPublicationMethod

public void setPublicationMethod(String method)
Sets the publication method.

Parameters:
method - the publication method

getTitle

public String getTitle()
Gets the document title.

Returns:
the document title

setTitle

public void setTitle(String title)
Sets the document title.

Parameters:
title - the document title

getUuid

public String getUuid()
Gets the document UUID.

Returns:
the document UUID

setUuid

public void setUuid(String uuid)
Sets the document UUID.

Parameters:
uuid - the document UUID

getSiteUuid

public String getSiteUuid()
Gets site UUID.

Returns:
site UUID
Since:
10.0

setSiteUuid

public void setSiteUuid(String siteUuid)
Sets site UUID.

Parameters:
siteUuid - site UUID
Since:
10.0

getProtocolType

public String getProtocolType()
Gets protocol type.

Returns:
protocol type
Since:
10.0

setProtocolType

public void setProtocolType(String protocolType)
Sets protocol type.

Parameters:
protocolType - protocol type
Since:
10.0

appendWherePhrase

public Map<String,Object> appendWherePhrase(String tableAlias,
                                            StringBuilder wherePhrase,
                                            Publisher publisher)
Appends WHERE phrase.

Parameters:
tableAlias - alias of the table or null if no alias
wherePhrase - where phrase holder where the phrase will be appended
publisher - publisher which executes query
Returns:
map of arguments to apply to the statement through applyArgs(java.sql.PreparedStatement, int, java.util.Map) method
Since:
10.0

applyArgs

public void applyArgs(PreparedStatement st,
                      int n,
                      Map<String,Object> args)
               throws SQLException
Applies arguments to the statement.

Parameters:
st - statement to apply arguments
n - initial index of the first argument
args - map of arguments obtained through appendWherePhrase(java.lang.String, java.lang.StringBuilder, com.esri.gpt.framework.security.principal.Publisher) method
Throws:
SQLException - if arguments application fails
Since:
10.0

appendValueFilter

protected String appendValueFilter(StringBuilder whereClause,
                                   String field,
                                   String value,
                                   boolean forceLike)
Appends a value filter to an SQL where clause.

This is intended for use within a PreparedStatement. The appended filter will have the following forms:
field = ?
field LIKE ?

The value returned should be bound within the PreparedStatement:
preparedStatement.setString(n,value)

Parameters:
whereClause - the where clause
field - the field
value - the field value
forceLike - if true force an SQL LIKE
Returns:
the value - possible modified for LIKE (ie. "%"+value+"%")

appendExpression

protected void appendExpression(StringBuilder whereClause,
                                String expression)
Appends an expression to an SQL where clause.

Parameters:
whereClause - the where clause
expression - the expression

ArcGIS Server Geoportal extension
10

Copyright 2010 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.