public interface DocumentDefinitionService
document definitions
Modifier and Type | Method and Description |
---|---|
void |
checkForMandatoryConstraintViolations(DDC definition,
Map<String,Object> properties,
boolean isCreation)
For a given definition this method checks a given map of properties for mandatory constraint violations.
|
void |
checkForSystemFields(DDC definition,
Map<String,Object> indexData)
For a given definition and a map of properties this method checks whether it contains system fields.
|
QueryExpression<Boolean> |
createUniqueConstraintViolationCheck(DDC definition,
String id,
Map<String,Object> properties)
For a given map of fields this method checks a definition and a database row id, this method creates a query
expression that filters a corresponding datbase table so that the result contains exactly the existing entries
that would collide with the given database row.
|
QueryExpression<Boolean> |
createUniqueConstraintViolationCheck(SaFieldDescription fieldDescription,
Object newValue,
boolean ignoreCounters)
For a given
SaFieldDescription and a given value this method creates a QueryExpression that
checks whether the given value would violate an unique constraint. |
List<Map<String,Object>> |
filterSystemFields(DDC definition,
List<Map<String,Object>> resultMaps)
This method the system fields from a given list of result map.
|
Map<String,Object> |
filterSystemFields(DDC definition,
Map<String,Object> resultMap)
This method the system fields from a given result map.
|
DDC |
getDefinition(String definitionName)
This method returns the document definition object identified by the given name
|
DDC getDefinition(String definitionName) throws SaAuthenticationException, UnknownDefinitionException, DataSourceException
definitionName
- tha name of the definition wantedSaAuthenticationException
UnknownDefinitionException
DataSourceException
List<Map<String,Object>> filterSystemFields(DDC definition, List<Map<String,Object>> resultMaps)
definition
- the definition from which the maps resultedresultMaps
- the result map“s to filterMap<String,Object> filterSystemFields(DDC definition, Map<String,Object> resultMap)
definition
- the definition from which the map resultedresultMap
- the result map to filterQueryExpression<Boolean> createUniqueConstraintViolationCheck(DDC definition, String id, Map<String,Object> properties) throws SaBasicException
definition
- the definition to check for field dataid
- the id of the row given or null if the row represents a new entryproperties
- the properties to check for conformanceSaBasicException
QueryExpression<Boolean> createUniqueConstraintViolationCheck(SaFieldDescription fieldDescription, Object newValue, boolean ignoreCounters)
SaFieldDescription
and a given value this method creates a QueryExpression
that
checks whether the given value would violate an unique constraint. If the field does not define such an
constraint or the given value and field do not quialify for checking by other reasons null is returned.fieldDescription
- the field to check for constraint violationnewValue
- the value to check for constraint violationignoreCounters
- whether counters should be ignoredQueryExpression
that checks whether the given value would violate an unique constraint or
null if no suh constraint appliesvoid checkForMandatoryConstraintViolations(DDC definition, Map<String,Object> properties, boolean isCreation) throws MandatoryConstraintViolationException
definition
- the definition that holds the constraints to check againstproperties
- the properties to check for validationsisCreation
- whether the properties represent a new entry or an old oneMandatoryConstraintViolationException
void checkForSystemFields(DDC definition, Map<String,Object> indexData) throws SystemFieldWriteException
definition
- the definition defining the dataindexData
- the properties to checkSystemFieldWriteException
Copyright © 2016 SAPERION AG. All rights reserved.