Esri Geoportal Server
1.2.9

com.esri.gpt.catalog.management
Class CollectionDao

java.lang.Object
  extended by com.esri.gpt.framework.sql.BaseDao
      extended by com.esri.gpt.catalog.management.CollectionDao

public class CollectionDao
extends BaseDao

Database access object associated with item collections.


Constructor Summary
CollectionDao(RequestContext requestContext)
          Constructs with an associated request context.
 
Method Summary
 int addMembers(Publisher publisher, MmdQueryCriteria criteria, String colUuid)
           
 int addMembers(Publisher publisher, StringSet docUuids, String colUuid)
          Adds a set of document UUIDS to a collection.
 String getCollectionMemberTableName()
          Gets the collection member table name.
 String getCollectionTableName()
          Gets the collection table name.
 String getTablePrefix()
          Gets the table prefix.
 boolean getUseCollections()
          Determine if collections are in use.
 List<String[]> queryCollections()
          Queries named collections.
 int removeMembers(Publisher publisher, MmdQueryCriteria criteria, String colUuid)
           
 int removeMembers(Publisher publisher, StringSet docUuids, String colUuid)
          Removes a set of document UUIDS from a collection.
 
Methods inherited from class com.esri.gpt.framework.sql.BaseDao
appendExpression, appendValueFilter, closeResultSet, closeStatement, getApplicationConfiguration, getIsDbCaseSensitive, getRequestContext, logExpression, returnConnection, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionDao

public CollectionDao(RequestContext requestContext)
Constructs with an associated request context.

Parameters:
requestContext - the request context
Method Detail

getCollectionTableName

public String getCollectionTableName()
Gets the collection table name.

Returns:
the collection table name

getCollectionMemberTableName

public String getCollectionMemberTableName()
Gets the collection member table name.

Returns:
the collection member table name

getTablePrefix

public String getTablePrefix()
Gets the table prefix.

Returns:
the table prefix

getUseCollections

public boolean getUseCollections()
Determine if collections are in use.

Returns:
true if collections are in use

addMembers

public int addMembers(Publisher publisher,
                      StringSet docUuids,
                      String colUuid)
               throws SQLException,
                      CatalogIndexException
Adds a set of document UUIDS to a collection.

Parameters:
docUuids - the set of document UUIDS
colUuid - the collection UUID
Returns:
the number of records inserted
Throws:
SQLException - if an exception occurs while communicating with the database
CatalogIndexException - is an exception occurs while writing to the index

addMembers

public int addMembers(Publisher publisher,
                      MmdQueryCriteria criteria,
                      String colUuid)
               throws SQLException,
                      CatalogIndexException
Throws:
SQLException
CatalogIndexException

queryCollections

public List<String[]> queryCollections()
                                throws SQLException
Queries named collections.

Returns:
the list {colUuid,shortName}
Throws:
SQLException - if an exception occurs while communicating with the database

removeMembers

public int removeMembers(Publisher publisher,
                         StringSet docUuids,
                         String colUuid)
                  throws SQLException,
                         CatalogIndexException
Removes a set of document UUIDS from a collection.

Parameters:
docUuids - the set of document UUIDS
colUuid - the collection UUID
Returns:
the number of records removed
Throws:
SQLException - if an exception occurs while communicating with the database
CatalogIndexException - is an exception occurs while writing to the index

removeMembers

public int removeMembers(Publisher publisher,
                         MmdQueryCriteria criteria,
                         String colUuid)
                  throws SQLException,
                         CatalogIndexException
Throws:
SQLException
CatalogIndexException

Esri Geoportal Server
1.2.9

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