|
||||||||||
| 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 null| Method Detail |
|---|
public java.lang.String getName()
getName in interface ObjectDefinitionpublic 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 ObjectDefinitionpublic 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 ObjectDefinitionpublic 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 ObjectDefinitionpublic 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 ObjectDefinitionpublic 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 ObjectDefinitioncompareTo in interface java.lang.Comparableobj - 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 ObjectDefinitionequals in class java.lang.Objectobj - the object that this instance is to be compared to.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in interface ObjectDefinitiontoString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic 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 | |||||||||