Class OptionalValueField<V>
java.lang.Object
ch.nolix.system.objectdata.model.AbstractField
ch.nolix.system.objectdata.model.AbstractBaseValueField<V>
ch.nolix.system.objectdata.model.OptionalValueField<V>
- Type Parameters:
V- the type of the value of aOptionalValueField.
- All Implemented Interfaces:
NameHolder, Clearable, EmptinessRequestable, StateRequestable<DatabaseObjectState>, DatabaseComponent<IDatabase>, EntityComponent<IEntity>, TableComponent<ITable<? extends IEntity>>, OpennessRequestable, DatabaseObject, CreationRequestable, DatabaseConnectionRequestable, DeletionRequestable, EditingRequestable, LoadingRequestable, MandatorynessRequestable, BaseValueField<V>, Field, IOptionalValueField<V>
public final class OptionalValueField<V>
extends AbstractBaseValueField<V>
implements IOptionalValueField<V>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes the elements of the currentClearable.getType()voidinternalSetNullableValue(Object nullableValue, String nullableAdditionalValue) booleanisEmpty()booleanvoidvoidsetValueFromString(String string) static <V2> OptionalValueField<V2> withInitialValue(V2 initialValue) static <V2> OptionalValueField<V2> withValueType(Class<V2> valueType) Methods inherited from class AbstractBaseValueField
getStoredBackReferencedBaseReferences, getStoredBaseBackReferencesWhoReferencesBackThis, getValueType, referencesBackEntity, referencesBackEntityWithId, referencesBackField, referencesEntity, referencesUninsertedEntityMethods inherited from class AbstractField
belongsToDatabase, belongsToEntity, belongsToTable, getName, getState, getStoredParentColumn, getStoredParentDatabase, getStoredParentEntity, getStoredParentTable, isClosed, isConnectedWithRealDatabase, isDeleted, isEdited, isLoaded, isNew, knowsParentColumn, setUpdateActionMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BaseValueField
getValueTypeMethods inherited from interface CreationRequestable
isNewMethods inherited from interface DatabaseComponent
belongsToDatabase, getStoredParentDatabaseMethods inherited from interface DatabaseConnectionRequestable
isConnectedWithRealDatabaseMethods inherited from interface DeletionRequestable
isDeletedMethods inherited from interface EditingRequestable
isEditedMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface EntityComponent
belongsToEntity, getStoredParentEntityMethods inherited from interface Field
getStoredBackReferencedBaseReferences, getStoredBaseBackReferencesWhoReferencesBackThis, getStoredParentColumn, knowsParentColumn, referencesBackEntity, referencesBackEntityWithId, referencesBackField, referencesEntity, referencesUninsertedEntity, setUpdateActionMethods inherited from interface LoadingRequestable
isLoadedMethods inherited from interface MandatorynessRequestable
isOptionalMethods inherited from interface NameHolder
getName, getNameInSingleQuotes, hasName, hasSameNameAsMethods inherited from interface OpennessRequestable
isClosed, isOpenMethods inherited from interface StateRequestable
getStateMethods inherited from interface TableComponent
belongsToTable, getStoredParentTable
-
Method Details
-
withInitialValue
-
withValueType
-
clear
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise
-
getStoredValue
- Specified by:
getStoredValuein interfaceIOptionalValueField<V>
-
getType
-
internalSetNullableValue
- Specified by:
internalSetNullableValuein interfaceField
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin interfaceMandatorynessRequestable- Returns:
- true if the current
MandatorynessRequestableis mandatory, false otherwise
-
setValue
- Specified by:
setValuein interfaceIOptionalValueField<V>
-
setValueFromString
- Specified by:
setValueFromStringin interfaceIOptionalValueField<V>
-