public static class IdentifierGeneratorHelper.BasicHolder extends Object implements IntegralDataTypeHolder
| Constructor and Description |
|---|
BasicHolder(Class exactType) |
| Modifier and Type | Method and Description |
|---|---|
IntegralDataTypeHolder |
add(long addend)
Perform an addition
|
void |
bind(PreparedStatement preparedStatement,
int position)
Bind this holders internal value to the given result set.
|
IntegralDataTypeHolder |
copy()
Make a copy of this holder.
|
IntegralDataTypeHolder |
decrement()
Equivalent to a — operation
|
boolean |
eq(IntegralDataTypeHolder other)
Perform an equality comparison check
|
boolean |
eq(long value)
Perform an equality comparison check
|
boolean |
equals(Object o) |
long |
getActualLongValue() |
boolean |
gt(IntegralDataTypeHolder other)
Perform a "greater than" comparison check.
|
boolean |
gt(long value)
Perform a "greater than" comparison check.
|
int |
hashCode() |
IntegralDataTypeHolder |
increment()
Equivalent to a ++ operation
|
IntegralDataTypeHolder |
initialize(long value)
Initialize the internal value from the given primitive long.
|
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).
|
boolean |
lt(IntegralDataTypeHolder other)
Perform a "less than" comparison check.
|
boolean |
lt(long value)
Perform a "less than" comparison check.
|
Number |
makeValue()
Return the internal value.
|
Number |
makeValueThenAdd(long addend)
Increment the internal state by the given addend, but return the pre-incremented value.
|
Number |
makeValueThenIncrement()
Increment the internal state, but return the pre-incremented value.
|
IntegralDataTypeHolder |
multiplyBy(IntegralDataTypeHolder factor)
Perform a multiplication.
|
IntegralDataTypeHolder |
multiplyBy(long factor)
Perform a multiplication.
|
IntegralDataTypeHolder |
subtract(long subtrahend)
Perform a subtraction
|
String |
toString() |
public BasicHolder(Class exactType)
public long getActualLongValue()
public IntegralDataTypeHolder initialize(long value)
IntegralDataTypeHolderInitialize the internal value from the given primitive long.
initialize in interface IntegralDataTypeHoldervalue - The primitive integral value.public IntegralDataTypeHolder initialize(ResultSet resultSet, long defaultValue) throws SQLException
IntegralDataTypeHolderInitialize 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).
initialize in interface IntegralDataTypeHolderresultSet - The JDBC result setdefaultValue - The default value to use if we did not get a result set value.SQLException - Any exception from accessing the result setpublic void bind(PreparedStatement preparedStatement, int position) throws SQLException
IntegralDataTypeHolderBind this holders internal value to the given result set.
bind in interface IntegralDataTypeHolderpreparedStatement - The JDBC prepared statementposition - The position at which to bindSQLException - Any exception from accessing the statementpublic IntegralDataTypeHolder increment()
IntegralDataTypeHolderEquivalent to a ++ operation
increment in interface IntegralDataTypeHolderpublic IntegralDataTypeHolder add(long addend)
IntegralDataTypeHolderPerform an addition
add in interface IntegralDataTypeHolderaddend - The value to add to this integral.public IntegralDataTypeHolder decrement()
IntegralDataTypeHolderEquivalent to a — operation
decrement in interface IntegralDataTypeHolderpublic IntegralDataTypeHolder subtract(long subtrahend)
IntegralDataTypeHolderPerform a subtraction
subtract in interface IntegralDataTypeHoldersubtrahend - The value to subtract from this integral.public IntegralDataTypeHolder multiplyBy(IntegralDataTypeHolder factor)
IntegralDataTypeHolderPerform a multiplication.
multiplyBy in interface IntegralDataTypeHolderfactor - The factor by which to multiple this integralpublic IntegralDataTypeHolder multiplyBy(long factor)
IntegralDataTypeHolderPerform a multiplication.
multiplyBy in interface IntegralDataTypeHolderfactor - The factor by which to multiple this integralpublic boolean eq(IntegralDataTypeHolder other)
IntegralDataTypeHolderPerform an equality comparison check
eq in interface IntegralDataTypeHolderother - The other value to check against our internal statepublic boolean eq(long value)
IntegralDataTypeHolderPerform an equality comparison check
eq in interface IntegralDataTypeHoldervalue - The other value to check against our internal statepublic boolean lt(IntegralDataTypeHolder other)
IntegralDataTypeHolderPerform a "less than" comparison check. We check to see if our value is less than the incoming value…
lt in interface IntegralDataTypeHolderother - The other value to check against our internal statepublic boolean lt(long value)
IntegralDataTypeHolderPerform a "less than" comparison check. We check to see if our value is less than the incoming value…
lt in interface IntegralDataTypeHoldervalue - The other value to check against our internal statepublic boolean gt(IntegralDataTypeHolder other)
IntegralDataTypeHolderPerform a "greater than" comparison check. We check to see if our value is greater than the incoming value…
gt in interface IntegralDataTypeHolderother - The other value to check against our internal statepublic boolean gt(long value)
IntegralDataTypeHolderPerform a "greater than" comparison check. We check to see if our value is greater than the incoming value…
gt in interface IntegralDataTypeHoldervalue - The other value to check against our internal statepublic IntegralDataTypeHolder copy()
IntegralDataTypeHolderMake a copy of this holder.
copy in interface IntegralDataTypeHolderpublic Number makeValue()
IntegralDataTypeHolderReturn the internal value.
makeValue in interface IntegralDataTypeHolderpublic Number makeValueThenIncrement()
IntegralDataTypeHolderIncrement the internal state, but return the pre-incremented value.
makeValueThenIncrement in interface IntegralDataTypeHolderpublic Number makeValueThenAdd(long addend)
IntegralDataTypeHolderIncrement the internal state by the given addend, but return the pre-incremented value.
makeValueThenAdd in interface IntegralDataTypeHolderaddend - The value to be added to our internal stateCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.