public final class KrmsAttributeDefinitionServiceImpl extends Object implements KrmsAttributeDefinitionService
Constructor and Description |
---|
KrmsAttributeDefinitionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
convertAttributeKeys(Map<String,String> attributesByName,
String namespace)
This method converts a collection of name/value attribute pairs to
id/value attribute pairs.
|
List<KrmsAttributeDefinition> |
convertListOfBosToImmutables(Collection<org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo> krmsAttributeDefinitionBos)
Converts a List
|
KrmsAttributeDefinition |
createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
This will create a
KrmsAttributeDefinition exactly like the parameter passed in. |
List<KrmsAttributeDefinition> |
findAllAttributeDefinitions()
Returns all KrmsAttributeDefinitions
|
List<KrmsAttributeDefinition> |
findAttributeDefinitionsByNamespace(String namespace)
Returns all KrmsAttributeDefinition that for a given namespace.
|
List<KrmsAttributeDefinition> |
findAttributeDefinitionsByType(String typeId)
Returns all KrmsAttributeDefinition that for a given type.
|
KrmsAttributeDefinition |
getAttributeDefinitionById(String id)
Lookup a KrmsAttributeDefinition based on the given id.
|
KrmsAttributeDefinition |
getAttributeDefinitionByNameAndNamespace(String name,
String namespace)
Get a KrmsAttributeDefinition object based on name and namespace
|
protected BusinessObjectService |
getBusinessObjectService()
This method returns a reference to the businessObjectService.
|
protected CriteriaLookupService |
getCriteriaLookupService() |
org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo |
getKrmsAttributeBo(String attributeName,
String namespace)
This method gets a KrmsAttributeDefinitionBo object for a given attribute.
|
String |
getKrmsAttributeId(String attributeName,
String namespace)
This method gets the attribute definition ID for a given attribute
|
void |
setBusinessObjectService(BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
Sets the criteriaLookupService attribute value.
|
void |
updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
This will update a
KrmsAttributeDefinition . |
public KrmsAttributeDefinitionServiceImpl()
public Map<String,String> convertAttributeKeys(Map<String,String> attributesByName, String namespace)
KrmsAttributeDefinitionService
At the api layer, attributes are represented as name/value pairs. However, in the database, the names of the attribute and the values are stored separately. The attribute definitions contain the attribute names. All defined attributes(for the various krms entity types) are stored together in a single table. The attribute values themselves are stored in separate tables for each entity type, and then reference the attribute definitions by the attribute definition id.
This method converts the name/value pairs to id/value pairs so they can be searched from a single table. This simplifies the queries for attributes.
convertAttributeKeys
in interface KrmsAttributeDefinitionService
attributesByName
- - a Mapnamespace
- - the namespace code of the set of attributespublic String getKrmsAttributeId(String attributeName, String namespace)
KrmsAttributeDefinitionService
getKrmsAttributeId
in interface KrmsAttributeDefinitionService
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributepublic org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo getKrmsAttributeBo(String attributeName, String namespace)
KrmsAttributeDefinitionService
getKrmsAttributeBo
in interface KrmsAttributeDefinitionService
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributepublic KrmsAttributeDefinition createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinitionService
KrmsAttributeDefinition
exactly like the parameter passed in.createAttributeDefinition
in interface KrmsAttributeDefinitionService
attributeDefinition
- - KrmsAttributeDefinitionpublic void updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinitionService
KrmsAttributeDefinition
.updateAttributeDefinition
in interface KrmsAttributeDefinitionService
attributeDefinition
- - KrmsAttributeDefinitionpublic KrmsAttributeDefinition getAttributeDefinitionById(String id)
KrmsAttributeDefinitionService
getAttributeDefinitionById
in interface KrmsAttributeDefinitionService
id
- the given KrmsAttributeDefinition idpublic KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace(String name, String namespace)
KrmsAttributeDefinitionService
getAttributeDefinitionByNameAndNamespace
in interface KrmsAttributeDefinitionService
name
- the given namenamespace
- the given type namespacepublic List<KrmsAttributeDefinition> findAttributeDefinitionsByNamespace(String namespace)
KrmsAttributeDefinitionService
findAttributeDefinitionsByNamespace
in interface KrmsAttributeDefinitionService
public List<KrmsAttributeDefinition> findAttributeDefinitionsByType(String typeId)
KrmsAttributeDefinitionService
findAttributeDefinitionsByType
in interface KrmsAttributeDefinitionService
public List<KrmsAttributeDefinition> findAllAttributeDefinitions()
KrmsAttributeDefinitionService
findAllAttributeDefinitions
in interface KrmsAttributeDefinitionService
public void setBusinessObjectService(BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.protected BusinessObjectService getBusinessObjectService()
public List<KrmsAttributeDefinition> convertListOfBosToImmutables(Collection<org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo> krmsAttributeDefinitionBos)
krmsAttributeDefinitionBos
- a mutable Listpublic void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
criteriaLookupService
- The criteriaLookupService to set.protected CriteriaLookupService getCriteriaLookupService()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.