java.lang.Object
org.eclipse.persistence.sdo.SDOProperty
- All Implemented Interfaces:
Property,Serializable
Purpose:A representation of a Property in the type of a data object.
Responsibilities:
- A property represents an element or attribute in XML
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSDOProperty(HelperContext aContext) SDOProperty(HelperContext aContext, String aName) SDOProperty(HelperContext aContext, String aUri, String aName, SDOType aType) SDOProperty(HelperContext aContext, String aName, SDOType aType) SDOProperty(HelperContext aContext, String aName, SDOType aType, boolean hasMany) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMappingToOwner(boolean sdoMethodAttributeAccessor, int indexToAdd) INTERNAL:voidINTERNAL:voidbuildMapping(String mappingUri) INTERNAL:voidbuildMapping(String mappingUri, int indexToAdd) INTERNAL:org.eclipse.persistence.oxm.mappings.XMLFragmentCollectionMappingbuildXMLFragmentCollectionMapping(String mappingUri) org.eclipse.persistence.oxm.mappings.XMLFragmentMappingbooleanIndicate if a given SDOProperty instance is equal to this instance.Returns the value of the specified instance property of this Property.Return a list of alias names for this Property.INTERNAL:INTERNAL:Returns the containing type of this Property.Returns the default value this Property will have in adata objectwhere the Property hasn't been set.intINTERNAL:intINTERNAL:Returns a read-only List of instance Properties available on this Property.org.eclipse.persistence.oxm.mappings.MimeTypePolicyINTERNAL:getName()Returns the name of the Property.Returns the opposite Property if the Property is bi-directional or null otherwise.INTERNAL:getQualifiedXPath(String uri, boolean simple) INTERNAL:getType()Returns the type of the Property.getUri()org.eclipse.persistence.mappings.DatabaseMappingINTERNAL:getXPath()INTERNAL:INTERNAL: Returns the local name of the Property.INTERNAL:booleaninthashCode()Return a unique hashCode (as an int) for this instance.voidINTERNAL:booleanReturns whether the Property is containment, i.e., whether it represents by-value composition.booleanINTERNAL: Return whether the default value has been set by the schema either via a define by an XSD or a DataObject.protected BooleanINTERNAL: Return true if the property is an element, false if the property is an attribute, and null if it has not been specified.booleanbooleanisGlobal()INTERNAL:booleanisMany()Returns whether the Property is many-valued.booleanbooleanINTERNAL: Returns if the element or attribute corresponding to this Property should be namespace qualified in the XSD.booleanReturns whether or not instances of this property can be set to null.booleanReturn whether or not this is an open content property.booleanReturns true if values for this Property cannot be modified using the SDO APIs.booleanbooleanINTERNAL:booleanisXsd()INTERNAL: Returns if this property was declared in an XML schema.voidsetAliasNames(List names) INTERNAL: Set this Property's alias name list which are unique within the Type.voidsetAppInfoElements(List appInfoElements) INTERNAL:voidsetContainingType(Type type) INTERNAL: Set the containing type of this Property.voidsetContainment(boolean containment) INTERNAL: Set this Property's Containment which shows parent-child relationship in a tree of DataObjects.voidsetDefault(Object aDefaultValue) INTERNAL: Set the default value of this Property.voidsetFinalized(boolean isFinalized) voidsetGlobal(boolean global) INTERNAL:voidsetIndexInDeclaredProperties(int indexInDeclaredProperties) INTERNAL:voidsetIndexInType(int indexInType) INTERNAL:voidsetInstanceProperty(Property property, Object value) voidsetMany(boolean many) INTERNAL: Set this property as single-valued(false) or many-valued(true).voidINTERNAL: Assign a string as a unique name of this Property among Properties that belongs to a DataObject.voidsetNameCollision(boolean nameCollision) voidsetNamespaceQualified(boolean namespaceQualified) INTERNAL: Set if the element or attribute corresponding to this Property is namespace qualified in the XSD.voidsetNullable(boolean nullable) INTERNAL:voidsetOpposite(Property property) INTERNAL: Set the opposite Property.voidsetPropertyValues(Map properties) INTERNAL:voidsetReadOnly(boolean readOnly) INTERNAL: Set this Property as read-only Property.voidsetSubstitutable(boolean substitutable) voidsetSubstitutableElements(Collection<SDOProperty> elements) voidINTERNAL: Assign a Type to this Property.voidvoidsetValueProperty(boolean valueProperty) INTERNAL:voidsetXmlMapping(org.eclipse.persistence.mappings.DatabaseMapping xmlMapping) INTERNAL:voidsetXsd(boolean xsd) INTERNAL: Set if this property was declared in an XML schema.voidsetXsdLocalName(String xsdLocalName) INTERNAL: Set the local name of this property.voidsetXsdType(QName xsdType) INTERNAL:
-
Constructor Details
-
SDOProperty
-
SDOProperty
-
SDOProperty
-
SDOProperty
-
SDOProperty
-
-
Method Details
-
getName
Returns the name of the Property. -
getType
Returns the type of the Property. -
isMany
public boolean isMany()Returns whether the Property is many-valued. -
isOpenContent
public boolean isOpenContent()Return whether or not this is an open content property.- Specified by:
isOpenContentin interfaceProperty- Returns:
- true if this property is an open content property.
-
isContainment
public boolean isContainment()Returns whether the Property is containment, i.e., whether it represents by-value composition.- Specified by:
isContainmentin interfaceProperty- Returns:
trueif the Property is containment.
-
getContainingType
Returns the containing type of this Property.- Specified by:
getContainingTypein interfaceProperty- Returns:
- the Property's containing type.
- See Also:
-
getDefault
Returns the default value this Property will have in adata objectwhere the Property hasn't been set.- Specified by:
getDefaultin interfaceProperty- Returns:
- the default value.
-
isReadOnly
public boolean isReadOnly()Returns true if values for this Property cannot be modified using the SDO APIs. When true, DataObject.set(Property property, Object value) throws an exception. Values may change due to other factors, such as services operating on DataObjects.- Specified by:
isReadOnlyin interfaceProperty- Returns:
- true if values for this Property cannot be modified.
-
getOpposite
Returns the opposite Property if the Property is bi-directional or null otherwise.- Specified by:
getOppositein interfaceProperty- Returns:
- the opposite Property if the Property is bi-directional or null
-
hasAliasNames
public boolean hasAliasNames() -
getAliasNames
Return a list of alias names for this Property.- Specified by:
getAliasNamesin interfaceProperty- Returns:
- a list of alias names for this Property.
-
setName
INTERNAL: Assign a string as a unique name of this Property among Properties that belongs to a DataObject.- Parameters:
name- a string representing unique name of a property of a DataObject.
-
setType
INTERNAL: Assign a Type to this Property.- Parameters:
type- the type of this property.
-
setContainment
public void setContainment(boolean containment) INTERNAL: Set this Property's Containment which shows parent-child relationship in a tree of DataObjects.- Parameters:
containment- a boolean value showing if this Property is containment.
-
setMany
public void setMany(boolean many) INTERNAL: Set this property as single-valued(false) or many-valued(true). Default is false.- Parameters:
many- a boolean value if this property is many-valued or not.
-
setReadOnly
public void setReadOnly(boolean readOnly) INTERNAL: Set this Property as read-only Property.- Parameters:
readOnly- boolean value implying this Property is readonly.
-
setAliasNames
INTERNAL: Set this Property's alias name list which are unique within the Type.- Parameters:
names- a list of alias name of this Property.
-
setContainingType
INTERNAL: Set the containing type of this Property.- Parameters:
type- a Type which is the containing type of this Property
-
setDefault
INTERNAL: Set the default value of this Property.- Parameters:
aDefaultValue- an Object to be the default value of this type.
-
setOpposite
INTERNAL: Set the opposite Property. If not null then this Property is a of a bi-directional Property.- Parameters:
property- the opposite Property if the Property is bi-directional, otherwise null
-
setXsd
public void setXsd(boolean xsd) INTERNAL: Set if this property was declared in an XML schema.- Parameters:
xsd- a boolean representing if this property was declared in an XML schema
-
isXsd
public boolean isXsd()INTERNAL: Returns if this property was declared in an XML schema. Defaults to false.- Returns:
- if this property was declared in an XML schema
-
setXsdLocalName
INTERNAL: Set the local name of this property.- Parameters:
xsdLocalName- a String representing the local name of this property if it was declared in an XML schema
-
getXsdLocalName
INTERNAL: Returns the local name of the Property.- Returns:
- the local name of the property.
-
setNamespaceQualified
public void setNamespaceQualified(boolean namespaceQualified) INTERNAL: Set if the element or attribute corresponding to this Property is namespace qualified in the XSD.- Parameters:
namespaceQualified- a boolean representing if the element or attribute corresponding to this Property is namespace qualified in the XSD.
-
isNamespaceQualified
public boolean isNamespaceQualified()INTERNAL: Returns if the element or attribute corresponding to this Property should be namespace qualified in the XSD.- Returns:
- if the element or attribute corresponding to this Property should be namespace qualified in the XSD.
-
setXmlMapping
public void setXmlMapping(org.eclipse.persistence.mappings.DatabaseMapping xmlMapping) INTERNAL: -
getXmlMapping
public org.eclipse.persistence.mappings.DatabaseMapping getXmlMapping()INTERNAL: -
setGlobal
public void setGlobal(boolean global) INTERNAL: -
isGlobal
public boolean isGlobal()INTERNAL: -
isElement
INTERNAL: Return true if the property is an element, false if the property is an attribute, and null if it has not been specified. This property has been added as a performance optimization to reduce the number of Maps created for the propertyValues property. -
buildMapping
INTERNAL: -
buildMapping
INTERNAL: -
buildChangeSummaryMapping
public void buildChangeSummaryMapping()INTERNAL: -
addMappingToOwner
public void addMappingToOwner(boolean sdoMethodAttributeAccessor, int indexToAdd) INTERNAL: -
getXPath
INTERNAL: -
getQualifiedXPath
INTERNAL: -
get
Description copied from interface:PropertyReturns the value of the specified instance property of this Property.- Specified by:
getin interfaceProperty- Parameters:
property- one of the properties returned byProperty.getInstanceProperties().- Returns:
- the value of the specified property.
- See Also:
-
getInstanceProperties
Description copied from interface:PropertyReturns a read-only List of instance Properties available on this Property.This list includes, at a minimum, any open content properties (extensions) added to the object before
defining the Property's Type. Implementations may, but are not required to in the 2.1 version of SDO, provide additional instance properties.- Specified by:
getInstancePropertiesin interfaceProperty- Returns:
- the List of instance Properties on this Property.
-
setPropertyValues
INTERNAL: -
getPropertyValues
INTERNAL: -
setInstanceProperty
-
setIndexInType
public void setIndexInType(int indexInType) INTERNAL: -
getIndexInType
public int getIndexInType()INTERNAL: -
incrementIndexInType
public void incrementIndexInType()INTERNAL: -
setNullable
public void setNullable(boolean nullable) INTERNAL: -
isNullable
public boolean isNullable()Description copied from interface:PropertyReturns whether or not instances of this property can be set to null. The effect of calling set(null) on a non-nullable property is not specified by SDO.- Specified by:
isNullablein interfaceProperty- Returns:
- true if this property is nullable.
-
setXsdType
INTERNAL: -
getXsdType
INTERNAL: -
getMimeTypePolicy
public org.eclipse.persistence.oxm.mappings.MimeTypePolicy getMimeTypePolicy()INTERNAL: -
setIndexInDeclaredProperties
public void setIndexInDeclaredProperties(int indexInDeclaredProperties) INTERNAL: -
getIndexInDeclaredProperties
public int getIndexInDeclaredProperties()INTERNAL: -
setValueProperty
public void setValueProperty(boolean valueProperty) INTERNAL: -
isValueProperty
public boolean isValueProperty()INTERNAL: -
setAppInfoElements
INTERNAL: -
getAppInfoElements
INTERNAL: -
getAppInfoMap
INTERNAL: -
setNameCollision
public void setNameCollision(boolean nameCollision) -
isNameCollision
public boolean isNameCollision() -
isDefaultSet
public boolean isDefaultSet()INTERNAL: Return whether the default value has been set by the schema either via a define by an XSD or a DataObject.- Returns:
- isDefaultSet
-
setUri
-
getUri
-
buildXMLFragmentMapping
-
buildXMLFragmentCollectionMapping
public org.eclipse.persistence.oxm.mappings.XMLFragmentCollectionMapping buildXMLFragmentCollectionMapping(String mappingUri) -
isSubstitutable
public boolean isSubstitutable() -
setSubstitutable
public void setSubstitutable(boolean substitutable) -
getSubstitutableElements
-
setSubstitutableElements
-
setFinalized
public void setFinalized(boolean isFinalized) -
isFinalized
public boolean isFinalized() -
hashCode
public int hashCode()Return a unique hashCode (as an int) for this instance. -
equals
Indicate if a given SDOProperty instance is equal to this instance. Equality is determined based on name, uri, and type. In addition, checking will be done to ensure that both properties are to be serialized in the same manner, ie. both to XML element or both to XML attribute.
-