public interface HasNullable extends Document
Document
implementations that implement the
isNullable()
method.Modifier and Type | Interface and Description |
---|---|
static class |
HasNullable.ImplementAs
The various ways a nullable column can be implemented in the generated
code.
|
Modifier and Type | Field and Description |
---|---|
static String |
NULLABLE
The key of the
nullable property. |
static String |
NULLABLE_IMPLEMENTATION
The key of the
nullableImplementation property. |
Modifier and Type | Method and Description |
---|---|
default HasNullable.ImplementAs |
getNullableImplementation()
Returns the implementation that should be used when generating getters
for this column.
|
default boolean |
isNullable()
Returns whether or not this column can hold
null values. |
static HasNullable |
of(Document document)
Returns a wrapper of the specified document that implements the
HasNullable trait. |
ancestors, children, children, get, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getData, getParent, put
static final String NULLABLE
nullable
property.static final String NULLABLE_IMPLEMENTATION
nullableImplementation
property.default boolean isNullable()
null
values.true
if null values are tolerated, else false
default HasNullable.ImplementAs getNullableImplementation()
HasNullable.ImplementAs.OPTIONAL
, every getter will
return an Optional<T>
, OptionalInt
, etc. If
HasNullable.ImplementAs.WRAPPER
, every getter will return the type as it is,
Long
for an example.
If no value is specified, HasNullable.ImplementAs.OPTIONAL
is returned.
HasNullable.ImplementAs.OPTIONAL
if
it is not specifiedstatic HasNullable of(Document document)
HasNullable
trait. If the specified document already implements
the trait, it is returned unwrapped.document
- the document to wrapCopyright © 2019 Speedment, Inc.. All rights reserved.