systemic.sif.sbpframework.common.utils
Class SIFObjectMetadataCache

java.lang.Object
  extended by systemic.sif.sbpframework.common.utils.SIFObjectMetadataCache

public class SIFObjectMetadataCache
extends java.lang.Object

Author:
Joerg Huber

Method Summary
static SIFObjectMetadataCache getCache()
           
 SIFObject getObjectMetadata(java.lang.String sifObjectName)
          This method returns the metadata information for the given SIF Object Name.
 boolean hasDependencies(java.lang.String sifObjectName)
          This method simply checks if the SIF object given by its name (i.e StudentSchoolEnrolment) has potential dependencies based on the metadata that is available on the object.
 boolean isDependedUpon(java.lang.String sifObjectName)
          This method returns true if the given SIF Object given by its name is being depended upon, meaning there are other SIF objects that have a dependency on this object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getCache

public static SIFObjectMetadataCache getCache()

getObjectMetadata

public SIFObject getObjectMetadata(java.lang.String sifObjectName)
This method returns the metadata information for the given SIF Object Name. If the cache doesn't hold any information for this object then null is returned.

Parameters:
sifObjectName - The name of the SIF Object for which the metadata information shall be returned.
Returns:
See description.

hasDependencies

public boolean hasDependencies(java.lang.String sifObjectName)
This method simply checks if the SIF object given by its name (i.e StudentSchoolEnrolment) has potential dependencies based on the metadata that is available on the object. TRUE is returned if the object has dependencies defined in the metadata cache. False is returned if there are no known dependencies based on the metadata cache (i.e StudentPersonal has no dependencies where as the StudentSchoolEnrollment has the student and school as dependencies.). If the sifObjectName is not known in the metadata cache then FALSE is returned, indicating no caching required.

Parameters:
sifObjectName - The name of the SIF Object to test for.
Returns:
See description.

isDependedUpon

public boolean isDependedUpon(java.lang.String sifObjectName)
This method returns true if the given SIF Object given by its name is being depended upon, meaning there are other SIF objects that have a dependency on this object. For example the StudentPersonal is such an object because a number of other SIF objects depend upon the StudentPersonal such as the StudentSchoolEnrollment, StudentContactRelationship etc. If the object given by its name isn't being depended on by any other object then this method returns false.

Parameters:
sifObjectName - The object name for which object the check shall be performed.
Returns:
See description.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object