com.semarchy.mdm.runtime.data
Class DataQueryUtil

java.lang.Object
  extended by com.semarchy.mdm.runtime.data.DataQueryUtil

public final class DataQueryUtil
extends Object

Utility class allowing to create a DataQuery for some predefined usecases.

Author:
sarod

Method Summary
static DataQuery createQueryForReferencedRow(IDataRow fromRow, IManyToOneNode navNode, List<String> selExpressions)
          Create a DataQuery to retrieve the row referenced through a IManyToOneNode.
static DataQuery createQueryForRows(Collection<IDataRow> rows, Collection<String> selectExpressions)
          Creates a ByID query for the given rows using a new set of select expressions.
static void selectAllViewAttributes(DataQuery pQuery)
          Add select expression for all Attributes of DataQuery#get#getView()
static void selectAllViewAttributes(DataQuery pQuery, List<IViewAttribute<? extends IAttribute>> pViewAttributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createQueryForRows

public static DataQuery createQueryForRows(Collection<IDataRow> rows,
                                           Collection<String> selectExpressions)
Creates a ByID query for the given rows using a new set of select expressions.

Parameters:
rows -
selectExpressions -
Returns:

createQueryForReferencedRow

public static DataQuery createQueryForReferencedRow(IDataRow fromRow,
                                                    IManyToOneNode navNode,
                                                    List<String> selExpressions)
Create a DataQuery to retrieve the row referenced through a IManyToOneNode.

Parameters:
fromRow - the referencing row. This row should contain the necessary select expression to allow the navigation.
navNode - the IManyToOneNode to navigate
selExpressions - the select expressions to query on target
Returns:
the DataQuery that would return the referenced IEntityRow when executed

selectAllViewAttributes

public static void selectAllViewAttributes(DataQuery pQuery)
Add select expression for all Attributes of DataQuery#get#getView()

Parameters:
pQuery -
pView -

selectAllViewAttributes

public static void selectAllViewAttributes(DataQuery pQuery,
                                           List<IViewAttribute<? extends IAttribute>> pViewAttributes)


Copyright © 2015. All Rights Reserved.