Package mc.core.domain.system.dobj
Class CSSystemPropertyDO
java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.dobj.AbstractBaseDO<CSSystemProperty>
mc.core.domain.system.dobj.CSSystemPropertyDO
- All Implemented Interfaces:
IBaseDO<CSSystemProperty>
-
Nested Class Summary
Nested classes/interfaces inherited from class mc.core.domain.base.dobj.AbstractBaseDO
AbstractBaseDO.Initializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsave(CSSystemProperty property, DataMap dataMap) map data to entity if any, validate and savemc.core.domain.system.dobj.CSSystemPropertyDO.CSSystemPropertyValidatorvalidator(CSSystemProperty property, DataMap map) for persistent entity copy constructor be used, the copy of entity be mapped and validated
WARNING: in error case param map be changed! non valid fields be deleted from it
all error be collect as ValidationResults in ValidationException and throw only by validate() call
Examples to use:
1.Methods inherited from class mc.core.domain.base.dobj.AbstractBaseDO
addDefaultSearchCriteria, copy, delete, delete, getAll, getAllActive, getEntityDisplay, getFromId, getFromKey, getOne, getUserRole, map, map, prepareSearchFilter, save
-
Constructor Details
-
CSSystemPropertyDO
public CSSystemPropertyDO()
-
-
Method Details
-
save
public CSSystemProperty save(CSSystemProperty property, DataMap dataMap) throws ApplicationException Description copied from interface:IBaseDOmap data to entity if any, validate and save- Specified by:
savein interfaceIBaseDO<CSSystemProperty>- Overrides:
savein classAbstractBaseDO<CSSystemProperty>- Parameters:
property- mandatorydataMap- optional- Returns:
- mapped entity
- Throws:
ApplicationException
-
validator
public mc.core.domain.system.dobj.CSSystemPropertyDO.CSSystemPropertyValidator validator(CSSystemProperty property, DataMap map) throws ApplicationException Description copied from class:AbstractBaseDOfor persistent entity copy constructor be used, the copy of entity be mapped and validated
WARNING: in error case param map be changed! non valid fields be deleted from it
all error be collect as ValidationResults in ValidationException and throw only by validate() call
Examples to use:
1. validator( navigationHrc, dataMap).thatValidField( NavigationHrc.Field.navigationHrcType).validate(); 2. validator( navigation, dataMap).thatValidField( Navigation.Field.navigationType, Navigation.Field.navigationHrc) .thatNotNullIf( HrcEntity.Field.parent, n -> n.getNavigationType().getParentNavigationType() != null).validate(); 3. validator( entity, dataMap).thatValidField( Country.Field.iso2Code, "message.validate.Country.iso2Code.missing").thatUnique( Country.Field.iso2Code).validate();- Overrides:
validatorin classAbstractBaseDO<CSSystemProperty>- Parameters:
property- mandatorymap- optional- Returns:
- the validator
- Throws:
ApplicationException- the application exception
-