use of org.seasar.doma.wrapper.LongWrapper in project doma by domaframework.
the class BuiltinTableIdGenerator method initialize.
@Override
public void initialize() {
if (qualifiedTableName == null) {
throw new JdbcException(Message.DOMA2033, "qualifiedTableName");
}
if (pkColumnName == null) {
throw new JdbcException(Message.DOMA2033, "pkColumnName");
}
if (pkColumnValue == null) {
throw new JdbcException(Message.DOMA2033, "pkColumnValue");
}
if (valueColumnName == null) {
throw new JdbcException(Message.DOMA2033, "valueColumnName");
}
LongWrapper allocationSizeWrapper = new LongWrapper();
allocationSizeWrapper.set(allocationSize);
StringWrapper pkColumnValueWrapper = new StringWrapper();
pkColumnValueWrapper.set(pkColumnValue);
updateSql = new PreparedSql(SqlKind.UPDATE, createUpdateRawSql(), createUpdateFormattedSql(), null, Arrays.asList(new BasicInParameter<>(() -> allocationSizeWrapper), new BasicInParameter<>(() -> pkColumnValueWrapper)), SqlLogType.FORMATTED);
selectSql = new PreparedSql(SqlKind.SELECT, createSelectRawSql(), createSelectFormattedSql(), null, Collections.singletonList(new BasicInParameter<>(() -> pkColumnValueWrapper)), SqlLogType.FORMATTED);
}
Aggregations