Package dev.grafeo.gwp
Class GqlStatus
java.lang.Object
dev.grafeo.gwp.GqlStatus
GQLSTATUS code constants and helpers per ISO/IEC 39075 Chapter 23.
Status codes are 5-character strings. The first two characters identify the status class. Class "00" is success, "01" is warning, "02" is no data, and classes >= "08" or starting with a letter are exceptions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringInvalid transaction state - active transaction exists.static final StringTransaction rollback - completion unknown.static final StringData exception.static final StringData exception - datetime field overflow.static final StringData exception - division by zero.static final StringGraph type violation.static final StringData exception - invalid datetime format.static final StringSyntax error or access rule violation - invalid reference.static final StringSyntax error or access rule violation - invalid syntax.static final StringInvalid transaction state.static final StringInvalid transaction termination.static final StringData exception - invalid value type.static final StringData exception - malformed path value.static final StringNo data.static final StringData exception - values not comparable.static final StringData exception - null value not allowed.static final StringData exception - numeric value out of range.static final StringSuccessful completion - omitted result.static final StringInvalid transaction state - read-only transaction.static final StringData exception - record field mismatch.static final StringData exception - string data, right truncation.static final StringSuccessful completion.static final StringSyntax error or access rule violation.static final StringTransaction rollback.static final StringWarning.static final StringWarning - null value eliminated in set function.static final StringWarning - string data, right truncation. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisException(String code) Check if a GQLSTATUS code represents an exception.static booleanCheck if a GQLSTATUS code represents no data (class "02").static booleanCheck if a GQLSTATUS code represents success (class "00").static booleanCheck if a GQLSTATUS code represents a warning (class "01").static StringstatusClass(String code) Return the class (first 2 characters) of a GQLSTATUS code.
-
Field Details
-
SUCCESS
Successful completion.- See Also:
-
OMITTED_RESULT
Successful completion - omitted result.- See Also:
-
WARNING
Warning.- See Also:
-
WARNING_STRING_TRUNCATION
Warning - string data, right truncation.- See Also:
-
WARNING_NULL_ELIMINATED
Warning - null value eliminated in set function.- See Also:
-
NO_DATA
No data.- See Also:
-
DATA_EXCEPTION
Data exception.- See Also:
-
STRING_TRUNCATION
Data exception - string data, right truncation.- See Also:
-
NUMERIC_OUT_OF_RANGE
Data exception - numeric value out of range.- See Also:
-
NULL_NOT_ALLOWED
Data exception - null value not allowed.- See Also:
-
INVALID_DATETIME_FORMAT
Data exception - invalid datetime format.- See Also:
-
DATETIME_OVERFLOW
Data exception - datetime field overflow.- See Also:
-
DIVISION_BY_ZERO
Data exception - division by zero.- See Also:
-
INVALID_VALUE_TYPE
Data exception - invalid value type.- See Also:
-
NOT_COMPARABLE
Data exception - values not comparable.- See Also:
-
RECORD_MISMATCH
Data exception - record field mismatch.- See Also:
-
MALFORMED_PATH
Data exception - malformed path value.- See Also:
-
INVALID_TRANSACTION_STATE
Invalid transaction state.- See Also:
-
ACTIVE_TRANSACTION
Invalid transaction state - active transaction exists.- See Also:
-
READ_ONLY_TRANSACTION
Invalid transaction state - read-only transaction.- See Also:
-
INVALID_TRANSACTION_TERMINATION
Invalid transaction termination.- See Also:
-
TRANSACTION_ROLLBACK
Transaction rollback.- See Also:
-
COMPLETION_UNKNOWN
Transaction rollback - completion unknown.- See Also:
-
SYNTAX_OR_ACCESS_ERROR
Syntax error or access rule violation.- See Also:
-
INVALID_SYNTAX
Syntax error or access rule violation - invalid syntax.- See Also:
-
INVALID_REFERENCE
Syntax error or access rule violation - invalid reference.- See Also:
-
GRAPH_TYPE_VIOLATION
Graph type violation.- See Also:
-
-
Method Details
-
statusClass
Return the class (first 2 characters) of a GQLSTATUS code.- Parameters:
code- the 5-character GQLSTATUS code- Returns:
- the 2-character status class
-
isSuccess
Check if a GQLSTATUS code represents success (class "00").- Parameters:
code- the 5-character GQLSTATUS code- Returns:
- true if the code is a success status
-
isWarning
Check if a GQLSTATUS code represents a warning (class "01").- Parameters:
code- the 5-character GQLSTATUS code- Returns:
- true if the code is a warning status
-
isNoData
Check if a GQLSTATUS code represents no data (class "02").- Parameters:
code- the 5-character GQLSTATUS code- Returns:
- true if the code is a no-data status
-
isException
Check if a GQLSTATUS code represents an exception.An exception is any status class that starts with a letter, or any numeric class >= "08".
- Parameters:
code- the 5-character GQLSTATUS code- Returns:
- true if the code is an exception status
-