Package mc.core.domain.base.dobj
Interface IBaseDO<T extends IBaseEntity>
- All Known Implementing Classes:
AbstractAssetDO,AbstractBaseDO,AbstractBasketDO,AbstractComplexEntityDO,AbstractComplexTypeEntityDO,AbstractEntityBaseDO,AbstractHrcEntityDO,AbstractPrincipalDO,AbstractSimpleEntityDO,AbstractTypeEntityDO,AssetBasketDO,AssetDerivateDO,AssetDerivateTypeDO,AssetDO,AssetTypeDO,AttributeDO,BaseDO,ChannelMapBaseDO,ClassificationDO,ClassificationHrcDO,CollectionDO,ComplexEntityDO,ComplexTypeEntityDO,ConverterTypeDO,CountryDO,CSSystemPropertyDO,CurrencyDO,DataTypeDO,DictionaryDO,EntityProfileDO,FileTypeDO,ImportDO,ImportProfileDO,ImportProfileTypeDO,LanguageDO,LocaleDO,MemoDO,NavigationDO,NavigationHrcDO,NavigationHrcTypeDO,NavigationTypeDO,NodeBasketDO,NodeDO,NodeHrcDO,NodeHrcTypeDO,NodeTypeDO,NotificationDO,PrincipalDO,ProjectDO,ProjectTaskDO,ProjectTaskTypeDO,PublicationDO,PublicationProfileDO,PublicationProfileTypeDO,RelationTypeDO,ReportDO,ReportingDO,RightDO,SimpleEntityDO,StateGroupTypeDO,StateTypeDO,TerritoryDO,TextServiceConcept.CustomTextSetDO,TextSetDO,TypeEntityDO,UnitDO,UserDO,UserGroupDO,WfActionTypeDO,WorkflowDataDO,WorkflowTypeDO
public interface IBaseDO<T extends IBaseEntity>
interface for generic DO lookup
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultSearchCriteria(List<mc.core.system.search.BaseSearchCriteria<?>> critList, String param) add entity specific default search criteria to list for search by given paramvoidvalidate not used, remove constraints, delete entityget all active entities.getEntityDisplay(T entity, Locale locale) getFromKey(Object key) get entity by key through entity specific property matchingget at least needed user base role for the entity classvoidmap(List<T> entities, MapContext context, OutputStream os) map list of entities to output stream through reader, filter and renderer.map data to entity if any, validate and save
-
Method Details
-
save
map data to entity if any, validate and save- Parameters:
entity- mandatorydataMap- optional- Returns:
- mapped entity
- Throws:
ApplicationException
-
delete
validate not used, remove constraints, delete entity- Parameters:
entity- mandatory- Throws:
ApplicationException
-
getFromKey
get entity by key through entity specific property matching- Parameters:
key-- Returns:
- entity if found and unique
- Throws:
EntityNotFoundExceptionNotUniqueResultException
-
addDefaultSearchCriteria
void addDefaultSearchCriteria(List<mc.core.system.search.BaseSearchCriteria<?>> critList, String param) add entity specific default search criteria to list for search by given param- Parameters:
param- mandatory
-
map
map list of entities to output stream through reader, filter and renderer. optionally using settings in publish context.- Parameters:
entities- mandatory, may be emptycontext- optional, if null suitable defaults are usedos- mandatory- Throws:
ApplicationException
-
getAllActive
get all active entities. method is not implemented for all entity classes:- Principal: get all with active flag true and isSystem flag false
- SimpleEntity: get all with isActive flag true and isSystem flag false
- TypeEntity: get all with isActive flag true
- all other: throws UnsupportedOperationException cause result may be too large
- Returns:
- list of entities matching the above rules
- Throws:
UnsupportedOperationException- if called for other than SimpleEntity or TypeEntity
-
getUserRole
User.UserBaseRole getUserRole()get at least needed user base role for the entity class -
getEntityDisplay
- Parameters:
entity- Attached entity to render as text. Must not benull.locale- Language of desired output. Ifnull, master locale is used.- Returns:
- Entity display according to DO classes or empty string. Never
null.
-