public final class DomainUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Domain> |
createIfNotExists(com.ocs.dynamo.service.BaseService<?,T> service,
Class<T> clazz,
String value,
boolean caseSensitive)
Creates a new item if it does not exist.
|
static <T extends Domain> |
filterDomains(Class<T> clazz,
Set<Domain> domains)
Returns all domain value that match the specified type
|
static <T extends Domain> |
getDomainDescriptions(com.ocs.dynamo.service.MessageService messageService,
Collection<T> domains,
Locale locale)
Returns a string containing the descriptions of the supplied domain
objects (truncated after a number of items)
|
static <T extends Domain> |
updateDomains(Class<T> clazz,
Set<Domain> domains,
Set<T> newValues)
Updates a certain category of domain items, removing all current values
and replacing them by the new ones
|
public static <T extends Domain> T createIfNotExists(com.ocs.dynamo.service.BaseService<?,T> service, Class<T> clazz, String value, boolean caseSensitive)
service - the service used to retrieve the itemclazz - the domain classvalue - the value of the "name" attributecaseSensitive - whether to check for case-sensitive valuespublic static <T extends Domain> Set<T> filterDomains(Class<T> clazz, Set<Domain> domains)
clazz - the typedomains - the set of all domain valuespublic static <T extends Domain> void updateDomains(Class<T> clazz, Set<Domain> domains, Set<T> newValues)
clazz - the domain typedomains - all current domain valuesnewValues - the set of new valuespublic static <T extends Domain> String getDomainDescriptions(com.ocs.dynamo.service.MessageService messageService, Collection<T> domains, Locale locale)
domains - the domainsCopyright © 2019 Open Circle Solutions. All rights reserved.