Package PamModel

Class DependencyManager

java.lang.Object
PamModel.DependencyManager

public class DependencyManager extends Object
  • Constructor Details

    • DependencyManager

      public DependencyManager(PamModel pamModel)
  • Method Details

    • checkDependency

      public PamControlledUnit checkDependency(Frame parentFrame, PamDependent pamDependent)
      Checks through the data model and tries to find an appropriate PamDataBlock. Returns a reference to the datablock if it can find one, null otherwise.
      Parameters:
      pamDependent -
      parentComponent -
      Returns:
      reference to a PamControlledUnit satisfying the dependency
    • checkDependency

      public PamControlledUnit checkDependency(Frame parentFrame, PamDependent pamDependent, boolean create)
      Checks through the data model and tries to find an appropriate PamDataBlock. Returns a reference to the datablock if it can find one, null otherwise.
      Parameters:
      pamDependent -
      create - create set to true if you want checkDependency to automatically create required dependencies.
      parentComponent -
      Returns:
      reference to a PamDataBlock satisfying the dependency
    • findDependency

      public PamControlledUnit findDependency(PamDependency pamDependency)
      Checks through the data model and tries to find an appropriate PamDataBlock. Returns a reference to the datablock if it can find one, null otherwise.

      In some rare instances, such as Logger forms the dependence may be on a module rather than a particular type of data, i.e. the forms need the database, but the database produces no data units to check against, so the first test will fail.

      Parameters:
      pamDependency -
      Returns:
      reference to a PamDataBlock satisfying the dependency