|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.object.ObjectDefinitionImpl
public class ObjectDefinitionImpl
This class captures the definition of a generic property, and can be used to determine appropriate user-interface representations to present and capture property values.
Constructor Summary | |
---|---|
ObjectDefinitionImpl()
Create an empty property definition object with all defaults. |
|
ObjectDefinitionImpl(ObjectDefinition defn)
Create a property definition object that is a copy of the specified instance. |
|
ObjectDefinitionImpl(java.lang.String name)
Create a definition object with the specified set of attributes. |
|
ObjectDefinitionImpl(java.lang.String name,
java.lang.String displayName)
Create a definition object with the specified set of attributes. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object obj)
Compares this object to another. |
void |
computeDisplayName()
This method attempts to compute and set the display name using the name, which is expected to be in "humpback" notation (e.g., "aName"). |
void |
computePluralDisplayName()
This method attempts to compute and set the plural display name from the display name, using a simple pluralization rules. |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
java.lang.String |
getDisplayName()
Get the localized display name of this property. |
java.lang.String |
getName()
Get the actual or programmatic name of this property. |
java.lang.String |
getPluralDisplayName()
Get the localized display name of this property. |
java.lang.String |
getShortDescription()
Get the short description of this property. |
java.lang.String |
getShortDisplayName()
Get the localized display name of this property. |
int |
hashCode()
Returns the hash code value for this object. |
void |
setDisplayName(java.lang.String displayName)
Set the localized display name of this property. |
void |
setName(java.lang.String name)
Set the actual or programmatic name of this property. |
void |
setPluralDisplayName(java.lang.String displayName)
Set the localized display name of this property. |
void |
setShortDescription(java.lang.String shortDescription)
Set the short description of this property. |
void |
setShortDisplayName(java.lang.String displayName)
Set the localized display name of this property. |
java.lang.String |
toString()
Returns a string representing the current state of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectDefinitionImpl()
public ObjectDefinitionImpl(java.lang.String name)
name
- the namedisplayName
- the displayable name for this property; or null
if the display name is the same as the property name.multiplicity
- the instance of Multiplicity that captures the allowable
range of the cardinality of property values; if null, the default
multiplicity of "1" is used.public ObjectDefinitionImpl(java.lang.String name, java.lang.String displayName)
name
- the namedisplayName
- the displayable name for this property; or null
if the display name is the same as the property name.public ObjectDefinitionImpl(ObjectDefinition defn)
defn
- the definition that is to be copied; may not be nullMethod Detail |
---|
public java.lang.String getName()
getName
in interface ObjectDefinition
public void setName(java.lang.String name)
name
- the new property name; or null if there is no name for this
property definitionpublic java.lang.String getPluralDisplayName()
getPluralDisplayName
in interface ObjectDefinition
public void setPluralDisplayName(java.lang.String displayName)
displayName
- the displayable name for this property; or null
if the display name is the same as the property name.public java.lang.String getShortDisplayName()
getShortDisplayName
in interface ObjectDefinition
public void setShortDisplayName(java.lang.String displayName)
displayName
- the displayable name for this property; or null
if the display name is the same as the property name.public java.lang.String getDisplayName()
getDisplayName
in interface ObjectDefinition
public void setDisplayName(java.lang.String displayName)
displayName
- the displayable name for this property; or null
if the display name is the same as the property name.public java.lang.String getShortDescription()
getShortDescription
in interface ObjectDefinition
public void setShortDescription(java.lang.String shortDescription)
shortDescription
- the short description for this property, or
null if there is no short description.public int compareTo(java.lang.Object obj)
Note: this method is consistent with
equals()
, meaning that
(compare(x, y)==0) == (x.equals(y))
.
compareTo
in interface ObjectDefinition
compareTo
in interface java.lang.Comparable
obj
- the object that this instance is to be compared to.
java.lang.IllegalArgumentException
- if the specified object reference is null
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this instance.public boolean equals(java.lang.Object obj)
compareTo()
.
equals
in interface ObjectDefinition
equals
in class java.lang.Object
obj
- the object that this instance is to be compared to.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface ObjectDefinition
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public void computeDisplayName()
This method first ensures that the first character is uppercase. Then, the method inserts before any remaining uppercase characters a space.
public void computePluralDisplayName()
Pluralization rules are as follows: <
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |