wt.iba.definition
Class AbstractAttributeDefinition

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Simple
          extended bywt.iba.definition.AbstractAttributeDefinition
All Implemented Interfaces:
AccessControlled, AttributeDefinition, AttributeHierarchyChild, AttributeHierarchyParent, BusinessInformation, ChildAttributeDefinition, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, Notifiable, ObjectMappable, ParentAttributeDefinition, Persistable, Serializable, SoftMetaData
Direct Known Subclasses:
BooleanDefinition, FloatDefinition, IntegerDefinition, RatioDefinition, ReferenceDefinition, StringDefinition, TimestampDefinition, UnitDefinition, URLDefinition

public abstract class AbstractAttributeDefinition
extends Simple
implements AttributeDefinition, Externalizable

AbstractAttributeDefinition is the super class of nine attribute definitions.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static int COUNTERPART_ID_UPPER_LIMIT
           
private  String counterpartID
           
static String DEFINITION_PARENT
          Label for the attribute.
private  ObjectReference definitionParentReference
           
private  String description
           
private static int DISPLAY_NAME_UPPER_LIMIT
           
private  String displayName
           
static long EXTERNALIZATION_VERSION_UID
           
private static int HIERARCHY_ID_UPPER_LIMIT
           
private  String hierarchyDisplayName
           
private  String hierarchyID
           
private  String name
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  int siblingID
           
 
Fields inherited from class wt.enterprise.Simple
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.iba.definition.AttributeDefinition
COUNTERPART_ID, DISPLAY_NAME
 
Fields inherited from interface wt.iba.definition.ChildAttributeDefinition
DEFINITION_PARENT_REFERENCE, HIERARCHY_ID, SIBLING_ID
 
Fields inherited from interface wt.iba.definition.AttributeHierarchyChild
DESCRIPTION, HIERARCHY_DISPLAY_NAME, NAME
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.notify.Notifiable
EVENT_SET
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
AbstractAttributeDefinition()
           
 
Method Summary
private  void counterpartIDValidate(String a_CounterpartID)
           
private  void definitionParentReferenceValidate(ObjectReference a_DefinitionParentReference)
           
private  void descriptionValidate(String a_Description)
           
private  void displayNameValidate(String a_DisplayName)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
abstract  AttributeDefinitionReference getAttributeDefinitionReference()
          Get the AttributeDefinitionReference out of this definition.
abstract  String getConstraintClassname()
          Get the classname of the associated attribute constraint.
 String getCounterpartID()
          Gets the value of the attribute: COUNTERPART_ID.
 ParentAttributeDefinition getDefinitionParent()
          Gets the object for the association that plays role: DEFINITION_PARENT.
 ObjectReference getDefinitionParentReference()
          Gets the value of the attribute: DEFINITION_PARENT_REFERENCE.
 String getDescription()
          Gets the value of the attribute: DESCRIPTION.
 String getDisplayName()
          Gets the value of the attribute: DISPLAY_NAME.
 String getHierarchyDisplayName()
          Gets the value of the attribute: HIERARCHY_DISPLAY_NAME.
 String getHierarchyID()
          Gets the value of the attribute: HIERARCHY_ID.
 String getName()
          Gets the value of the attribute: NAME.
abstract  AttributeHierarchyParent getParent()
          

Supported API: false
 int getSiblingID()
          Gets the value of the attribute: SIBLING_ID.
abstract  String getValueClassname()
          Get the classname of the associated attribute value.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
private  void hierarchyDisplayNameValidate(String a_HierarchyDisplayName)
           
private  void hierarchyIDValidate(String a_HierarchyID)
           
abstract  boolean isValidChild(AttributeHierarchyChild hierChild)
          

Supported API: false
private  void nameValidate(String a_Name)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(AbstractAttributeDefinition thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setCounterpartID(String a_CounterpartID)
          Sets the value of the attribute: COUNTERPART_ID.
 void setDefinitionParent(ParentAttributeDefinition a_DefinitionParent)
          Sets the object for the association that plays role: DEFINITION_PARENT.
 void setDefinitionParentReference(ObjectReference a_DefinitionParentReference)
          Sets the value of the attribute: DEFINITION_PARENT_REFERENCE.
 void setDescription(String a_Description)
          Sets the value of the attribute: DESCRIPTION.
 void setDisplayName(String a_DisplayName)
          Sets the value of the attribute: DISPLAY_NAME.
 void setHierarchyDisplayName(String a_HierarchyDisplayName)
          Sets the value of the attribute: HIERARCHY_DISPLAY_NAME.
 void setHierarchyID(String a_HierarchyID)
          Sets the value of the attribute: HIERARCHY_ID.
 void setName(String a_Name)
          Sets the value of the attribute: NAME.
 void setSiblingID(int a_SiblingID)
          Sets the value of the attribute: SIBLING_ID.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.enterprise.Simple
getBusinessType, getDomainRef, getEventSet, getIdentity, initialize, isInheritedDomain, readVersion, setDomainRef, setEventSet, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo, getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DISPLAY_NAME_UPPER_LIMIT

private static int DISPLAY_NAME_UPPER_LIMIT

displayName

private String displayName

COUNTERPART_ID_UPPER_LIMIT

private static int COUNTERPART_ID_UPPER_LIMIT

counterpartID

private String counterpartID

siblingID

private int siblingID

HIERARCHY_ID_UPPER_LIMIT

private static int HIERARCHY_ID_UPPER_LIMIT

hierarchyID

private String hierarchyID

DEFINITION_PARENT

public static final String DEFINITION_PARENT
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

definitionParentReference

private ObjectReference definitionParentReference

name

private String name

description

private String description

hierarchyDisplayName

private String hierarchyDisplayName

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

AbstractAttributeDefinition

public AbstractAttributeDefinition()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Simple
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Simple
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(AbstractAttributeDefinition thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Simple
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Simple
Parameters:
input -
Throws:
SQLException
DatastoreException

isValidChild

public abstract boolean isValidChild(AttributeHierarchyChild hierChild)


Supported API: false

Specified by:
isValidChild in interface AttributeHierarchyParent
Parameters:
hierChild -
Returns:
boolean

getParent

public abstract AttributeHierarchyParent getParent()


Supported API: false

Specified by:
getParent in interface AttributeHierarchyChild
Returns:
AttributeHierarchyParent

getValueClassname

public abstract String getValueClassname()
Get the classname of the associated attribute value.

Supported API: false

Returns:
String

getConstraintClassname

public abstract String getConstraintClassname()
Get the classname of the associated attribute constraint.

Supported API: false

Returns:
String

getAttributeDefinitionReference

public abstract AttributeDefinitionReference getAttributeDefinitionReference()
                                                                      throws WTException
Get the AttributeDefinitionReference out of this definition.

Supported API: false

Returns:
AttributeDefinitionReference
Throws:
WTException

getDisplayName

public String getDisplayName()
Gets the value of the attribute: DISPLAY_NAME. displayName is the name displayed whenever the attribute definition is viewed outside of the context of its position within the attribute definition hierarchy, e.g. attribute defintions in the classification node.

Supported API: false

Specified by:
getDisplayName in interface AttributeDefinition
Returns:
String

setDisplayName

public void setDisplayName(String a_DisplayName)
                    throws WTPropertyVetoException
Sets the value of the attribute: DISPLAY_NAME. displayName is the name displayed whenever the attribute definition is viewed outside of the context of its position within the attribute definition hierarchy, e.g. attribute defintions in the classification node.

Supported API: false

Specified by:
setDisplayName in interface AttributeDefinition
Parameters:
a_DisplayName -
Throws:
WTPropertyVetoException

displayNameValidate

private void displayNameValidate(String a_DisplayName)
                          throws WTPropertyVetoException
Parameters:
a_DisplayName -
Throws:
WTPropertyVetoException

getCounterpartID

public String getCounterpartID()
Gets the value of the attribute: COUNTERPART_ID. counterpartID is unique (except when null) among all attribute definitions, attribute organizers, classification nodes, and quantities of measure. It is managed exclusively by CounterPart. Objects created by the CounterPart service will inherit this ID from the CounterPart classification being uploaded. Objects created by some other service will be assigned a unique ID (based on the network address of the server and the database ID of the object) when the object is first downloaded by the CounterPart service. Besides being used by CounterPart in its classification management role, this is the attribute/class/qom ID that is used by PartsLink search.

Supported API: false

Specified by:
getCounterpartID in interface AttributeDefinition
Returns:
String

setCounterpartID

public void setCounterpartID(String a_CounterpartID)
                      throws WTPropertyVetoException
Sets the value of the attribute: COUNTERPART_ID. counterpartID is unique (except when null) among all attribute definitions, attribute organizers, classification nodes, and quantities of measure. It is managed exclusively by CounterPart. Objects created by the CounterPart service will inherit this ID from the CounterPart classification being uploaded. Objects created by some other service will be assigned a unique ID (based on the network address of the server and the database ID of the object) when the object is first downloaded by the CounterPart service. Besides being used by CounterPart in its classification management role, this is the attribute/class/qom ID that is used by PartsLink search.

Supported API: false

Specified by:
setCounterpartID in interface AttributeDefinition
Parameters:
a_CounterpartID -
Throws:
WTPropertyVetoException

counterpartIDValidate

private void counterpartIDValidate(String a_CounterpartID)
                            throws WTPropertyVetoException
Parameters:
a_CounterpartID -
Throws:
WTPropertyVetoException

getSiblingID

public int getSiblingID()
Gets the value of the attribute: SIBLING_ID. siblingID is a machine-readable encrypted number to represent hierarchyID for the attribute definition. This ID is also an unique ID among the siblings.

Supported API: false

Specified by:
getSiblingID in interface ChildAttributeDefinition
Returns:
int

setSiblingID

public void setSiblingID(int a_SiblingID)
                  throws WTPropertyVetoException
Sets the value of the attribute: SIBLING_ID. siblingID is a machine-readable encrypted number to represent hierarchyID for the attribute definition. This ID is also an unique ID among the siblings.

Supported API: false

Specified by:
setSiblingID in interface ChildAttributeDefinition
Parameters:
a_SiblingID -
Throws:
WTPropertyVetoException

getHierarchyID

public String getHierarchyID()
Gets the value of the attribute: HIERARCHY_ID. hierarchyID is an unique, human-readable encoding hiearchy name for the attribute definition. This ID is used to optimize hierarchical queries by allowing lineage to be verified through simple ID comparisons.

Supported API: false

Specified by:
getHierarchyID in interface ChildAttributeDefinition
Returns:
String

setHierarchyID

public void setHierarchyID(String a_HierarchyID)
                    throws WTPropertyVetoException
Sets the value of the attribute: HIERARCHY_ID. hierarchyID is an unique, human-readable encoding hiearchy name for the attribute definition. This ID is used to optimize hierarchical queries by allowing lineage to be verified through simple ID comparisons.

Supported API: false

Specified by:
setHierarchyID in interface ChildAttributeDefinition
Parameters:
a_HierarchyID -
Throws:
WTPropertyVetoException

hierarchyIDValidate

private void hierarchyIDValidate(String a_HierarchyID)
                          throws WTPropertyVetoException
Parameters:
a_HierarchyID -
Throws:
WTPropertyVetoException

getDefinitionParent

public ParentAttributeDefinition getDefinitionParent()
Gets the object for the association that plays role: DEFINITION_PARENT.

Supported API: false

Specified by:
getDefinitionParent in interface ChildAttributeDefinition
Returns:
ParentAttributeDefinition

setDefinitionParent

public void setDefinitionParent(ParentAttributeDefinition a_DefinitionParent)
                         throws WTPropertyVetoException,
                                WTException
Sets the object for the association that plays role: DEFINITION_PARENT.

Supported API: false

Specified by:
setDefinitionParent in interface ChildAttributeDefinition
Parameters:
a_DefinitionParent -
Throws:
WTPropertyVetoException
WTException

getDefinitionParentReference

public ObjectReference getDefinitionParentReference()
Gets the value of the attribute: DEFINITION_PARENT_REFERENCE.

Supported API: false

Specified by:
getDefinitionParentReference in interface ChildAttributeDefinition
Returns:
ObjectReference

setDefinitionParentReference

public void setDefinitionParentReference(ObjectReference a_DefinitionParentReference)
                                  throws WTPropertyVetoException
Sets the value of the attribute: DEFINITION_PARENT_REFERENCE.

Supported API: false

Specified by:
setDefinitionParentReference in interface ChildAttributeDefinition
Parameters:
a_DefinitionParentReference -
Throws:
WTPropertyVetoException

definitionParentReferenceValidate

private void definitionParentReferenceValidate(ObjectReference a_DefinitionParentReference)
                                        throws WTPropertyVetoException
Parameters:
a_DefinitionParentReference -
Throws:
WTPropertyVetoException

getName

public String getName()
Gets the value of the attribute: NAME. name is a unique name among the silblings including attribute organizer and attribute definition. This name is displayed only when the attribute definition is viewed in the context of its position within the attribute definition hierarchy.

Supported API: false

Specified by:
getName in interface AttributeHierarchyChild
Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: NAME. name is a unique name among the silblings including attribute organizer and attribute definition. This name is displayed only when the attribute definition is viewed in the context of its position within the attribute definition hierarchy.

Supported API: false

Specified by:
setName in interface AttributeHierarchyChild
Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getDescription

public String getDescription()
Gets the value of the attribute: DESCRIPTION. A description of the attribute definition

Supported API: false

Specified by:
getDescription in interface AttributeHierarchyChild
Returns:
String

setDescription

public void setDescription(String a_Description)
                    throws WTPropertyVetoException
Sets the value of the attribute: DESCRIPTION. A description of the attribute definition

Supported API: false

Specified by:
setDescription in interface AttributeHierarchyChild
Parameters:
a_Description -
Throws:
WTPropertyVetoException

descriptionValidate

private void descriptionValidate(String a_Description)
                          throws WTPropertyVetoException
Parameters:
a_Description -
Throws:
WTPropertyVetoException

getHierarchyDisplayName

public String getHierarchyDisplayName()
Gets the value of the attribute: HIERARCHY_DISPLAY_NAME.

Supported API: false

Specified by:
getHierarchyDisplayName in interface AttributeHierarchyChild
Returns:
String

setHierarchyDisplayName

public void setHierarchyDisplayName(String a_HierarchyDisplayName)
                             throws WTPropertyVetoException
Sets the value of the attribute: HIERARCHY_DISPLAY_NAME.

Supported API: false

Specified by:
setHierarchyDisplayName in interface AttributeHierarchyChild
Parameters:
a_HierarchyDisplayName -
Throws:
WTPropertyVetoException

hierarchyDisplayNameValidate

private void hierarchyDisplayNameValidate(String a_HierarchyDisplayName)
                                   throws WTPropertyVetoException
Parameters:
a_HierarchyDisplayName -
Throws:
WTPropertyVetoException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class Simple
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class Simple
Returns:
int