Class ClassType

java.lang.Object
org.hl7.cql.model.DataType
org.hl7.cql.model.ClassType
All Implemented Interfaces:
NamedType
Direct Known Subclasses:
ProfileType

public class ClassType extends DataType implements NamedType
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface NamedType
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface NamedType
    • getSimpleName

      public String getSimpleName()
      Specified by:
      getSimpleName in interface NamedType
    • getIdentifier

      public String getIdentifier()
    • setIdentifier

      public void setIdentifier(String identifier)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getTarget

      public String getTarget()
      Specified by:
      getTarget in interface NamedType
    • setTarget

      public void setTarget(String target)
    • isRetrievable

      public boolean isRetrievable()
    • setRetrievable

      public void setRetrievable(boolean retrievable)
    • getPrimaryCodePath

      public String getPrimaryCodePath()
    • setPrimaryCodePath

      public void setPrimaryCodePath(String primaryCodePath)
    • getPrimaryValueSetPath

      public String getPrimaryValueSetPath()
    • setPrimaryValueSetPath

      public void setPrimaryValueSetPath(String primaryValueSetPath)
    • getRelationships

      public Iterable<Relationship> getRelationships()
    • addRelationship

      public void addRelationship(Relationship relationship)
    • getTargetRelationships

      public Iterable<Relationship> getTargetRelationships()
    • addTargetRelationship

      public void addTargetRelationship(Relationship relationship)
    • getSearches

      public Iterable<SearchType> getSearches()
    • addSearch

      public void addSearch(SearchType search)
    • findSearch

      public SearchType findSearch(String searchPath)
    • getGenericParameters

      public List<TypeParameter> getGenericParameters()
      Returns the generic parameters for the generic type. For instance, for the generic type Map<K,V extends Person>, two generic parameters will be returned: K and V extends Person. The latter parameter has a constraint restricting the type of the bound type to be a valid subtype of Person.
      Returns:
      Class' generic parameters
    • setGenericParameters

      public void setGenericParameters(List<TypeParameter> genericParameters)
      Sets the generic parameters for the generic type. For instance, for the generic type Map<K,V extends Person>, two generic parameters should be set: K and V extends Person. The latter parameter has a constraint restricting the type of the bound type to be a valid subtype of Person.
      Parameters:
      genericParameters -
    • addGenericParameter

      public void addGenericParameter(TypeParameter genericParameter)
      Adds a parameter declaration to the generic type.
      Parameters:
      genericParameter -
    • addGenericParameter

      public void addGenericParameter(Collection<TypeParameter> parameters)
      Adds collection of type parameters to existing set.
      Parameters:
      parameters -
    • getGenericParameterByIdentifier

      public TypeParameter getGenericParameterByIdentifier(String identifier)
      Returns the parameter with the given parameter identifier. If not found in the given class, it looks in the parent class.
      Parameters:
      identifier -
      Returns:
      Generic parameter with the given name in the current class or in the base class. Null if none found.
    • getGenericParameterByIdentifier

      public TypeParameter getGenericParameterByIdentifier(String identifier, boolean inCurrentClassOnly)
      Returns the parameter with the given parameter identifier. If inCurrentClassOnly is false, if not found in the given class, then it looks in the parent class. If inCurrentClassOnly is true, only looks for parameter in the given class.
      Parameters:
      identifier -
      inCurrentClassOnly -
      Returns:
      Class' generic parameter
    • getElements

      public List<ClassTypeElement> getElements()
    • getAllElements

      public List<ClassTypeElement> getAllElements()
    • addElement

      public void addElement(ClassTypeElement element)
    • addElements

      public void addElements(Collection<ClassTypeElement> elements)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toLabel

      public String toLabel()
      Overrides:
      toLabel in class DataType
    • getTupleType

      public TupleType getTupleType()
    • isCompatibleWith

      public boolean isCompatibleWith(DataType other)
      Overrides:
      isCompatibleWith in class DataType
    • isGeneric

      public boolean isGeneric()
      Specified by:
      isGeneric in class DataType
    • isInstantiable

      public boolean isInstantiable(DataType callType, InstantiationContext context)
      Specified by:
      isInstantiable in class DataType
    • instantiate

      public DataType instantiate(InstantiationContext context)
      Specified by:
      instantiate in class DataType