public class ConceptName extends BaseOpenmrsObject implements Auditable, Voidable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
ConceptName()
default constructor
|
ConceptName(java.lang.Integer conceptNameId)
Convenience constructor to create a ConceptName object by primary key
|
ConceptName(java.lang.String name,
java.util.Locale locale) |
ConceptName(java.lang.String name,
java.lang.String shortName,
java.lang.String description,
java.util.Locale locale)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addTag(ConceptNameTag tag)
Attaches a tag to the concept name.
|
void |
addTag(java.lang.String tag)
Adds a tag to the concept name.
|
void |
addTag(java.lang.String tag,
java.lang.String description)
Adds a tag to the concept name.
|
User |
getChangedBy()
Not currently used.
|
Concept |
getConcept() |
java.lang.Integer |
getConceptNameId() |
ConceptNameType |
getConceptNameType() |
User |
getCreator() |
java.util.Date |
getDateChanged()
Not currently used.
|
java.util.Date |
getDateCreated() |
java.util.Date |
getDateVoided()
Returns the Date this ConceptName was voided.
|
java.lang.String |
getDescription()
Deprecated.
|
java.lang.Integer |
getId() |
java.util.Locale |
getLocale() |
java.lang.Boolean |
getLocalePreferred()
Getter to be used by spring, developers should use
isLocalePreferred() |
java.lang.String |
getName() |
java.lang.String |
getShortestName()
Deprecated.
Use
Concept.getShortestName(Locale, Boolean) instead. |
java.lang.String |
getShortName()
Deprecated.
|
java.util.Collection<ConceptNameTag> |
getTags()
Returns the tags which have been attached to this ConceptName.
|
java.lang.Boolean |
getVoided()
Returns whether the ConceptName has been voided.
|
User |
getVoidedBy()
Returns the User who voided this ConceptName.
|
java.lang.String |
getVoidReason()
Returns the reason this ConceptName was voided.
|
java.lang.Boolean |
hasTag(ConceptNameTag tagToFind)
Checks whether the name has a particular tag.
|
java.lang.Boolean |
hasTag(java.lang.String tagToFind)
Checks whether the name has a particular tag.
|
java.lang.Boolean |
isFullySpecifiedName()
Checks whether the concept name is explicitly marked as fully specified
|
java.lang.Boolean |
isIndexTerm()
Convenience method for checking whether this is an index Term.
|
java.lang.Boolean |
isIndexTermInLocale(java.util.Locale locale)
Convenience method for determining whether this is an index Term for a given locale.
|
java.lang.Boolean |
isLocalePreferred()
Getter for localePreferred
|
java.lang.Boolean |
isPreferred()
Checks whether the name is explicitly marked as preferred for any locale.
|
java.lang.Boolean |
isPreferredForLocale(java.util.Locale locale)
Checks whether the name is explicitly marked as preferred for the given locale
|
java.lang.Boolean |
isPreferredInCountry(java.lang.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
|
java.lang.Boolean |
isPreferredInLanguage(java.lang.String language)
Checks whether the name is explicitly marked as preferred in a locale with a matching
language.
|
java.lang.Boolean |
isPreferredShortInCountry(java.lang.String country)
Deprecated.
since version 1.7
|
java.lang.Boolean |
isPreferredShortInLanguage(java.lang.String language)
Deprecated.
as of version 1.7
|
java.lang.Boolean |
isShort()
Convenience method for determining whether this is a short name.
|
java.lang.Boolean |
isSynonym()
Convenience method for checking whether this is a a synonym.
|
java.lang.Boolean |
isSynonymInLocale(java.util.Locale locale)
Convenience method for determining whether this is a synonym in a given locale.
|
java.lang.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(java.lang.Integer conceptNameId) |
void |
setConceptNameType(ConceptNameType conceptNameType) |
void |
setCreator(User creator) |
void |
setDateChanged(java.util.Date dateChanged)
Not currently used.
|
void |
setDateCreated(java.util.Date dateCreated) |
void |
setDateVoided(java.util.Date dateVoided)
Sets the Data this ConceptName was voided.
|
void |
setId(java.lang.Integer id) |
void |
setLocale(java.util.Locale locale) |
void |
setLocalePreferred(java.lang.Boolean localePreferred) |
void |
setName(java.lang.String name) |
void |
setTags(java.util.Collection<ConceptNameTag> tags)
Set the tags which are attached to this ConceptName.
|
void |
setVoided(java.lang.Boolean voided)
Sets the voided status of this ConceptName.
|
void |
setVoidedBy(User voidedBy)
Sets the User who voided this ConceptName.
|
void |
setVoidReason(java.lang.String voidReason)
Sets the reason this ConceptName was voided.
|
java.lang.String |
toString()
Returns a string consisting of the name of the class of which the object is an instance and
the
uuid field surrounded by [ and ] . |
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public ConceptName()
public ConceptName(java.lang.Integer conceptNameId)
conceptNameId
- public ConceptName(java.lang.String name, java.util.Locale locale)
@Deprecated public ConceptName(java.lang.String name, java.lang.String shortName, java.lang.String description, java.util.Locale locale)
name
- shortName
- description
- locale
- @Deprecated public java.lang.String getShortestName()
Concept.getShortestName(Locale, Boolean)
instead.public java.lang.Integer getConceptNameId()
public void setConceptNameId(java.lang.Integer conceptNameId)
conceptNameId
- The conceptId to set.public Concept getConcept()
public void setConcept(Concept concept)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
@Deprecated public java.lang.String getShortName()
@Deprecated public java.lang.String getDescription()
public User getCreator()
getCreator
in interface Auditable
public void setCreator(User creator)
setCreator
in interface Auditable
creator
- The creator to set.public java.util.Date getDateCreated()
getDateCreated
in interface Auditable
public void setDateCreated(java.util.Date dateCreated)
setDateCreated
in interface Auditable
dateCreated
- The dateCreated to set.public java.lang.Boolean isVoided()
public java.lang.Boolean getVoided()
public void setVoided(java.lang.Boolean voided)
public User getVoidedBy()
getVoidedBy
in interface Voidable
public void setVoidedBy(User voidedBy)
setVoidedBy
in interface Voidable
voidedBy
- the user who voided this ConceptName.public java.util.Date getDateVoided()
getDateVoided
in interface Voidable
public void setDateVoided(java.util.Date dateVoided)
setDateVoided
in interface Voidable
dateVoided
- the date the ConceptName was voided.public java.lang.String getVoidReason()
getVoidReason
in interface Voidable
public void setVoidReason(java.lang.String voidReason)
setVoidReason
in interface Voidable
voidReason
- the reason this ConceptName was voidedpublic java.util.Collection<ConceptNameTag> getTags()
public void setTags(java.util.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 java.lang.Boolean isLocalePreferred()
public java.lang.Boolean getLocalePreferred()
isLocalePreferred()
public void setLocalePreferred(java.lang.Boolean localePreferred)
localePreferred
- the localePreferred to setpublic void addTag(java.lang.String tag)
tag
- human-readable text string for the tagConcept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public void addTag(java.lang.String tag, java.lang.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 java.lang.Boolean hasTag(ConceptNameTag tagToFind)
tagToFind
- the tag for which to checkisPreferred()
,
isFullySpecifiedName()
,
isIndexTerm()
,
isSynonym()
,
isShort()
public java.lang.Boolean hasTag(java.lang.String tagToFind)
tagToFind
- the string of the tag for which to checkisPreferred()
,
isFullySpecifiedName()
,
isIndexTerm()
,
isSynonym()
,
isShort()
public java.lang.Boolean isPreferredInLanguage(java.lang.String language)
language
- ISO 639 2-letter code for a language#isPreferredForLocale(Locale)}
public java.lang.Boolean isPreferredInCountry(java.lang.String country)
country
- ISO 3166 2-letter code for a country#isPreferredForLocale(Locale)}
public java.lang.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 java.lang.Boolean isPreferredForLocale(java.util.Locale locale)
locale
- the locale in which the name is preferredpublic java.lang.Boolean isFullySpecifiedName()
public java.lang.Boolean isShort()
public java.lang.Boolean isIndexTerm()
public java.lang.Boolean isIndexTermInLocale(java.util.Locale locale)
locale
- The locale in which this concept name should belong as an index termpublic java.lang.Boolean isSynonymInLocale(java.util.Locale locale)
locale
- The locale in which this synonym should belongpublic java.lang.Boolean isSynonym()
@Deprecated public java.lang.Boolean isPreferredShortInLanguage(java.lang.String language)
language
- ISO 639 2-letter code for a languageConcept.getShortNameInLocale(Locale)
,
Concept.getShortestName(Locale, Boolean)
@Deprecated public java.lang.Boolean isPreferredShortInCountry(java.lang.String country)
country
- ISO 639 2-letter code for a countryConcept.getShortNameInLocale(Locale)
,
Concept.getShortestName(Locale, Boolean)
public java.lang.String toString()
BaseOpenmrsObject
uuid
field surrounded by [
and ]
. In other words,
this method returns a string equal to the value of: getClass().getName() + '[' + uuid + ']'
If the uuid
field is null
, it delegates to
Object.toString()
toString
in class BaseOpenmrsObject
Object.toString()
public java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public User getChangedBy()
getChangedBy
in interface Auditable
Auditable.getChangedBy()
public java.util.Date getDateChanged()
getDateChanged
in interface Auditable
Auditable.getDateChanged()
public void setChangedBy(User changedBy)
setChangedBy
in interface Auditable
changedBy
- - the user who last changed the objectAuditable.setChangedBy(org.openmrs.User)
public void setDateChanged(java.util.Date dateChanged)
setDateChanged
in interface Auditable
dateChanged
- - the date the object was last changedAuditable.setDateChanged(java.util.Date)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.