|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionServiceImpl
public final class KrmsAttributeDefinitionServiceImpl
Constructor Summary | |
---|---|
KrmsAttributeDefinitionServiceImpl()
|
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KrmsAttributeDefinitionServiceImpl()
Method Detail |
---|
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 attributes
public String getKrmsAttributeId(String attributeName, String namespace)
KrmsAttributeDefinitionService
getKrmsAttributeId
in interface KrmsAttributeDefinitionService
attributeName
- - the name of the attributenamespace
- - the namespace code of the attribute
public 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 attribute
public 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 id
public KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace(String name, String namespace)
KrmsAttributeDefinitionService
getAttributeDefinitionByNameAndNamespace
in interface KrmsAttributeDefinitionService
name
- the given namenamespace
- the given type namespace
public 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 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()
public void setBusinessObjectService(BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.protected BusinessObjectService getBusinessObjectService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |