Class GqlStatus

java.lang.Object
dev.grafeo.gwp.GqlStatus

public final class GqlStatus extends Object
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 Details

    • SUCCESS

      public static final String SUCCESS
      Successful completion.
      See Also:
    • OMITTED_RESULT

      public static final String OMITTED_RESULT
      Successful completion - omitted result.
      See Also:
    • WARNING

      public static final String WARNING
      Warning.
      See Also:
    • WARNING_STRING_TRUNCATION

      public static final String WARNING_STRING_TRUNCATION
      Warning - string data, right truncation.
      See Also:
    • WARNING_NULL_ELIMINATED

      public static final String WARNING_NULL_ELIMINATED
      Warning - null value eliminated in set function.
      See Also:
    • NO_DATA

      public static final String NO_DATA
      No data.
      See Also:
    • DATA_EXCEPTION

      public static final String DATA_EXCEPTION
      Data exception.
      See Also:
    • STRING_TRUNCATION

      public static final String STRING_TRUNCATION
      Data exception - string data, right truncation.
      See Also:
    • NUMERIC_OUT_OF_RANGE

      public static final String NUMERIC_OUT_OF_RANGE
      Data exception - numeric value out of range.
      See Also:
    • NULL_NOT_ALLOWED

      public static final String NULL_NOT_ALLOWED
      Data exception - null value not allowed.
      See Also:
    • INVALID_DATETIME_FORMAT

      public static final String INVALID_DATETIME_FORMAT
      Data exception - invalid datetime format.
      See Also:
    • DATETIME_OVERFLOW

      public static final String DATETIME_OVERFLOW
      Data exception - datetime field overflow.
      See Also:
    • DIVISION_BY_ZERO

      public static final String DIVISION_BY_ZERO
      Data exception - division by zero.
      See Also:
    • INVALID_VALUE_TYPE

      public static final String INVALID_VALUE_TYPE
      Data exception - invalid value type.
      See Also:
    • NOT_COMPARABLE

      public static final String NOT_COMPARABLE
      Data exception - values not comparable.
      See Also:
    • RECORD_MISMATCH

      public static final String RECORD_MISMATCH
      Data exception - record field mismatch.
      See Also:
    • MALFORMED_PATH

      public static final String MALFORMED_PATH
      Data exception - malformed path value.
      See Also:
    • INVALID_TRANSACTION_STATE

      public static final String INVALID_TRANSACTION_STATE
      Invalid transaction state.
      See Also:
    • ACTIVE_TRANSACTION

      public static final String ACTIVE_TRANSACTION
      Invalid transaction state - active transaction exists.
      See Also:
    • READ_ONLY_TRANSACTION

      public static final String READ_ONLY_TRANSACTION
      Invalid transaction state - read-only transaction.
      See Also:
    • INVALID_TRANSACTION_TERMINATION

      public static final String INVALID_TRANSACTION_TERMINATION
      Invalid transaction termination.
      See Also:
    • TRANSACTION_ROLLBACK

      public static final String TRANSACTION_ROLLBACK
      Transaction rollback.
      See Also:
    • COMPLETION_UNKNOWN

      public static final String COMPLETION_UNKNOWN
      Transaction rollback - completion unknown.
      See Also:
    • SYNTAX_OR_ACCESS_ERROR

      public static final String SYNTAX_OR_ACCESS_ERROR
      Syntax error or access rule violation.
      See Also:
    • INVALID_SYNTAX

      public static final String INVALID_SYNTAX
      Syntax error or access rule violation - invalid syntax.
      See Also:
    • INVALID_REFERENCE

      public static final String INVALID_REFERENCE
      Syntax error or access rule violation - invalid reference.
      See Also:
    • GRAPH_TYPE_VIOLATION

      public static final String GRAPH_TYPE_VIOLATION
      Graph type violation.
      See Also:
  • Method Details

    • statusClass

      public static String statusClass(String code)
      Return the class (first 2 characters) of a GQLSTATUS code.
      Parameters:
      code - the 5-character GQLSTATUS code
      Returns:
      the 2-character status class
    • isSuccess

      public static boolean isSuccess(String code)
      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

      public static boolean isWarning(String code)
      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

      public static boolean isNoData(String code)
      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

      public static boolean isException(String code)
      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