Class EntityExaminer

java.lang.Object
ch.nolix.system.databaseobject.modelexaminer.DatabaseObjectExaminer
ch.nolix.system.objectdata.modelexaminer.EntityExaminer
All Implemented Interfaces:
IDatabaseObjectExaminer, IEntityExaminer

public final class EntityExaminer extends DatabaseObjectExaminer implements IEntityExaminer
Author:
Silvan Wyss
  • Constructor Details

    • EntityExaminer

      public EntityExaminer()
  • Method Details

    • allNewAndEditedMandatoryFieldsAreSet

      public boolean allNewAndEditedMandatoryFieldsAreSet(IEntity entity)
      Specified by:
      allNewAndEditedMandatoryFieldsAreSet in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if all new and mandatory fields of the given entity are set, false otherwise.
    • canBeDeleted

      public boolean canBeDeleted(IEntity entity)
      Specified by:
      canBeDeleted in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if the given entity can be deleted, false otherwise.
    • canBeInsertedIntoTable

      public boolean canBeInsertedIntoTable(IEntity entity)
      Specified by:
      canBeInsertedIntoTable in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if the given entity can be inserted into a ITable, false otherwise.
    • canSetParentTable

      public boolean canSetParentTable(IEntity entity)
      Specified by:
      canSetParentTable in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if a parent table can be set to the given entity, false otherwise.
    • canSetParentTable

      public boolean canSetParentTable(IEntity entity, ITable<? extends IEntity> table)
      Specified by:
      canSetParentTable in interface IEntityExaminer
      Parameters:
      entity -
      table -
      Returns:
      true if the given table can be set as parent table to the given entity, false otherwise.
    • isReferencedIgnoringLocallyDeletedEntities

      public boolean isReferencedIgnoringLocallyDeletedEntities(IEntity entity)
      Specified by:
      isReferencedIgnoringLocallyDeletedEntities in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if the given entity is referenced ignoring the locally deleted IEntitys, false otherwise.
    • isReferencedInLocalDataIgnoringLocallyDeletedEntities

      public boolean isReferencedInLocalDataIgnoringLocallyDeletedEntities(IEntity entity)
      Specified by:
      isReferencedInLocalDataIgnoringLocallyDeletedEntities in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if the given entity is referenced in the local data ignoring the locally deleted IEntitys, false otherwise.
    • isReferencedInPersistedDataIgnoringLocallyDeletedEntities

      public boolean isReferencedInPersistedDataIgnoringLocallyDeletedEntities(IEntity entity)
      Specified by:
      isReferencedInPersistedDataIgnoringLocallyDeletedEntities in interface IEntityExaminer
      Parameters:
      entity -
      Returns:
      true if the given entity is referenced in the persisted data ignoring the locally deleted IEntitys, false otherwise.
    • referencesGivenEntity

      public boolean referencesGivenEntity(IEntity sourceEntity, IEntity entity)
      Specified by:
      referencesGivenEntity in interface IEntityExaminer
      Parameters:
      sourceEntity -
      entity -
      Returns:
      true if the given sourceEntity referecned the given targetEntity, false otherwise.