Class MultiReference<E extends IEntity>
java.lang.Object
ch.nolix.system.objectdata.model.AbstractField
ch.nolix.system.objectdata.model.AbstractBaseReference<E>
ch.nolix.system.objectdata.model.MultiReference<E>
- Type Parameters:
E- is the type of theIEntitys aMultiReferencecan reference.
- All Implemented Interfaces:
INameHolder, IDatabaseComponent<IDatabase>, IEntityComponent<IEntity>, ITableComponent<ITable<? extends IEntity>>, MandatorynessRequestable, CloseStateRequestable, Clearable, EmptinessRequestable, StateRequestable<DatabaseObjectState>, IDatabaseObject, CreationRequestable, DatabaseConnectionRequestable, DeletionRequestable, EditingRequestable, LoadingRequestable, IBaseReference, IField, IMultiReference<E>, Iterable<E>
public final class MultiReference<E extends IEntity>
extends AbstractBaseReference<E>
implements IMultiReference<E>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()Removes the elements of the currentClearable.static <T extends IEntity>
MultiReference<T> forEntityTypes(IContainer<Class<? extends T>> entityTypes) static <T extends IEntity>
MultiReference<T> forEntityTypes(Class<? extends T>... entityTypes) static <T extends IEntity>
MultiReference<T> forReferenceableTableNames(IContainer<String> referenceableTableNames) static <T extends IEntity>
MultiReference<T> forReferenceableTableNames(String... referenceableTableNames) IContainer<? extends IMultiReferenceEntry<E>> getType()voidinternalSetNullableValue(Object nullableValue, String nullableAdditionalValue) booleanisEmpty()booleaniterator()booleanbooleanreferencesEntity(IEntity entity) booleanvoidremoveEntity(Object entity) voidremoveFirstEntity(Predicate<E> selector) Methods inherited from class AbstractBaseReference
getReferenceableTableNames, getStoredBackReferencedBaseReferences, referencesBackEntity, referencesBackEntityWithId, referencesBackFieldMethods 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 CloseStateRequestable
isClosed, isOpenMethods inherited from interface CreationRequestable
isNewMethods inherited from interface DatabaseConnectionRequestable
isConnectedWithRealDatabaseMethods inherited from interface DeletionRequestable
isDeletedMethods inherited from interface EditingRequestable
isEditedMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface IBaseReference
getReferenceableTableNamesMethods inherited from interface IDatabaseComponent
belongsToDatabase, getStoredParentDatabaseMethods inherited from interface IEntityComponent
belongsToEntity, getStoredParentEntityMethods inherited from interface IField
getStoredBackReferencedBaseReferences, getStoredParentColumn, knowsParentColumn, referencesBackEntity, referencesBackEntityWithId, referencesBackField, setUpdateActionMethods inherited from interface INameHolder
getName, getNameInQuotes, hasName, hasSameNameAsMethods inherited from interface ITableComponent
belongsToTable, getStoredParentTableMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LoadingRequestable
isLoadedMethods inherited from interface MandatorynessRequestable
isOptionalMethods inherited from interface StateRequestable
getState
-
Method Details
-
forEntityTypes
@SafeVarargs public static <T extends IEntity> MultiReference<T> forEntityTypes(Class<? extends T>... entityTypes) -
forEntityTypes
public static <T extends IEntity> MultiReference<T> forEntityTypes(IContainer<Class<? extends T>> entityTypes) -
forReferenceableTableNames
public static <T extends IEntity> MultiReference<T> forReferenceableTableNames(IContainer<String> referenceableTableNames) -
forReferenceableTableNames
public static <T extends IEntity> MultiReference<T> forReferenceableTableNames(String... referenceableTableNames) -
addEntity
- Specified by:
addEntityin interfaceIMultiReference<E extends IEntity>
-
clear
-
getAllReferencedEntityIds
- Specified by:
getAllReferencedEntityIdsin interfaceIMultiReference<E extends IEntity>
-
getAllStoredReferencedEntities
- Specified by:
getAllStoredReferencedEntitiesin interfaceIMultiReference<E extends IEntity>
-
getStoredBaseBackReferencesWhoReferencesBackThis
- Specified by:
getStoredBaseBackReferencesWhoReferencesBackThisin interfaceIField
-
getStoredNewAndDeletedEntries
- Specified by:
getStoredNewAndDeletedEntriesin interfaceIMultiReference<E extends IEntity>
-
getType
-
internalSetNullableValue
- Specified by:
internalSetNullableValuein interfaceIField
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin interfaceMandatorynessRequestable- Returns:
- true if the current
MandatorynessRequestableis mandatory, false otherwise.
-
iterator
-
loadedAllPersistedReferencedEntityIds
public boolean loadedAllPersistedReferencedEntityIds()- Specified by:
loadedAllPersistedReferencedEntityIdsin interfaceIMultiReference<E extends IEntity>
-
referencesEntity
- Specified by:
referencesEntityin interfaceIField
-
referencesUninsertedEntity
public boolean referencesUninsertedEntity()- Specified by:
referencesUninsertedEntityin interfaceIField
-
removeEntity
- Specified by:
removeEntityin interfaceIMultiReference<E extends IEntity>
-
removeFirstEntity
- Specified by:
removeFirstEntityin interfaceIMultiReference<E extends IEntity>
-