public class ConceptName extends BaseOpenmrsObject implements Auditable, Voidable, Serializable
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
| Constructor and Description |
|---|
ConceptName()
default constructor
|
ConceptName(Integer conceptNameId)
Convenience constructor to create a ConceptName object by primary key
|
ConceptName(String name,
Locale locale) |
ConceptName(String name,
String shortName,
String description,
Locale locale)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(ConceptNameTag tag)
Attaches a tag to the concept name.
|
void |
addTag(String tag)
Adds a tag to the concept name.
|
void |
addTag(String tag,
String description)
Adds a tag to the concept name.
|
boolean |
equals(Object obj) |
User |
getChangedBy()
Not currently used.
|
Concept |
getConcept() |
Integer |
getConceptNameId() |
ConceptNameType |
getConceptNameType() |
User |
getCreator() |
Date |
getDateChanged()
Not currently used.
|
Date |
getDateCreated() |
Date |
getDateVoided()
Returns the Date this ConceptName was voided.
|
String |
getDescription()
Deprecated.
|
Integer |
getId() |
Locale |
getLocale() |
Boolean |
getLocalePreferred()
Getter to be used by spring, developers should use
isLocalePreferred() |
String |
getName() |
String |
getShortestName()
Deprecated.
Use
Concept.getShortestName(Locale, Boolean) instead. |
String |
getShortName()
Deprecated.
|
Collection<ConceptNameTag> |
getTags()
Returns the tags which have been attached to this ConceptName.
|
Boolean |
getVoided()
Returns whether the ConceptName has been voided.
|
User |
getVoidedBy()
Returns the User who voided this ConceptName.
|
String |
getVoidReason()
Returns the reason this ConceptName was voided.
|
int |
hashCode() |
Boolean |
hasTag(ConceptNameTag tagToFind)
Checks whether the name has a particular tag.
|
Boolean |
hasTag(String tagToFind)
Checks whether the name has a particular tag.
|
Boolean |
isFullySpecifiedName()
Checks whether the concept name is explicitly marked as fully specified
|
Boolean |
isIndexTerm()
Convenience method for checking whether this is an index Term.
|
Boolean |
isIndexTermInLocale(Locale locale)
Convenience method for determining whether this is an index Term for a given locale.
|
Boolean |
isLocalePreferred()
Getter for localePreferred
|
Boolean |
isPreferred()
Checks whether the name is explicitly marked as preferred for any locale.
|
Boolean |
isPreferredForLocale(Locale locale)
Checks whether the name is explicitly marked as preferred for the given locale
|
Boolean |
isPreferredInCountry(String country)
Checks whether the name is explicitly marked as preferred in a locale with a matching country
code E.g 'fr_RW' and 'en_RW' for country RW
|
Boolean |
isPreferredInLanguage(String language)
Checks whether the name is explicitly marked as preferred in a locale with a matching
language.
|
Boolean |
isPreferredShortInCountry(String country)
Deprecated.
since version 1.7
|
Boolean |
isPreferredShortInLanguage(String language)
Deprecated.
as of version 1.7
|
Boolean |
isShort()
Convenience method for determining whether this is a short name.
|
Boolean |
isSynonym()
Convenience method for checking whether this is a a synonym.
|
Boolean |
isSynonymInLocale(Locale locale)
Convenience method for determining whether this is a synonym in a given locale.
|
Boolean |
isVoided()
Returns whether the ConceptName has been voided.
|
void |
removeTag(ConceptNameTag tag)
Removes a tag from the concept name.
|
void |
setChangedBy(User changedBy)
Not currently used.
|
void |
setConcept(Concept concept) |
void |
setConceptNameId(Integer conceptNameId) |
void |
setConceptNameType(ConceptNameType conceptNameType) |
void |
setCreator(User creator) |
void |
setDateChanged(Date dateChanged)
Not currently used.
|
void |
setDateCreated(Date dateCreated) |
void |
setDateVoided(Date dateVoided)
Sets the Data this ConceptName was voided.
|
void |
setId(Integer id) |
void |
setLocale(Locale locale) |
void |
setLocalePreferred(Boolean localePreferred) |
void |
setName(String name) |
void |
setTags(Collection<ConceptNameTag> tags)
Set the tags which are attached to this ConceptName.
|
void |
setVoided(Boolean voided)
Sets the voided status of this ConceptName.
|
void |
setVoidedBy(User voidedBy)
Sets the User who voided this ConceptName.
|
void |
setVoidReason(String voidReason)
Sets the reason this ConceptName was voided.
|
String |
toString() |
getUuid, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic static final long serialVersionUID
public ConceptName()
public ConceptName(Integer conceptNameId)
conceptNameId - @Deprecated public ConceptName(String name, String shortName, String description, Locale locale)
name - shortName - description - locale - public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()@Deprecated public String getShortestName()
Concept.getShortestName(Locale, Boolean) instead.public Integer getConceptNameId()
public void setConceptNameId(Integer conceptNameId)
conceptNameId - The conceptId to set.public Concept getConcept()
public void setConcept(Concept concept)
public String getName()
public void setName(String name)
public Locale getLocale()
public void setLocale(Locale locale)
@Deprecated public String getShortName()
@Deprecated public String getDescription()
public User getCreator()
getCreator in interface Auditablepublic void setCreator(User creator)
setCreator in interface Auditablecreator - The creator to set.public Date getDateCreated()
getDateCreated in interface Auditablepublic void setDateCreated(Date dateCreated)
setDateCreated in interface AuditabledateCreated - The dateCreated to set.public Boolean isVoided()
public Boolean getVoided()
public void setVoided(Boolean voided)
public User getVoidedBy()
getVoidedBy in interface Voidablepublic void setVoidedBy(User voidedBy)
setVoidedBy in interface VoidablevoidedBy - the user who voided this ConceptName.public Date getDateVoided()
getDateVoided in interface Voidablepublic void setDateVoided(Date dateVoided)
setDateVoided in interface VoidabledateVoided - the date the ConceptName was voided.public String getVoidReason()
getVoidReason in interface Voidablepublic void setVoidReason(String voidReason)
setVoidReason in interface VoidablevoidReason - the reason this ConceptName was voidedpublic Collection<ConceptNameTag> getTags()
public void setTags(Collection<ConceptNameTag> tags)
tags - the tags to set.Concept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)public ConceptNameType getConceptNameType()
public void setConceptNameType(ConceptNameType conceptNameType)
conceptNameType - the conceptNameType to setpublic Boolean isLocalePreferred()
public Boolean getLocalePreferred()
isLocalePreferred()public void setLocalePreferred(Boolean localePreferred)
localePreferred - the localePreferred to setpublic void addTag(String tag)
tag - human-readable text string for the tagConcept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)public void addTag(String tag, String description)
tag - human-readable text string for the tagdescription - description of the tag's purposeConcept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)public void addTag(ConceptNameTag tag)
tag - the tag to addConcept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)public void removeTag(ConceptNameTag tag)
tag - the tag to removeConcept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)public Boolean hasTag(ConceptNameTag tagToFind)
tagToFind - the tag for which to checkisPreferred(),
isFullySpecifiedName(),
isIndexTerm(),
isSynonym(),
isShort()public Boolean hasTag(String tagToFind)
tagToFind - the string of the tag for which to checkisPreferred(),
isFullySpecifiedName(),
isIndexTerm(),
isSynonym(),
isShort()public Boolean isPreferredInLanguage(String language)
language - ISO 639 2-letter code for a language#isPreferredForLocale(Locale)}public Boolean isPreferredInCountry(String country)
country - ISO 3166 2-letter code for a country#isPreferredForLocale(Locale)}public Boolean isPreferred()
isPreferredForLocale(Locale) in that it checks if the given
name is marked as preferred irrespective of the locale in which it is preferred.#isPreferredForLocale(Locale)}public Boolean isPreferredForLocale(Locale locale)
locale - the locale in which the name is preferredpublic Boolean isFullySpecifiedName()
public Boolean isShort()
public Boolean isIndexTerm()
public Boolean isIndexTermInLocale(Locale locale)
locale - The locale in which this concept name should belong as an index termpublic Boolean isSynonymInLocale(Locale locale)
locale - The locale in which this synonym should belongpublic Boolean isSynonym()
@Deprecated public Boolean isPreferredShortInLanguage(String language)
language - ISO 639 2-letter code for a languageConcept.getShortNameInLocale(Locale),
Concept.getShortestName(Locale, Boolean)@Deprecated public Boolean isPreferredShortInCountry(String country)
country - ISO 639 2-letter code for a countryConcept.getShortNameInLocale(Locale),
Concept.getShortestName(Locale, Boolean)public String toString()
toString in class ObjectObject.toString()public Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)public User getChangedBy()
getChangedBy in interface AuditableAuditable.getChangedBy()public Date getDateChanged()
getDateChanged in interface AuditableAuditable.getDateChanged()public void setChangedBy(User changedBy)
setChangedBy in interface AuditablechangedBy - - the user who last changed the objectAuditable.setChangedBy(org.openmrs.User)public void setDateChanged(Date dateChanged)
setDateChanged in interface AuditabledateChanged - - the date the object was last changedAuditable.setDateChanged(java.util.Date)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.