public interface

IntegralDataTypeHolder

implements Serializable
org.hibernate.id.IntegralDataTypeHolder
Known Indirect Subclasses

Class Overview

Defines a common api for dealing with data of integral data type.

Summary

Public Methods
abstract IntegralDataTypeHolder add(long addend)
Perform an addition
abstract void bind(PreparedStatement preparedStatement, int position)
Bind this holders internal value to the given result set.
abstract IntegralDataTypeHolder copy()
Make a copy of this holder.
abstract IntegralDataTypeHolder decrement()
Equivalent to a -- operation
abstract boolean eq(long other)
Perform an equality comparison check
abstract boolean eq(IntegralDataTypeHolder other)
Perform an equality comparison check
abstract boolean gt(long other)
Perform a "greater than" comparison check.
abstract boolean gt(IntegralDataTypeHolder other)
Perform a "greater than" comparison check.
abstract IntegralDataTypeHolder increment()
Equivalent to a ++ operation
abstract IntegralDataTypeHolder initialize(long value)
Initialize the internal value from the given primitive long.
abstract IntegralDataTypeHolder initialize(ResultSet resultSet, long defaultValue)
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).
abstract boolean lt(IntegralDataTypeHolder other)
Perform a "less than" comparison check.
abstract boolean lt(long other)
Perform a "less than" comparison check.
abstract Number makeValue()
Return the internal value.
abstract Number makeValueThenAdd(long addend)
Increment the internal state by the given addend, but return the pre-incremented value.
abstract Number makeValueThenIncrement()
Increment the internal state, but return the pre-incremented value.
abstract IntegralDataTypeHolder multiplyBy(IntegralDataTypeHolder factor)
Perform a multiplication.
abstract IntegralDataTypeHolder multiplyBy(long factor)
Perform a multiplication.
abstract IntegralDataTypeHolder subtract(long subtrahend)
Perform a subtraction

Public Methods

public abstract IntegralDataTypeHolder add (long addend)

Perform an addition

Parameters
addend The value to add to this integral.
Returns
  • this, for method chaining

public abstract void bind (PreparedStatement preparedStatement, int position)

Bind this holders internal value to the given result set.

Parameters
preparedStatement The JDBC prepared statement
position The position at which to bind
Throws
SQLException Any exception from accessing the statement

public abstract IntegralDataTypeHolder copy ()

Make a copy of this holder.

Returns
  • The copy.

public abstract IntegralDataTypeHolder decrement ()

Equivalent to a -- operation

Returns
  • this, for method chaining

public abstract boolean eq (long other)

Perform an equality comparison check

Parameters
other The other value to check against our internal state
Returns
  • True if the two are equal

public abstract boolean eq (IntegralDataTypeHolder other)

Perform an equality comparison check

Parameters
other The other value to check against our internal state
Returns
  • True if the two are equal

public abstract boolean gt (long other)

Perform a "greater than" comparison check. We check to see if our value is greater than the incoming value...

Parameters
other The other value to check against our internal state
Returns
  • True if our value is greater than the 'other' value.

public abstract boolean gt (IntegralDataTypeHolder other)

Perform a "greater than" comparison check. We check to see if our value is greater than the incoming value...

Parameters
other The other value to check against our internal state
Returns
  • True if our value is greater than the 'other' value.

public abstract IntegralDataTypeHolder increment ()

Equivalent to a ++ operation

Returns
  • this, for method chaining

public abstract IntegralDataTypeHolder initialize (long value)

Initialize the internal value from the given primitive long.

Parameters
value The primitive integral value.
Returns
  • this, for method chaining

public abstract IntegralDataTypeHolder initialize (ResultSet resultSet, long defaultValue)

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).

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
SQLException Any exception from accessing the result set

public abstract boolean lt (IntegralDataTypeHolder other)

Perform a "less than" comparison check. We check to see if our value is less than the incoming value...

Parameters
other The other value to check against our internal state
Returns
  • True if our value is less than the 'other' value.

public abstract boolean lt (long other)

Perform a "less than" comparison check. We check to see if our value is less than the incoming value...

Parameters
other The other value to check against our internal state
Returns
  • True if our value is less than the 'other' value.

public abstract Number makeValue ()

Return the internal value.

Returns
  • The current internal value

public abstract Number makeValueThenAdd (long addend)

Increment the internal state by the given addend, but return the pre-incremented value.

Parameters
addend The value to be added to our internal state
Returns
  • The pre-incremented internal value

public abstract Number makeValueThenIncrement ()

Increment the internal state, but return the pre-incremented value.

Returns
  • The pre-incremented internal value

public abstract IntegralDataTypeHolder multiplyBy (IntegralDataTypeHolder factor)

Perform a multiplication.

Parameters
factor The factor by which to multiple this integral
Returns
  • this, for method chaining

public abstract IntegralDataTypeHolder multiplyBy (long factor)

Perform a multiplication.

Parameters
factor The factor by which to multiple this integral
Returns
  • this, for method chaining

public abstract IntegralDataTypeHolder subtract (long subtrahend)

Perform a subtraction

Parameters
subtrahend The value to subtract from this integral.
Returns
  • this, for method chaining