org.LexGrid.LexBIG.caCore.applicationservice.impl
Class LexEVSApplicationServiceImpl

java.lang.Object
  extended by gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
      extended by org.LexGrid.LexBIG.caCore.applicationservice.impl.LexEVSApplicationServiceImpl
All Implemented Interfaces:
gov.nih.nci.system.applicationservice.ApplicationService, Serializable, LexEVSApplicationService, LexEVSDataService, LexEVSDistributed, LexEVSService, org.LexGrid.LexBIG.caCore.security.interfaces.TokenSecurableApplicationService, org.LexGrid.LexBIG.LexBIGService.LexBIGService

public class LexEVSApplicationServiceImpl
extends gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
implements LexEVSApplicationService

Main implementation class of LexEVSAPI. This class implements but the DataService and the Distributed portions of the LexEVSAPI.

Author:
Kevin Peterson
See Also:
Serialized Form

Field Summary
protected  org.springframework.context.ApplicationContext appContext
           
private  LexEVSClassCache classCache
           
private static Class DATA_SERVICE_TOKEN_REQUIRED
          Annotation to indicate that this Data Service method requires a Security Token
private  GridCQLToDetachedCriteria gridCQLToDetachedCriteriaTranslator
           
private  org.LexGrid.LexBIG.LexBIGService.LexBIGService lbs
          The lbs.
private static org.apache.log4j.Logger log
           
private  NestedObjectToCriteria nestedObjectToCriteriaTranslator
           
private  PaginationHelper paginationHelper
           
private  QBEPathToDetachedCriteria qbePathToDetachedCriteriaTranslator
           
private  SDKCQLToDetachedCriteria sdkCQLToDetachedCriteriaTranslator
           
private static Class TOKEN_REQUIRED
          Annotation class used to mark LexBig classes and methods as requiring security token for execution on a client without the LexBig environment.
private  org.LexGrid.LexBIG.caCore.security.Validator validator
           
 
Constructor Summary
LexEVSApplicationServiceImpl(LexEVSClassCache classCache, org.LexGrid.LexBIG.caCore.security.Validator validator)
           
LexEVSApplicationServiceImpl(org.LexGrid.LexBIG.caCore.security.Validator validator)
           
 
Method Summary
protected
<E> List<E>
convertToListProxy(Collection originalList, Object query, String classname, Integer start, QueryOptions options)
           
 RemoteExecutionResults executeRemotely(Object object, String methodName, String[] parameterClasses, Object[] args)
          Execute the given method on the specified LexBig object.
 Object executeSecurely(String methodName, Annotation[] annotations, String[] parameterClasses, Object[] args, HashMap tokens)
          Execute securely.
 List<Object> getAssociation(Object source, String associationName)
           
 List<Object> getAssociation(Object source, String associationName, QueryOptions queryOptions)
          Retrieves an associated object for the example object specified by the source parameter.
protected  LexEVSClassCache getClassCache()
           
 org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getCodingSchemeConcepts(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
           
 org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getCodingSchemeConcepts(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag, boolean activeOnly)
          Deprecated. Not implemented here since it is deprecated in the LexBIGService interface.
protected  gov.nih.nci.system.dao.DAO getDAO(String classname)
           
private  List<LexEVSDAO> getDOAListForQuery(gov.nih.nci.system.dao.Request request, QueryOptions queryOptions)
           
 org.LexGrid.LexBIG.Extensions.Query.Filter getFilter(String name)
           
 org.LexGrid.LexBIG.DataModel.Collections.ExtensionDescriptionList getFilterExtensions()
           
 org.LexGrid.LexBIG.Extensions.Generic.GenericExtension getGenericExtension(String name)
           
 org.LexGrid.LexBIG.DataModel.Collections.ExtensionDescriptionList getGenericExtensions()
           
 GridCQLToDetachedCriteria getGridCQLToDetachedCriteriaTranslator()
           
 org.LexGrid.LexBIG.History.HistoryService getHistoryService(String codingScheme)
           
 Date getLastUpdateTime()
           
 org.LexGrid.LexBIG.DataModel.Collections.ModuleDescriptionList getMatchAlgorithms()
           
 NestedObjectToCriteria getNestedObjectToCriteriaTranslator()
           
 org.LexGrid.LexBIG.LexBIGService.CodedNodeGraph getNodeGraph(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag, String relationsName)
           
 org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getNodeSet(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag, org.LexGrid.LexBIG.DataModel.Collections.LocalNameList localNameList)
           
 PaginationHelper getPaginationHelper()
           
 QBEPathToDetachedCriteria getQbePathToDetachedCriteriaTranslator()
           
 Integer getQueryRowCount(Object criteria, String targetClassName)
           
 Integer getQueryRowCount(Object criteria, String targetClassName, QueryOptions queryOptions)
          Returns the number of records that meet the search criteria.
 SDKCQLToDetachedCriteria getSdkCQLToDetachedCriteriaTranslator()
           
 org.LexGrid.LexBIG.LexBIGService.LexBIGServiceManager getServiceManager(Object credentials)
           
 org.LexGrid.LexBIG.LexBIGService.LexBIGServiceMetadata getServiceMetadata()
           
 org.LexGrid.LexBIG.Extensions.Query.Sort getSortAlgorithm(String name)
           
 org.LexGrid.LexBIG.DataModel.Collections.SortDescriptionList getSortAlgorithms(org.LexGrid.LexBIG.DataModel.InterfaceElements.types.SortContext context)
           
 org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList getSupportedCodingSchemes()
           
private  int isMethodArgumentSecured(Method object)
          Returns true if the given method or class is marked TOKEN_REQUIRED.
private  boolean isMethodDataServiceSecured(Object object)
          Returns true if the given method or class is marked TOKEN_REQUIRED.
private  boolean isMethodSecured(Object object)
          Returns true if the given method or class is marked TOKEN_REQUIRED.
protected
<E> List<E>
privateQuery(Object criteria, String targetClassName, QueryOptions queryOptions)
           
<E> List<E>
query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery)
           
<E> List<E>
query(gov.nih.nci.cagrid.cqlquery.CQLQuery cqlQuery)
           
<E> List<E>
query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery, QueryOptions queryOptions)
          Retrieves the result from the data source using the CQL query.
<E> List<E>
query(gov.nih.nci.cagrid.cqlquery.CQLQuery cqlQuery, QueryOptions queryOptions)
          Retrieves the result from the data source using the caGrid's CQL query.
<E> List<E>
query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery, String targetClassName)
           
<E> List<E>
query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery, String targetClassName, QueryOptions queryOptions)
          Retrieves the result from the data source using the CQL query.
<E> List<E>
query(org.hibernate.criterion.DetachedCriteria detachedCriteria)
           
<E> List<E>
query(org.hibernate.criterion.DetachedCriteria detachedCriteria, QueryOptions queryOptions)
          Retrieves the result from the data source using the DetachedCriteria query.
<E> List<E>
query(org.hibernate.criterion.DetachedCriteria detachedCriteria, String targetClassName)
           
<E> List<E>
query(org.hibernate.criterion.DetachedCriteria detachedCriteria, String targetClassName, QueryOptions queryOptions)
          Retrieves the result from the data source using the DetachedCriteria query.
<E> List<E>
query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria)
           
<E> List<E>
query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria, QueryOptions queryOptions)
          Retrieves the result from the data source using the HQL query.
<E> List<E>
query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria, String targetClassName)
           
<E> List<E>
query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria, String targetClassName, QueryOptions queryOptions)
          Retrieves the result from the data source using the HQL query.
<E> List<E>
query(Object criteria, Integer firstRow, String targetClassName)
           
<E> List<E>
query(Object criteria, Integer firstRow, String targetClassName, QueryOptions queryOptions)
          Used by the infrastructure to get next chunk of records in the result set.
protected  gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request, LexEVSDAO dao)
           
protected  gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request, LexEVSDAO dao, boolean lazyLoad, int resultPageSize)
           
protected  gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request, QueryOptions options)
           
 Boolean registerSecurityToken(String vocabulary, gov.nih.nci.evs.security.SecurityToken token)
          Register Security Token
 org.LexGrid.codingSchemes.CodingScheme resolveCodingScheme(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
           
 String resolveCodingSchemeCopyright(String codingScheme, org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
           
<E> List<E>
search(Class targetClass, List objList)
           
<E> List<E>
search(Class targetClass, List objList, QueryOptions queryOptions)
          Retrieves the result from the data source using the Query by Example.
<E> List<E>
search(Class targetClass, Object obj)
           
<E> List<E>
search(Class targetClass, Object obj, QueryOptions queryOptions)
          Retrieves the result from the data source using the Query by Example.
<E> List<E>
search(Class targetClass, Object obj, String eagerFetchAssociation, QueryOptions queryOptions)
           
<E> List<E>
search(String path, List objList)
           
<E> List<E>
search(String path, List objList, QueryOptions queryOptions)
          Retrieves the result from the data source using a Nested Search Criteria.
<E> List<E>
search(String path, Object obj)
           
<E> List<E>
search(String path, Object obj, QueryOptions queryOptions)
          Retrieves the result from the data source using the Nested Search Criteria.
 void setGridCQLToDetachedCriteriaTranslator(GridCQLToDetachedCriteria gridCQLToDetachedCriteriaTranslator)
           
 void setNestedObjectToCriteriaTranslator(NestedObjectToCriteria nestedObjectToCriteriaTranslator)
           
 void setPaginationHelper(PaginationHelper paginationHelper)
           
 void setQbePathToDetachedCriteriaTranslator(QBEPathToDetachedCriteria qbePathToDetachedCriteriaTranslator)
           
 void setSdkCQLToDetachedCriteriaTranslator(SDKCQLToDetachedCriteria sdkCQLToDetachedCriteriaTranslator)
           
 
Methods inherited from class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
convertToListProxy, getMaxRecordsCount, privateQuery, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nih.nci.system.applicationservice.ApplicationService
getMaxRecordsCount
 

Field Detail

classCache

private LexEVSClassCache classCache

log

private static org.apache.log4j.Logger log

appContext

protected org.springframework.context.ApplicationContext appContext

validator

private org.LexGrid.LexBIG.caCore.security.Validator validator

lbs

private final org.LexGrid.LexBIG.LexBIGService.LexBIGService lbs
The lbs.


nestedObjectToCriteriaTranslator

private NestedObjectToCriteria nestedObjectToCriteriaTranslator

gridCQLToDetachedCriteriaTranslator

private GridCQLToDetachedCriteria gridCQLToDetachedCriteriaTranslator

qbePathToDetachedCriteriaTranslator

private QBEPathToDetachedCriteria qbePathToDetachedCriteriaTranslator

sdkCQLToDetachedCriteriaTranslator

private SDKCQLToDetachedCriteria sdkCQLToDetachedCriteriaTranslator

paginationHelper

private PaginationHelper paginationHelper

TOKEN_REQUIRED

private static final Class TOKEN_REQUIRED
Annotation class used to mark LexBig classes and methods as requiring security token for execution on a client without the LexBig environment.


DATA_SERVICE_TOKEN_REQUIRED

private static final Class DATA_SERVICE_TOKEN_REQUIRED
Annotation to indicate that this Data Service method requires a Security Token

Constructor Detail

LexEVSApplicationServiceImpl

public LexEVSApplicationServiceImpl(LexEVSClassCache classCache,
                                    org.LexGrid.LexBIG.caCore.security.Validator validator)
                             throws gov.nih.nci.system.applicationservice.ApplicationException
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

LexEVSApplicationServiceImpl

public LexEVSApplicationServiceImpl(org.LexGrid.LexBIG.caCore.security.Validator validator)
                             throws gov.nih.nci.system.applicationservice.ApplicationException
Throws:
gov.nih.nci.system.applicationservice.ApplicationException
Method Detail

executeRemotely

public RemoteExecutionResults executeRemotely(Object object,
                                              String methodName,
                                              String[] parameterClasses,
                                              Object[] args)
                                       throws gov.nih.nci.system.applicationservice.ApplicationException
Execute the given method on the specified LexBig object.

Specified by:
executeRemotely in interface LexEVSApplicationService
Parameters:
object - - Object
methodName - - String
parameterClasses - -String[]
args - - Object[]
Returns:
the object
Throws:
gov.nih.nci.system.applicationservice.ApplicationException - the application exception

executeSecurely

public Object executeSecurely(String methodName,
                              Annotation[] annotations,
                              String[] parameterClasses,
                              Object[] args,
                              HashMap tokens)
                       throws Exception
Execute securely. (Note: currently the annotations parameter is used only on the client side)

Specified by:
executeSecurely in interface LexEVSApplicationService
Parameters:
object - the object
methodName - the method name
annotations - annotations used by this method
parameterClasses - the parameter classes
args - the args
Returns:
the object
Throws:
Exception - the exception

isMethodSecured

private boolean isMethodSecured(Object object)
Returns true if the given method or class is marked TOKEN_REQUIRED.

Parameters:
object - the object
Returns:
true, if checks if is client safe

isMethodDataServiceSecured

private boolean isMethodDataServiceSecured(Object object)
Returns true if the given method or class is marked TOKEN_REQUIRED.

Parameters:
object - the object
Returns:
true, if checks if is client safe

isMethodArgumentSecured

private int isMethodArgumentSecured(Method object)
Returns true if the given method or class is marked TOKEN_REQUIRED.

Parameters:
object - the object
Returns:
true, if checks if is client safe

registerSecurityToken

public Boolean registerSecurityToken(String vocabulary,
                                     gov.nih.nci.evs.security.SecurityToken token)
                              throws Exception
Register Security Token

Specified by:
registerSecurityToken in interface org.LexGrid.LexBIG.caCore.security.interfaces.TokenSecurableApplicationService
Parameters:
vocabulary - the String
token - the SecurityToken
Returns:
boolean the Boolean
Throws:
Exception - the exception

getAssociation

public List<Object> getAssociation(Object source,
                                   String associationName,
                                   QueryOptions queryOptions)
                            throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves an associated object for the example object specified by the source parameter.

Specified by:
getAssociation in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

getAssociation

public List<Object> getAssociation(Object source,
                                   String associationName)
                            throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
getAssociation in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
getAssociation in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(Class targetClass,
                          Object obj,
                          String eagerFetchAssociation,
                          QueryOptions queryOptions)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(Class targetClass,
                          Object obj)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
search in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
search in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(Class targetClass,
                          Object obj,
                          QueryOptions queryOptions)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the Query by Example. The targetClass specifies the object that the user intends to fetch after executing the query. The targetClass should be same as the example object or associated object for the example object. The example query is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the example query structure is converted in the Hibernate Query Language (HQL). Hibernate converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
search in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(Class targetClass,
                          List objList)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
search in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
search in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(Class targetClass,
                          List objList,
                          QueryOptions queryOptions)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the Query by Example. The targetClass specifies the object that the user intends to fetch after executing the query. The targetClass should be same as the object specified in the objList or associated object for the example object. Also, all the objects in the objList has to be of the same type. The example query is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the example query structure is converted in the Hibernate Query Language (HQL). Hibernate converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
search in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(String path,
                          Object obj,
                          QueryOptions queryOptions)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the Nested Search Criteria. The path specifies the list of objects (separated by commas) which should be used to reach the target object from the example object passed as obj, or the associated object for the example object. Internally, the Nested Search Criteria is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the query structure is first converted into the Hibernate Query Language (HQL). Hibernate then converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
search in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(String path,
                          Object obj)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
search in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
search in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery,
                         String targetClassName,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the CQL query. The CQL query structure is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the CQL query structure is converted in the Hibernate Query Language (HQL). Hibernate converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount(). Note: The targetClassName parameter will not be interpreted by the system. This parameter will be determined from the CQLQuery.

Specified by:
query in interface LexEVSDataService
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException
See Also:
#query(CQLQuery)}

query

public <E> List<E> query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery,
                         String targetClassName)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the CQL query. The CQL query structure is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the CQL query structure is converted in the Hibernate Query Language (HQL). Hibernate converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.cql.CQLQuery cqlQuery)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.cagrid.cqlquery.CQLQuery cqlQuery)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.cagrid.cqlquery.CQLQuery cqlQuery,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the caGrid's CQL query. The CQL query structure is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the CQL query structure is converted in the Hibernate Query Language (HQL). Hibernate converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(org.hibernate.criterion.DetachedCriteria detachedCriteria,
                         String targetClassName)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(org.hibernate.criterion.DetachedCriteria detachedCriteria,
                         String targetClassName,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the DetachedCriteria query. The DetachedCriteria query structure can be used only by the Object Relational Mapping based persistence tier. Hibernate executes it against the relational database and fetches the results. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount(). Note: The targetClassName parameter will not be interpreted by the system. This parameter will be determined from the DetachedCriteria object.

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException
See Also:
#query(DetachedCriteria)}

query

public <E> List<E> query(org.hibernate.criterion.DetachedCriteria detachedCriteria)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(org.hibernate.criterion.DetachedCriteria detachedCriteria,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the DetachedCriteria query. The DetachedCriteria query structure can be used only by the Object Relational Mapping based persistence tier. Hibernate executes it against the relational database and fetches the results. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria,
                         String targetClassName)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria,
                         String targetClassName,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the HQL query. The HQL query structure can be used only by the Object Relational Mapping based persistence tier. Hibernate executes hql query against the relational database and fetches the results. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount(). Note: The targetClassName parameter will not be interpreted by the system. This parameter will be determined from the hql query.

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException
See Also:
#query(HQLCriteria)}

query

public <E> List<E> query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(gov.nih.nci.system.query.hibernate.HQLCriteria hqlCriteria,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using the HQL query. The HQL query structure can be used only by the Object Relational Mapping based persistence tier. Hibernate executes hql query against the relational database and fetches the results. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
query in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(Object criteria,
                         Integer firstRow,
                         String targetClassName)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
query in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
query in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

public <E> List<E> query(Object criteria,
                         Integer firstRow,
                         String targetClassName,
                         QueryOptions queryOptions)
              throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Used by the infrastructure to get next chunk of records in the result set. Use this method in conjunction with the ApplicationService.getMaxRecordsCount() to determine what should be the start of next chunk.

Specified by:
query in interface LexEVSDataService
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(String path,
                          List objList)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
search in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
search in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

search

public <E> List<E> search(String path,
                          List objList,
                          QueryOptions queryOptions)
               throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Retrieves the result from the data source using a Nested Search Criteria. The path specifies the list of objects (separated by commas), which should be used to reach the target object from the example objects passed in the objList or associated object for the example object. The Nested Search Criteria is converted into the data source specific query language. For the Object Relational Mapping based persistence tier, the query structure is first converted into the Hibernate Query Language (HQL). Hibernate then converts the HQL into SQL and executes it against the relational database. The retrieved results are converted into a list which may not be completely loaded. If the retrieved results are more than the maximum number of supported records as indicated by ApplicationService.getMaxRecordsCount() then the result set will be partially loaded. The client framework will execute a subsequent query (transparent to the client application) against the ApplicationService to load the remaining results in the chunk no greater than value specified by ApplicationService.getMaxRecordsCount().

Specified by:
search in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

getQueryRowCount

public Integer getQueryRowCount(Object criteria,
                                String targetClassName)
                         throws gov.nih.nci.system.applicationservice.ApplicationException
Specified by:
getQueryRowCount in interface gov.nih.nci.system.applicationservice.ApplicationService
Overrides:
getQueryRowCount in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

getQueryRowCount

public Integer getQueryRowCount(Object criteria,
                                String targetClassName,
                                QueryOptions queryOptions)
                         throws gov.nih.nci.system.applicationservice.ApplicationException
Description copied from interface: LexEVSDataService
Returns the number of records that meet the search criteria. The method is used by the client framework to determine the number of chunk of results. Use this method in conjunction with the ApplicationService.getMaxRecordsCount()

Specified by:
getQueryRowCount in interface LexEVSDataService
queryOptions - Specific Options to be used while processing this query.
Returns:
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

convertToListProxy

protected <E> List<E> convertToListProxy(Collection originalList,
                                         Object query,
                                         String classname,
                                         Integer start,
                                         QueryOptions options)

privateQuery

protected <E> List<E> privateQuery(Object criteria,
                                   String targetClassName,
                                   QueryOptions queryOptions)
                        throws gov.nih.nci.system.applicationservice.ApplicationException
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

query

protected gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request,
                                                QueryOptions options)
                                         throws gov.nih.nci.system.applicationservice.ApplicationException
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

getDOAListForQuery

private List<LexEVSDAO> getDOAListForQuery(gov.nih.nci.system.dao.Request request,
                                           QueryOptions queryOptions)
                                    throws SelectionStrategyException
Throws:
SelectionStrategyException

query

protected gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request,
                                                LexEVSDAO dao)
                                         throws Exception
Throws:
Exception

query

protected gov.nih.nci.system.dao.Response query(gov.nih.nci.system.dao.Request request,
                                                LexEVSDAO dao,
                                                boolean lazyLoad,
                                                int resultPageSize)
                                         throws Exception
Throws:
Exception

getCodingSchemeConcepts

@Deprecated
public org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getCodingSchemeConcepts(String codingScheme,
                                                                                        org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag,
                                                                                        boolean activeOnly)
                                                                      throws org.LexGrid.LexBIG.Exceptions.LBException
Deprecated. Not implemented here since it is deprecated in the LexBIGService interface.

Gets the coding scheme concepts.

Specified by:
getCodingSchemeConcepts in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Parameters:
codingScheme - the coding scheme String
versionOrTag - the version or tag String
activeOnly - the active only boolean
Returns:
the coding scheme concepts as a CodedNodeSet
Throws:
org.LexGrid.LexBIG.Exceptions.LBException - the LB exception

getCodingSchemeConcepts

public org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getCodingSchemeConcepts(String codingScheme,
                                                                             org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
                                                                      throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getCodingSchemeConcepts in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getFilter

public org.LexGrid.LexBIG.Extensions.Query.Filter getFilter(String name)
                                                     throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getFilter in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getFilterExtensions

public org.LexGrid.LexBIG.DataModel.Collections.ExtensionDescriptionList getFilterExtensions()
Specified by:
getFilterExtensions in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService

getGenericExtension

public org.LexGrid.LexBIG.Extensions.Generic.GenericExtension getGenericExtension(String name)
                                                                           throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getGenericExtension in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getGenericExtensions

public org.LexGrid.LexBIG.DataModel.Collections.ExtensionDescriptionList getGenericExtensions()
Specified by:
getGenericExtensions in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService

getHistoryService

public org.LexGrid.LexBIG.History.HistoryService getHistoryService(String codingScheme)
                                                            throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getHistoryService in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getLastUpdateTime

public Date getLastUpdateTime()
                       throws org.LexGrid.LexBIG.Exceptions.LBInvocationException
Specified by:
getLastUpdateTime in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBInvocationException

getMatchAlgorithms

public org.LexGrid.LexBIG.DataModel.Collections.ModuleDescriptionList getMatchAlgorithms()
Specified by:
getMatchAlgorithms in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService

getNodeGraph

public org.LexGrid.LexBIG.LexBIGService.CodedNodeGraph getNodeGraph(String codingScheme,
                                                                    org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag,
                                                                    String relationsName)
                                                             throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getNodeGraph in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getServiceManager

public org.LexGrid.LexBIG.LexBIGService.LexBIGServiceManager getServiceManager(Object credentials)
                                                                        throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getServiceManager in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getServiceMetadata

public org.LexGrid.LexBIG.LexBIGService.LexBIGServiceMetadata getServiceMetadata()
                                                                          throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getServiceMetadata in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getSortAlgorithm

public org.LexGrid.LexBIG.Extensions.Query.Sort getSortAlgorithm(String name)
                                                          throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getSortAlgorithm in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getSortAlgorithms

public org.LexGrid.LexBIG.DataModel.Collections.SortDescriptionList getSortAlgorithms(org.LexGrid.LexBIG.DataModel.InterfaceElements.types.SortContext context)
Specified by:
getSortAlgorithms in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService

getSupportedCodingSchemes

public org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList getSupportedCodingSchemes()
                                                                                             throws org.LexGrid.LexBIG.Exceptions.LBInvocationException
Specified by:
getSupportedCodingSchemes in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBInvocationException

resolveCodingScheme

public org.LexGrid.codingSchemes.CodingScheme resolveCodingScheme(String codingScheme,
                                                                  org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
                                                           throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
resolveCodingScheme in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

resolveCodingSchemeCopyright

public String resolveCodingSchemeCopyright(String codingScheme,
                                           org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag)
                                    throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
resolveCodingSchemeCopyright in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getNodeSet

public org.LexGrid.LexBIG.LexBIGService.CodedNodeSet getNodeSet(String codingScheme,
                                                                org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag versionOrTag,
                                                                org.LexGrid.LexBIG.DataModel.Collections.LocalNameList localNameList)
                                                         throws org.LexGrid.LexBIG.Exceptions.LBException
Specified by:
getNodeSet in interface org.LexGrid.LexBIG.LexBIGService.LexBIGService
Throws:
org.LexGrid.LexBIG.Exceptions.LBException

getClassCache

protected LexEVSClassCache getClassCache()
Overrides:
getClassCache in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl

getDAO

protected gov.nih.nci.system.dao.DAO getDAO(String classname)
                                     throws gov.nih.nci.system.applicationservice.ApplicationException
Overrides:
getDAO in class gov.nih.nci.system.applicationservice.impl.ApplicationServiceImpl
Throws:
gov.nih.nci.system.applicationservice.ApplicationException

getNestedObjectToCriteriaTranslator

public NestedObjectToCriteria getNestedObjectToCriteriaTranslator()

setNestedObjectToCriteriaTranslator

public void setNestedObjectToCriteriaTranslator(NestedObjectToCriteria nestedObjectToCriteriaTranslator)

getGridCQLToDetachedCriteriaTranslator

public GridCQLToDetachedCriteria getGridCQLToDetachedCriteriaTranslator()

setGridCQLToDetachedCriteriaTranslator

public void setGridCQLToDetachedCriteriaTranslator(GridCQLToDetachedCriteria gridCQLToDetachedCriteriaTranslator)

getQbePathToDetachedCriteriaTranslator

public QBEPathToDetachedCriteria getQbePathToDetachedCriteriaTranslator()

setQbePathToDetachedCriteriaTranslator

public void setQbePathToDetachedCriteriaTranslator(QBEPathToDetachedCriteria qbePathToDetachedCriteriaTranslator)

getSdkCQLToDetachedCriteriaTranslator

public SDKCQLToDetachedCriteria getSdkCQLToDetachedCriteriaTranslator()

setSdkCQLToDetachedCriteriaTranslator

public void setSdkCQLToDetachedCriteriaTranslator(SDKCQLToDetachedCriteria sdkCQLToDetachedCriteriaTranslator)

getPaginationHelper

public PaginationHelper getPaginationHelper()

setPaginationHelper

public void setPaginationHelper(PaginationHelper paginationHelper)