Class IdentifierGeneratorHelper.BasicHolder

    • Constructor Detail

      • BasicHolder

        public BasicHolder​(java.lang.Class exactType)
    • Method Detail

      • getActualLongValue

        public long getActualLongValue()
      • initialize

        public IntegralDataTypeHolder initialize​(java.sql.ResultSet resultSet,
                                                 long defaultValue)
                                          throws java.sql.SQLException
        Description copied from interface: IntegralDataTypeHolder
        Initialize the internal value from the given result set, using the specified default value if we could not get a value from the result set (aka result was null).
        Specified by:
        initialize in interface IntegralDataTypeHolder
        Parameters:
        resultSet - The JDBC result set
        defaultValue - The default value to use if we did not get a result set value.
        Returns:
        this, for method chaining
        Throws:
        java.sql.SQLException - Any exception from accessing the result set
      • bind

        public void bind​(java.sql.PreparedStatement preparedStatement,
                         int position)
                  throws java.sql.SQLException
        Description copied from interface: IntegralDataTypeHolder
        Bind this holders internal value to the given result set.
        Specified by:
        bind in interface IntegralDataTypeHolder
        Parameters:
        preparedStatement - The JDBC prepared statement
        position - The position at which to bind
        Throws:
        java.sql.SQLException - Any exception from accessing the statement
      • eq

        public boolean eq​(long value)
        Description copied from interface: IntegralDataTypeHolder
        Perform an equality comparison check
        Specified by:
        eq in interface IntegralDataTypeHolder
        Parameters:
        value - The other value to check against our internal state
        Returns:
        True if the two are equal
      • lt

        public boolean lt​(IntegralDataTypeHolder other)
        Description copied from interface: IntegralDataTypeHolder
        Perform a "less than" comparison check. We check to see if our value is less than the incoming value...
        Specified by:
        lt in interface IntegralDataTypeHolder
        Parameters:
        other - The other value to check against our internal state
        Returns:
        True if our value is less than the 'other' value.
      • lt

        public boolean lt​(long value)
        Description copied from interface: IntegralDataTypeHolder
        Perform a "less than" comparison check. We check to see if our value is less than the incoming value...
        Specified by:
        lt in interface IntegralDataTypeHolder
        Parameters:
        value - The other value to check against our internal state
        Returns:
        True if our value is less than the 'other' value.
      • gt

        public boolean gt​(IntegralDataTypeHolder other)
        Description copied from interface: IntegralDataTypeHolder
        Perform a "greater than" comparison check. We check to see if our value is greater than the incoming value...
        Specified by:
        gt in interface IntegralDataTypeHolder
        Parameters:
        other - The other value to check against our internal state
        Returns:
        True if our value is greater than the 'other' value.
      • gt

        public boolean gt​(long value)
        Description copied from interface: IntegralDataTypeHolder
        Perform a "greater than" comparison check. We check to see if our value is greater than the incoming value...
        Specified by:
        gt in interface IntegralDataTypeHolder
        Parameters:
        value - The other value to check against our internal state
        Returns:
        True if our value is greater than the 'other' value.
      • makeValueThenAdd

        public java.lang.Number makeValueThenAdd​(long addend)
        Description copied from interface: IntegralDataTypeHolder
        Increment the internal state by the given addend, but return the pre-incremented value.
        Specified by:
        makeValueThenAdd in interface IntegralDataTypeHolder
        Parameters:
        addend - The value to be added to our internal state
        Returns:
        The pre-incremented internal value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object