Class ValidationMessage
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.schema.SchemaObject
com.northconcepts.datapipeline.foundations.schema.ValidationMessage
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,JavaCodeGenerator,Serializable
One mapping or validation error, with the entity, field or validation rule it concerns.
- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
ConstructorsConstructorDescriptionValidationMessage(Filter validation, String message) ValidationMessage(EntityDef entity, String message) ValidationMessage(FieldDef field, String message) Creates a message about the given field, also setting the entity to the field's parent entity. -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXml(InputStream inputStream) Parses the XML in the stream and loads this object's state from its root element.fromXmlElement(Element element) getField()Returns the stack trace of the exception behind this error (set for mapping failures) or null if there was none.Returns the entity validation rule that failed (seeEntityDef.addValidation(Filter)) or null for other errors.setMessage(String message) setStacktrace(String stacktrace) Sets the stack trace of the exception behind this error.setValidation(Filter validation) Sets the entity validation rule that failed (seeEntityDef.addValidation(Filter)).toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionPropertiesMethods inherited from interface com.northconcepts.datapipeline.sourcecode.JavaCodeGenerator
generateJavaCode
-
Constructor Details
-
ValidationMessage
public ValidationMessage() -
ValidationMessage
-
ValidationMessage
Creates a message about the given field, also setting the entity to the field's parent entity. -
ValidationMessage
-
-
Method Details
-
getMessage
-
setMessage
-
getEntity
-
setEntity
-
getField
-
setField
-
getValidation
Returns the entity validation rule that failed (seeEntityDef.addValidation(Filter)) or null for other errors. -
setValidation
Sets the entity validation rule that failed (seeEntityDef.addValidation(Filter)). -
getStacktrace
Returns the stack trace of the exception behind this error (set for mapping failures) or null if there was none. -
setStacktrace
Sets the stack trace of the exception behind this error. -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException. -
fromXmlElement
-
fromXml
Description copied from interface:XmlSerializableParses the XML in the stream and loads this object's state from its root element. -
fromXml
-