BEA Systems, Inc.

com.beasys.commerce.foundation.property
Class PropertyMetaDataImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.BelongingImpl
        |
        +--com.beasys.commerce.foundation.property.PropertyMetaDataImpl

public class PropertyMetaDataImpl
extends BelongingImpl
implements PropertyMetaData, java.lang.Cloneable

The PropertyMetaData is a Belonging that contains the meta data that describes a property that can be set on a ConfigurableEntity. The property name is not part of the class because it is stored as a key in the Map the Schema owns.

See Also:
PropertyMetaData, PropertyMetaDataHome, Serialized Form

Field Summary
protected  java.lang.Object defaultValue
          Used to keep track of the default value associated with this PropertyMetaData.
 java.lang.String description
          Description is a textual description of the property.
 boolean isExplicit
          Specifies whether the property is defined as a field of the ConfigurableEntity concrete implementation or as a dynamic property on the ConfigurableEntity.
 boolean isMultiValued
          Specifies whether the property is single-valued or multi-valued.
 boolean isRestricted
          Specifies whether the values that can be associated with this property are restricted or not.
 long propertyMetaDataId
          Unique ID of this PropertyMetaData.
 PropertyType propertyType
          Reference the PropertyType instance (either SingleValuePropertyType or MultiValuePropertyType object).
protected  java.util.HashSet restrictedValues
          Used to keep track of the restricted values.
 long schemaId
          Unique ID of the Schema that contains this PropertyMetaData.
 int type
          Type is the data type of the property value.
 
Fields inherited from class com.beasys.commerce.foundation.BelongingImpl
__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty
 
Constructor Summary
PropertyMetaDataImpl()
          Default contructor.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare this belonging to another
 java.lang.Object getDefaultValue()
          Returns the default value for the propert.
 java.lang.String getDescription()
          Get the value of description
 boolean getIsExplicit()
          Get the value of isExplicit
 boolean getIsMultiValued()
          Get the value of isMultiValued
 boolean getIsRestricted()
          Get the value of isRestricted
 long getPropertyMetaDataId()
          Get the value of propertyMetaDataId
 PropertyType getPropertyType()
          Get the value of propertyType
 java.util.Collection getRestrictedValues()
          Returns the collection of restricted values for the property.
 long getSchemaId()
          Get the value of schemaId
 int getType()
          Get the value of type
 java.lang.String interfaceName()
          interfaceName() returns the unqualified name of the interface from the UML model
 void setByValue(Belonging value)
          It is possible to call set-by-value with a superclass.
 void setDefaultValue(java.lang.Object defaultValue)
          Sets the default value for the property.
 void setDescription(java.lang.String description)
          Set the value of description
 void setIsExplicit(boolean isExplicit)
          Set the value of isExplicit
 void setIsMultiValued(boolean isMultiValued)
          Set the value of isMultiValued
 void setIsRestricted(boolean isRestricted)
          Set the value of isRestricted
 void setPropertyMetaDataId(long propertyMetaDataId)
          Set the value of propertyMetaDataId
 void setPropertyType(PropertyType propertyType)
          Set the value of propertyType
 void setRestrictedValues(java.util.Collection restrictedValues)
          Sets the collection of restricted values for the property.
 void setSchemaId(long schemaId)
          Set the value of schemaId
 void setType(int type)
          Set the value of type
 boolean validate(java.lang.Object value)
           
 Belonging value()
          value() is a more typesafe implementation of clone()
 
Methods inherited from class com.beasys.commerce.foundation.BelongingImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultValue

protected java.lang.Object defaultValue
Used to keep track of the default value associated with this PropertyMetaData.

restrictedValues

protected java.util.HashSet restrictedValues
Used to keep track of the restricted values. The collection of restricted values is stored in a HashSet because duplicates are automatically removed.

propertyMetaDataId

public long propertyMetaDataId
Unique ID of this PropertyMetaData. This is used to reference the default value and retricted value(s) associated with this PropertyMetaData in the type specific table.

schemaId

public long schemaId
Unique ID of the Schema that contains this PropertyMetaData. This field is managed by the BMP code.

description

public java.lang.String description
Description is a textual description of the property.

isExplicit

public boolean isExplicit
Specifies whether the property is defined as a field of the ConfigurableEntity concrete implementation or as a dynamic property on the ConfigurableEntity. If isExplicit is set to true, it indicates that the property is defined as a regular data field. If isExplicit is set to false, it indicates a dynamic property.

isMultiValued

public boolean isMultiValued
Specifies whether the property is single-valued or multi-valued. A multi-valued property supports a collection as its associated value.

isRestricted

public boolean isRestricted
Specifies whether the values that can be associated with this property are restricted or not. Restricted property values are restricted to values listed in the restricted values. Unrestricted property values have no such limitation.

propertyType

public PropertyType propertyType
Reference the PropertyType instance (either SingleValuePropertyType or MultiValuePropertyType object).

type

public int type
Type is the data type of the property value.
See Also:
TypesHelper
Constructor Detail

PropertyMetaDataImpl

public PropertyMetaDataImpl()
Default contructor. Initializes fields with default values.
Method Detail

getDescription

public java.lang.String getDescription()
Get the value of description
Specified by:
getDescription in interface PropertyMetaData
Returns:
description.

setDescription

public void setDescription(java.lang.String description)
Set the value of description
Specified by:
setDescription in interface PropertyMetaData
Parameters:
description - description to be added

getIsExplicit

public boolean getIsExplicit()
Get the value of isExplicit
Specified by:
getIsExplicit in interface PropertyMetaData
Returns:
isExplicit.

setIsExplicit

public void setIsExplicit(boolean isExplicit)
Set the value of isExplicit
Specified by:
setIsExplicit in interface PropertyMetaData
Parameters:
isExplicit - isExplicit to be added

getIsMultiValued

public boolean getIsMultiValued()
Get the value of isMultiValued
Specified by:
getIsMultiValued in interface PropertyMetaData
Returns:
isMultiValued.

setIsMultiValued

public void setIsMultiValued(boolean isMultiValued)
Set the value of isMultiValued
Specified by:
setIsMultiValued in interface PropertyMetaData
Parameters:
isMultiValued - isMultiValued to be added

getIsRestricted

public boolean getIsRestricted()
Get the value of isRestricted
Specified by:
getIsRestricted in interface PropertyMetaData
Returns:
isRestricted.

setIsRestricted

public void setIsRestricted(boolean isRestricted)
Set the value of isRestricted
Specified by:
setIsRestricted in interface PropertyMetaData
Parameters:
isRestricted - isRestricted to be added

getPropertyType

public PropertyType getPropertyType()
Get the value of propertyType
Specified by:
getPropertyType in interface PropertyMetaData
Returns:
propertyType.

setPropertyType

public void setPropertyType(PropertyType propertyType)
Set the value of propertyType
Specified by:
setPropertyType in interface PropertyMetaData
Parameters:
propertyType - propertyType to be added

getType

public int getType()
Get the value of type
Specified by:
getType in interface PropertyMetaData
Returns:
type.

setType

public void setType(int type)
Set the value of type
Specified by:
setType in interface PropertyMetaData
Parameters:
type - type to be added

value

public Belonging value()
value() is a more typesafe implementation of clone()
Returns:
a clone of this instance

interfaceName

public java.lang.String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model
Returns:
the unqualified name of the belonging interface from the UML model

setByValue

public void setByValue(Belonging value)
It is possible to call set-by-value with a superclass. If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values.

It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

Overrides:
setByValue in class BelongingImpl
Tags copied from interface: Belonging
Parameters:
belonging - The Belonging to use for initialization.

compareTo

public int compareTo(java.lang.Object o)
Compare this belonging to another
Overrides:
compareTo in class BelongingImpl
Parameters:
o - target object for comparision
Returns:
0 objects are equal

validate

public boolean validate(java.lang.Object value)

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value for the propert.
Specified by:
getDefaultValue in interface PropertyMetaData

getRestrictedValues

public java.util.Collection getRestrictedValues()
Returns the collection of restricted values for the property.
Specified by:
getRestrictedValues in interface PropertyMetaData

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)
Sets the default value for the property.
Specified by:
setDefaultValue in interface PropertyMetaData

setRestrictedValues

public void setRestrictedValues(java.util.Collection restrictedValues)
Sets the collection of restricted values for the property.
Specified by:
setRestrictedValues in interface PropertyMetaData

getPropertyMetaDataId

public long getPropertyMetaDataId()
Get the value of propertyMetaDataId
Returns:
propertyMetaDataId.

setPropertyMetaDataId

public void setPropertyMetaDataId(long propertyMetaDataId)
Set the value of propertyMetaDataId
Parameters:
propertyMetaDataId - propertyMetaDataId to be added

getSchemaId

public long getSchemaId()
Get the value of schemaId
Returns:
schemaId.

setSchemaId

public void setSchemaId(long schemaId)
Set the value of schemaId
Parameters:
schemaId - schemaId to be added

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved