de.iai.ilcd.model.dao
Class FlowDao

java.lang.Object
  extended by de.iai.ilcd.model.dao.DataSetDao<Flow,de.fzk.iai.ilcd.service.model.IFlowListVO>
      extended by de.iai.ilcd.model.dao.FlowDao

public class FlowDao
extends DataSetDao<Flow,de.fzk.iai.ilcd.service.model.IFlowListVO>

Data access object for flows


Constructor Summary
FlowDao()
           
 
Method Summary
protected  javax.persistence.Query createQueryObject(org.apache.velocity.tools.generic.ValueParser params, java.lang.String sortString, boolean ascending, boolean returnCount)
          This method must be implemented by each dao class extending this class.
 Flow getByUuid(java.lang.String uuid)
          Get a flow by UUID.
 Flow getFlow(long datasetId)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(long).
 Flow getFlow(java.lang.String uuid)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use getByUuid(String).
 Flow getFlowById(java.lang.Long id)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(long).
 Flow getFlowById(java.lang.String id)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(String).
 java.util.List<Flow> getFlows(int maxFlows)
          Get flows with maximum limit of result items
 java.util.List<Flow> getFlowsByCategory(java.lang.String mainClass)
           
 java.util.List<Flow> getFlowsByCategory(java.lang.String mainClass, java.lang.String subClass)
           
 java.util.List<Flow> getFlowsByClass(java.lang.String mainClass)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String).
 java.util.List<Flow> getFlowsByClass(java.lang.String mainClass, java.lang.String subClass)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String,String).
 java.util.List<Flow> getFlowsBySubCategories(java.lang.String subClass, java.lang.String subClass2)
           
 long getNumberOfFlowsInCategory(java.lang.String mainClass)
           
 long getNumberOfFlowsInCategory(java.lang.String mainClass, java.lang.String subClass)
           
 long getNumberOfFlowsInClass(java.lang.String mainClass)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String).
 long getNumberOfFlowsInClass(java.lang.String mainClass, java.lang.String subClass)
          Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String,String).
 java.util.List<java.lang.String> getSubCategories(java.lang.String className, java.lang.String level)
           
 java.util.List<java.lang.String> getTopCategories()
           
 java.util.List<java.lang.String> getTopClasses2()
           
protected  void preCheckAndPersist(Flow dataSet)
          Invoked at beginning of DataSetDao.checkAndPersist(DataSet, PersistType, PrintWriter) to manipulate data prior to persisting
 
Methods inherited from class de.iai.ilcd.model.dao.DataSetDao
buildClassificationJoin, buildClassificationJoin, buildClassificationWhere, buildClassificationWhere, checkAndPersist, getAccessedClass, getAll, getAllCount, getByClass, getByClass, getByDataSetId, getByDataSetId, getByUuidAndVersion, getDataSets, getJpaName, getNumberByClass, getNumberByClass, getSubClasses, getTopClasses, lsearch, lsearch, lsearch, merge, remove, search, search, search, search, search, searchResultCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowDao

public FlowDao()
Method Detail

preCheckAndPersist

protected void preCheckAndPersist(Flow dataSet)
Invoked at beginning of DataSetDao.checkAndPersist(DataSet, PersistType, PrintWriter) to manipulate data prior to persisting

Specified by:
preCheckAndPersist in class DataSetDao<Flow,de.fzk.iai.ilcd.service.model.IFlowListVO>
Parameters:
dataSet - data set to manipulate
See Also:
DataSetDao.checkAndPersist(DataSet, PersistType, PrintWriter)

getFlows

public java.util.List<Flow> getFlows(int maxFlows)
Get flows with maximum limit of result items

Parameters:
maxFlows - maximum amount of flows to get
Returns:
flows with maximum limit of result items

getByUuid

public Flow getByUuid(java.lang.String uuid)
Get a flow by UUID. Overrides DataSetDao implementation, because there is an additional step which tries to associate referenced flow property, if available

Overrides:
getByUuid in class DataSetDao<Flow,de.fzk.iai.ilcd.service.model.IFlowListVO>
Parameters:
uuid - the UUID string
Returns:
flow with provided UUID

getFlowsByCategory

public java.util.List<Flow> getFlowsByCategory(java.lang.String mainClass)

getNumberOfFlowsInCategory

public long getNumberOfFlowsInCategory(java.lang.String mainClass)

getFlowsByCategory

public java.util.List<Flow> getFlowsByCategory(java.lang.String mainClass,
                                               java.lang.String subClass)

getFlowsBySubCategories

public java.util.List<Flow> getFlowsBySubCategories(java.lang.String subClass,
                                                    java.lang.String subClass2)

getNumberOfFlowsInCategory

public long getNumberOfFlowsInCategory(java.lang.String mainClass,
                                       java.lang.String subClass)

getTopClasses2

public java.util.List<java.lang.String> getTopClasses2()

getTopCategories

public java.util.List<java.lang.String> getTopCategories()

getSubCategories

public java.util.List<java.lang.String> getSubCategories(java.lang.String className,
                                                         java.lang.String level)

createQueryObject

protected javax.persistence.Query createQueryObject(org.apache.velocity.tools.generic.ValueParser params,
                                                    java.lang.String sortString,
                                                    boolean ascending,
                                                    boolean returnCount)
Description copied from class: DataSetDao
This method must be implemented by each dao class extending this class. It will return the specific Query object to use for the given subclass of objects, i.e. Process, Flow, ... This method will then be used by the other generic lsearch functions to issue the special query.

Specified by:
createQueryObject in class DataSetDao<Flow,de.fzk.iai.ilcd.service.model.IFlowListVO>
Parameters:
params - lsearch parameter
sortString - field of result object which will be used for ordering of lsearch results
returnCount - if true return count of lsearch result instead of lsearch results
Returns:
JPA Query objects for doing the lsearch

getFlow

@Deprecated
public Flow getFlow(java.lang.String uuid)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use getByUuid(String).

Get a flow by UUID

Parameters:
uuid - UUID of flow to get
Returns:
flow with provided UUID
See Also:
getByUuid(String)

getFlow

@Deprecated
public Flow getFlow(long datasetId)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(long).

Get the flow with the provided JPA id

Parameters:
datasetId - JPA id
Returns:
flow with the provided JPA id
See Also:
DataSetDao.getByDataSetId(long)

getFlowById

public Flow getFlowById(java.lang.String id)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(String).

Get the flow with the provided JPA id

Parameters:
id - JPA id as string
Returns:
flow with the provided JPA id
See Also:
DataSetDao.getByDataSetId(String)

getFlowById

public Flow getFlowById(java.lang.Long id)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByDataSetId(long).

Get the flow with the provided JPA id

Parameters:
id - JPA id
Returns:
flow with the provided JPA id
See Also:
DataSetDao.getByDataSetId(long)

getFlowsByClass

@Deprecated
public java.util.List<Flow> getFlowsByClass(java.lang.String mainClass)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String).

Get flows by main class

Parameters:
mainClass - main class to get flow by
Returns:
matched data sets
See Also:
DataSetDao.getByClass(String)

getNumberOfFlowsInClass

@Deprecated
public long getNumberOfFlowsInClass(java.lang.String mainClass)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String).

Get the number of flows by main class

Parameters:
mainClass - main class to get flow by
Returns:
the number of matched data sets
See Also:
DataSetDao.getNumberByClass(String)

getFlowsByClass

@Deprecated
public java.util.List<Flow> getFlowsByClass(java.lang.String mainClass,
                                                       java.lang.String subClass)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String,String).

Get flows by main and sub class

Parameters:
mainClass - main class to get flow by
subClass - sub class to get flow by
Returns:
matched data sets
See Also:
DataSetDao.getByClass(String,String)

getNumberOfFlowsInClass

@Deprecated
public long getNumberOfFlowsInClass(java.lang.String mainClass,
                                               java.lang.String subClass)
Deprecated. still exists for internal backwards compatibility, may be removed in future releases. Use DataSetDao.getByClass(String,String).

Get number of flows by main and sub class

Parameters:
mainClass - main class to get flow by
subClass - sub class to get flow by
Returns:
number of matched data sets
See Also:
DataSetDao.getNumberByClass(String,String)