CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.remoting
Class GroupTypeClassUtils

java.lang.Object
  extended by com.intland.codebeamer.remoting.GroupTypeClassUtils

public class GroupTypeClassUtils
extends java.lang.Object

Helper class to resolve group-type to their DTO classes.


Constructor Summary
GroupTypeClassUtils()
           
 
Method Summary
static java.lang.Integer classToGroupType(java.lang.Class<? extends NamedDto> clazz)
           
static java.lang.Class<? extends NamedDto> convertGroupTypeToClass(java.lang.Integer entityTypeId)
          Convert the Group-type to a class.
static
<T> java.util.Map<java.lang.Integer,java.util.SortedSet<T>>
groupObjectByType(java.util.Collection<T> dtos)
          Group all kind of IdentifiableDto objects by their Type to a Map, so the keys are the groupType, and values are sorted sets
static java.lang.Integer objectToGroupType(java.lang.Object obj)
          Returns the group type for the given object instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupTypeClassUtils

public GroupTypeClassUtils()
Method Detail

convertGroupTypeToClass

public static java.lang.Class<? extends NamedDto> convertGroupTypeToClass(java.lang.Integer entityTypeId)
Convert the Group-type to a class. I.e. finds out which DTO class belongs to an entityType.

Parameters:
entityTypeId -
Returns:
the appropriate Dto class or null if entityTypeId is undefined

classToGroupType

public static java.lang.Integer classToGroupType(java.lang.Class<? extends NamedDto> clazz)

objectToGroupType

public static java.lang.Integer objectToGroupType(java.lang.Object obj)
Returns the group type for the given object instance.

See Also:
GroupType

groupObjectByType

public static <T> java.util.Map<java.lang.Integer,java.util.SortedSet<T>> groupObjectByType(java.util.Collection<T> dtos)
Group all kind of IdentifiableDto objects by their Type to a Map, so the keys are the groupType, and values are sorted sets

Returns:
Map with keys of GroupType integers, values are sorted sets of each group-type

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.