public static class IdentifierGeneratorHelper.BasicHolder extends Object implements IntegralDataTypeHolder
Constructor and Description |
---|
IdentifierGeneratorHelper.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 IdentifierGeneratorHelper.BasicHolder(Class exactType)
public long getActualLongValue()
public IntegralDataTypeHolder initialize(long value)
IntegralDataTypeHolder
initialize
in interface IntegralDataTypeHolder
value
- The primitive integral value.public IntegralDataTypeHolder initialize(ResultSet resultSet, long defaultValue) throws SQLException
IntegralDataTypeHolder
initialize
in interface IntegralDataTypeHolder
resultSet
- 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
IntegralDataTypeHolder
bind
in interface IntegralDataTypeHolder
preparedStatement
- The JDBC prepared statementposition
- The position at which to bindSQLException
- Any exception from accessing the statementpublic IntegralDataTypeHolder increment()
IntegralDataTypeHolder
increment
in interface IntegralDataTypeHolder
public IntegralDataTypeHolder add(long addend)
IntegralDataTypeHolder
add
in interface IntegralDataTypeHolder
addend
- The value to add to this integral.public IntegralDataTypeHolder decrement()
IntegralDataTypeHolder
decrement
in interface IntegralDataTypeHolder
public IntegralDataTypeHolder subtract(long subtrahend)
IntegralDataTypeHolder
subtract
in interface IntegralDataTypeHolder
subtrahend
- The value to subtract from this integral.public IntegralDataTypeHolder multiplyBy(IntegralDataTypeHolder factor)
IntegralDataTypeHolder
multiplyBy
in interface IntegralDataTypeHolder
factor
- The factor by which to multiple this integralpublic IntegralDataTypeHolder multiplyBy(long factor)
IntegralDataTypeHolder
multiplyBy
in interface IntegralDataTypeHolder
factor
- The factor by which to multiple this integralpublic boolean eq(IntegralDataTypeHolder other)
IntegralDataTypeHolder
eq
in interface IntegralDataTypeHolder
other
- The other value to check against our internal statepublic boolean eq(long value)
IntegralDataTypeHolder
eq
in interface IntegralDataTypeHolder
value
- The other value to check against our internal statepublic boolean lt(IntegralDataTypeHolder other)
IntegralDataTypeHolder
lt
in interface IntegralDataTypeHolder
other
- The other value to check against our internal statepublic boolean lt(long value)
IntegralDataTypeHolder
lt
in interface IntegralDataTypeHolder
value
- The other value to check against our internal statepublic boolean gt(IntegralDataTypeHolder other)
IntegralDataTypeHolder
gt
in interface IntegralDataTypeHolder
other
- The other value to check against our internal statepublic boolean gt(long value)
IntegralDataTypeHolder
gt
in interface IntegralDataTypeHolder
value
- The other value to check against our internal statepublic IntegralDataTypeHolder copy()
IntegralDataTypeHolder
copy
in interface IntegralDataTypeHolder
public Number makeValue()
IntegralDataTypeHolder
makeValue
in interface IntegralDataTypeHolder
public Number makeValueThenIncrement()
IntegralDataTypeHolder
makeValueThenIncrement
in interface IntegralDataTypeHolder
public Number makeValueThenAdd(long addend)
IntegralDataTypeHolder
makeValueThenAdd
in interface IntegralDataTypeHolder
addend
- The value to be added to our internal stateCopyright © 2018 JBoss by Red Hat. All rights reserved.