Package Torello.Browser
Class DataIntegrityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- Torello.Browser.DataIntegrityException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
InvalidEnumStrException,NullNonOptionalException
public abstract class DataIntegrityException extends java.lang.RuntimeException
Abstract ancestor exception class for exceptions which check the integrity of instances of both CDP types and CDP events.
Of significant note, when the Browser transmits an object type or event to theTorello.Browserpackages, the Web-Sockets layer parses the Json, and performs a "best efforts" attempt at constructing an object.
Because throwing exceptions from within the Web-Sockets processing classes and code would cause an unacceptable level of complexity, and and all classes received from Google's or a compatible Web-Browser are not checked for integrity, but rather constructed and returned to the user "as is.".
Data Integrity consists of two separate requirements:- All type and event class fields which have not been declared
optional must have a value assigned to their
fields, and contain
'TRUE'within their respectiveBaseType.isPresent()list. - Any type or event class fields which have been assigned to a type which has a correlated Enumerated String List must contain a string that is listed among the elements of the specified list.
- See Also:
BaseType.optionalsValidate(),BaseType.optionalsValidateThrow(),BaseType.isPresent(),BaseType.enumStrValidate(),BaseType.enumStrValidateThrow(),NestedHelper.enumStrValidate(BaseType), Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/DataIntegrityException.java
- Open New Browser-Tab: Torello/Browser/DataIntegrityException.java
File Size: 3,698 Bytes Line Count: 92 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor protectedDataIntegrityException()protectedDataIntegrityException(String message)protectedDataIntegrityException(String message, Throwable cause)protectedDataIntegrityException(Throwable cause)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.
Note that Java'sjava.lang.Exceptionandjava.lang.Errorclasses implement theSerializable interface, and a warning-free build expects this field be defined here.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
public static final long serialVersionUID = 1;
-
-
Constructor Detail
-
DataIntegrityException
protected DataIntegrityException()
Constructs aDataIntegrityExceptionwith no detail message.
-
DataIntegrityException
protected DataIntegrityException(java.lang.String message)
Constructs aDataIntegrityExceptionwith the specified detail message.- Parameters:
message- the detail message.
-
DataIntegrityException
protected DataIntegrityException(java.lang.String message, java.lang.Throwable cause)
Constructs a newDataIntegrityExceptionwith the specified detail message and cause.Note: The detail message associated with cause is not automatically incorporated into this exception's detail message.- Parameters:
message- The detail message (which is saved for later retrieval by theThrowable.getMessage()method).cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (A null value is permitted, and indicates that the cause is nonexistent or unknown).
-
DataIntegrityException
protected DataIntegrityException(java.lang.Throwable cause)
Constructs a newDataIntegrityExceptionwith the specified cause and a detail message of(cause==null ? null : cause.toString())(which typically contains the class and detail message of cause).
This constructor is useful for exceptions that are little more than wrappers for other throwables.- Parameters:
cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). (A null value is permitted, and indicates that the cause is nonexistent or unknown).
-
-