Package org.eclipse.persistence.sdo
Class SDOType
- java.lang.Object
-
- org.eclipse.persistence.sdo.SDOType
-
- All Implemented Interfaces:
commonj.sdo.Type,java.io.Serializable
- Direct Known Subclasses:
SDOChangeSummaryType,SDODataObjectType,SDODataType,SDOObjectType,SDOOpenSequencedType,SDOPropertyType,SDOTypeType,SDOWrapperType,SDOXMLHelperLoadOptionsType
public class SDOType extends java.lang.Object implements commonj.sdo.Type, java.io.Serializable- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSDOType.TypeInstantiationPolicy
-
Field Summary
Fields Modifier and Type Field Description protected commonj.sdo.helper.HelperContextaHelperContextprotected booleanisDataTypeprotected java.lang.ClassjavaImplClassprotected org.eclipse.persistence.oxm.XMLDescriptorxmlDescriptor
-
Constructor Summary
Constructors Modifier Constructor Description SDOType(commonj.sdo.helper.HelperContext helperContext)SDOType(java.lang.String uri, java.lang.String type_name)INTERNAL: Build up a Type with given name and uri and a default static HelperContext.SDOType(java.lang.String uri, java.lang.String name, SDOTypeHelper sdoTypeHelper)Build up a Type with given name and uriprotectedSDOType(java.lang.String uri, java.lang.String name, SDOTypeHelper sdoTypeHelper, org.eclipse.persistence.oxm.XMLDescriptor xmlDescriptor)SDOType(SDOTypeHelper sdoTypeHelper)protectedSDOType(SDOTypeHelper sdoTypeHelper, org.eclipse.persistence.oxm.XMLDescriptor xmlDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAliasName(java.lang.String name)INTERNAL: Assign a unique string to a type, which belongs to same uri, among types.voidaddBaseType(SDOType type)INTERNAL:voidaddDeclaredProperty(commonj.sdo.Property property)INTERNAL:voidaddDeclaredProperty(commonj.sdo.Property property, int index)INTERNAL:voidaddDeclaredProperty(SDOProperty property)INTERNAL:voidaddDeclaredProperty(SDOProperty property, int index)INTERNAL:java.lang.Objectget(commonj.sdo.Property property)java.util.ListgetAliasNames()java.util.ListgetAppInfoElements()INTERNAL:java.util.MapgetAppInfoMap()INTERNAL:java.util.ListgetBaseTypes()SDOPropertygetChangeSummaryProperty()INTERNAL:java.util.ListgetDeclaredProperties()java.util.MapgetDeclaredPropertiesMap()INTERNAL:commonj.sdo.helper.HelperContextgetHelperContext()Return the HelperContext object associated with this type.java.lang.ClassgetImplClass()INTERNAL:java.lang.StringgetImplClassName()INTERNAL:java.lang.ClassgetInstanceClass()java.lang.StringgetInstanceClassName()INTERNAL: Returns the Java class name that this type represents.java.util.ListgetInstanceProperties()java.lang.StringgetName()java.util.ListgetNonFinalizedMappingURIs()INTERNAL:java.util.ListgetNonFinalizedReferencingProps()INTERNAL:java.util.ListgetProperties()SDOProperty[]getPropertiesArray()INTERNAL:SDOPropertygetProperty(java.lang.String propertyName)java.util.MapgetPropertyValues()INTERNAL:java.lang.ObjectgetPseudoDefault()INTERNAL: Return the wrapped initial value for the primitive numeric (when not defined) See p.45 of Java Spec 4th edition.javax.xml.namespace.QNamegetQName()java.util.ListgetSubTypes()INTERNAL:java.lang.StringgetURI()org.eclipse.persistence.oxm.XMLDescriptorgetXmlDescriptor()java.lang.StringgetXsdLocalName()INTERNAL: Returns the local name of the Property.javax.xml.namespace.QNamegetXsdType()INTERNAL:voidinitializeNamespaces(java.util.List namespaceResolvers)INTERNAL: Get the XMLDescriptor associated with this Type or generate a new one.booleanisAbstract()booleanisBaseType()INTERNAL: Provide a means to determine if this type has sub types without causing the sub types property to be initialized.booleanisChangeSummaryType()booleanisDataObjectType()booleanisDataType()booleanisFinalized()INTERNAL:booleanisInstance(java.lang.Object object)booleanisOpen()booleanisOpenSequencedType()booleanisSequenced()booleanisSubType()INTERNAL: Provide a means to determine if this type has base types without causing the base types property to be initialized.booleanisTypeType()booleanisWrapperType()booleanisXsd()INTERNAL: Returns if this property was declared in an XML schema.booleanisXsdList()INTERNAL: Indicates if this Type is an xsd:list in the schemavoidpostInitialize()INTERNAL:voidpreInitialize(java.lang.String packageName, java.util.List namespaceResolvers)INTERNAL: For this Type generate classesvoidremoveDeclaredProperties(commonj.sdo.Property p)INTERNAL:voidsetAbstract(boolean makeAbstract)INTERNAL: Change this Type's abstract setting.voidsetAliasNames(java.util.List names)INTERNAL: Assign a list of alias names to a type, which are unique in URI.voidsetAppInfoElements(java.util.List appInfoElementsList)INTERNAL:voidsetBaseTypes(java.util.List bTypes)INTERNAL: Set a list of Types as This Type's base Types.voidsetDataType(boolean datatype)INTERNAL: Set this Type to a simple Type by passing in boolean value true.voidsetFinalized(boolean bFinalized)INTERNAL:voidsetImplClassName(java.lang.String implClassName)INTERNAL:voidsetInstanceClass(java.lang.Class aClass)INTERNAL: Sets the Java class that this type represents.voidsetInstanceClassName(java.lang.String instanceClassName)INTERNAL: Sets the name of the Java class that this type represents.voidsetInstanceProperty(commonj.sdo.Property property, java.lang.Object value)INTERNAL:voidsetMixed(boolean isMixed)voidsetNonFinalizedMappingURIs(java.util.List nonFinalizedMappingURIsList)INTERNAL:voidsetNonFinalizedReferencingProps(java.util.List nonFinalizedReferencingProps)INTERNAL:voidsetOpen(boolean bOpen)INTERNAL: Make this Type an opened Type to allow open content by assigning true value or a Type not to accept any additional properties by assigning false value,isOpen().voidsetPropertyValues(java.util.Map properties)INTERNAL:voidsetPseudoDefault(java.lang.Object anObject)INTERNAL: Set an Object wrapper around primitive numeric typesvoidsetQName(javax.xml.namespace.QName qName)voidsetSequenced(boolean sequenced)INTERNAL: If set as true, this Type specifies Sequenced DataObjects.voidsetSubTypes(java.util.List subTypesList)INTERNAL:voidsetupInheritance(SDOType parentType)voidsetXmlDescriptor(org.eclipse.persistence.oxm.XMLDescriptor anXMLDescriptor)INTERNAL: Set the XMLDescriptor on this TypevoidsetXsd(boolean bXsd)INTERNAL: Set if this property was declared in an XML schema.voidsetXsdList(boolean anXsdList)INTERNAL: Set if this type is an xsd:list in the schemavoidsetXsdLocalName(java.lang.String xsdLocalNameString)INTERNAL: Set the local name of this property.voidsetXsdType(javax.xml.namespace.QName xsdTypeQName)INTERNAL:
-
-
-
Constructor Detail
-
SDOType
public SDOType(commonj.sdo.helper.HelperContext helperContext)
-
SDOType
public SDOType(SDOTypeHelper sdoTypeHelper)
-
SDOType
protected SDOType(SDOTypeHelper sdoTypeHelper, org.eclipse.persistence.oxm.XMLDescriptor xmlDescriptor)
-
SDOType
public SDOType(java.lang.String uri, java.lang.String type_name)INTERNAL: Build up a Type with given name and uri and a default static HelperContext. UseSDOType(String, String, org.eclipse.persistence.sdo.helper.SDOTypeHelper)instead- Parameters:
uri- the URI of this typetype_name- the unique of this Type
-
SDOType
public SDOType(java.lang.String uri, java.lang.String name, SDOTypeHelper sdoTypeHelper)Build up a Type with given name and uri- Parameters:
uri- the URI of this typename- the unique of this TypesdoTypeHelper- the current HelperContext
-
SDOType
protected SDOType(java.lang.String uri, java.lang.String name, SDOTypeHelper sdoTypeHelper, org.eclipse.persistence.oxm.XMLDescriptor xmlDescriptor)
-
-
Method Detail
-
getQName
public javax.xml.namespace.QName getQName()
-
setQName
public void setQName(javax.xml.namespace.QName qName)
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacecommonj.sdo.Type
-
getURI
public java.lang.String getURI()
- Specified by:
getURIin interfacecommonj.sdo.Type
-
getInstanceClass
public java.lang.Class getInstanceClass()
- Specified by:
getInstanceClassin interfacecommonj.sdo.Type
-
isInstance
public boolean isInstance(java.lang.Object object)
- Specified by:
isInstancein interfacecommonj.sdo.Type
-
getProperties
public java.util.List getProperties()
- Specified by:
getPropertiesin interfacecommonj.sdo.Type
-
getProperty
public SDOProperty getProperty(java.lang.String propertyName)
- Specified by:
getPropertyin interfacecommonj.sdo.Type
-
isDataType
public boolean isDataType()
- Specified by:
isDataTypein interfacecommonj.sdo.Type
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacecommonj.sdo.Type
-
isSequenced
public boolean isSequenced()
- Specified by:
isSequencedin interfacecommonj.sdo.Type
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfacecommonj.sdo.Type
-
getBaseTypes
public java.util.List getBaseTypes()
- Specified by:
getBaseTypesin interfacecommonj.sdo.Type
-
isSubType
public boolean isSubType()
INTERNAL: Provide a means to determine if this type has base types without causing the base types property to be initialized.
-
getDeclaredProperties
public java.util.List getDeclaredProperties()
- Specified by:
getDeclaredPropertiesin interfacecommonj.sdo.Type
-
getAliasNames
public java.util.List getAliasNames()
- Specified by:
getAliasNamesin interfacecommonj.sdo.Type
-
addAliasName
public void addAliasName(java.lang.String name)
INTERNAL: Assign a unique string to a type, which belongs to same uri, among types.- Parameters:
name- a unique string representing a type.
-
setAliasNames
public void setAliasNames(java.util.List names)
INTERNAL: Assign a list of alias names to a type, which are unique in URI.- Parameters:
names- a unique string representing a type.
-
setOpen
public void setOpen(boolean bOpen)
INTERNAL: Make this Type an opened Type to allow open content by assigning true value or a Type not to accept any additional properties by assigning false value,isOpen().- Parameters:
bOpen- boolean value implying if this Type is open
-
setAbstract
public void setAbstract(boolean makeAbstract)
INTERNAL: Change this Type's abstract setting. If it is true, this Type can't be instantiated and typically serve as base Type.- Parameters:
makeAbstract- boolean value implying if this Type is abstract.
-
setSequenced
public void setSequenced(boolean sequenced)
INTERNAL: If set as true, this Type specifies Sequenced DataObjects.- Parameters:
sequenced- boolean value implying if this type is sequenced.
-
setMixed
public void setMixed(boolean isMixed)
-
setDataType
public void setDataType(boolean datatype)
INTERNAL: Set this Type to a simple Type by passing in boolean value true. Otherwise, If boolean value is passed in, instances of this type implement DataObject.- Parameters:
datatype- boolean value implying if it is a simple Type
-
setBaseTypes
public void setBaseTypes(java.util.List bTypes)
INTERNAL: Set a list of Types as This Type's base Types.- Parameters:
bTypes- a list types to become this Type's base Type.
-
addBaseType
public void addBaseType(SDOType type)
INTERNAL:- Parameters:
type- a type to become this Type's base Type.
-
setInstanceClass
public void setInstanceClass(java.lang.Class aClass)
INTERNAL: Sets the Java class that this type represents.- Parameters:
aClass- the Java class that this type represents.
-
setXsd
public void setXsd(boolean bXsd)
INTERNAL: Set if this property was declared in an XML schema.- Parameters:
bXsd- 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
public void setXsdLocalName(java.lang.String xsdLocalNameString)
INTERNAL: Set the local name of this property.- Parameters:
xsdLocalNameString- a String representing the local name of this property if it was declared in an XML schema
-
getXsdLocalName
public java.lang.String getXsdLocalName()
INTERNAL: Returns the local name of the Property.- Returns:
- the local name of the property.
-
addDeclaredProperty
public void addDeclaredProperty(commonj.sdo.Property property)
INTERNAL:- Parameters:
property-
-
addDeclaredProperty
public void addDeclaredProperty(SDOProperty property)
INTERNAL:- Parameters:
property-
-
addDeclaredProperty
public void addDeclaredProperty(commonj.sdo.Property property, int index)INTERNAL:- Parameters:
property-
-
addDeclaredProperty
public void addDeclaredProperty(SDOProperty property, int index)
INTERNAL:- Parameters:
property-
-
removeDeclaredProperties
public void removeDeclaredProperties(commonj.sdo.Property p)
INTERNAL:
-
getDeclaredPropertiesMap
public java.util.Map getDeclaredPropertiesMap()
INTERNAL:
-
setInstanceClassName
public void setInstanceClassName(java.lang.String instanceClassName)
INTERNAL: Sets the name of the Java class that this type represents.- Parameters:
instanceClassName- the Java class that this type represents.
-
getInstanceClassName
public java.lang.String getInstanceClassName()
INTERNAL: Returns the Java class name that this type represents.- Returns:
- the Java class name.
-
setXsdList
public void setXsdList(boolean anXsdList)
INTERNAL: Set if this type is an xsd:list in the schema- Parameters:
anXsdList- a boolean representing if this type represents an xsd:list in the schema
-
isXsdList
public boolean isXsdList()
INTERNAL: Indicates if this Type is an xsd:list in the schema- Returns:
- true if this Type represents an xsd:list in the schema
-
setXmlDescriptor
public void setXmlDescriptor(org.eclipse.persistence.oxm.XMLDescriptor anXMLDescriptor)
INTERNAL: Set the XMLDescriptor on this Type- Parameters:
anXMLDescriptor-
-
getXmlDescriptor
public org.eclipse.persistence.oxm.XMLDescriptor getXmlDescriptor()
-
initializeNamespaces
public void initializeNamespaces(java.util.List namespaceResolvers)
INTERNAL: Get the XMLDescriptor associated with this Type or generate a new one.
-
setupInheritance
public void setupInheritance(SDOType parentType)
-
preInitialize
public void preInitialize(java.lang.String packageName, java.util.List namespaceResolvers)INTERNAL: For this Type generate classes- Parameters:
packageName-namespaceResolvers-
-
postInitialize
public void postInitialize()
INTERNAL:
-
setImplClassName
public void setImplClassName(java.lang.String implClassName)
INTERNAL:
-
getImplClassName
public java.lang.String getImplClassName()
INTERNAL:
-
getImplClass
public java.lang.Class getImplClass()
INTERNAL:
-
get
public java.lang.Object get(commonj.sdo.Property property)
- Specified by:
getin interfacecommonj.sdo.Type
-
getInstanceProperties
public java.util.List getInstanceProperties()
- Specified by:
getInstancePropertiesin interfacecommonj.sdo.Type
-
setPropertyValues
public void setPropertyValues(java.util.Map properties)
INTERNAL:
-
getPropertyValues
public java.util.Map getPropertyValues()
INTERNAL:
-
setInstanceProperty
public void setInstanceProperty(commonj.sdo.Property property, java.lang.Object value)INTERNAL:- Parameters:
property-value-
-
getChangeSummaryProperty
public SDOProperty getChangeSummaryProperty()
INTERNAL:
-
getPropertiesArray
public SDOProperty[] getPropertiesArray()
INTERNAL:
-
setSubTypes
public void setSubTypes(java.util.List subTypesList)
INTERNAL:
-
getSubTypes
public java.util.List getSubTypes()
INTERNAL:
-
isBaseType
public boolean isBaseType()
INTERNAL: Provide a means to determine if this type has sub types without causing the sub types property to be initialized.
-
setXsdType
public void setXsdType(javax.xml.namespace.QName xsdTypeQName)
INTERNAL:
-
getXsdType
public javax.xml.namespace.QName getXsdType()
INTERNAL:
-
setFinalized
public void setFinalized(boolean bFinalized)
INTERNAL:
-
isFinalized
public boolean isFinalized()
INTERNAL:
-
setNonFinalizedReferencingProps
public void setNonFinalizedReferencingProps(java.util.List nonFinalizedReferencingProps)
INTERNAL:
-
getNonFinalizedReferencingProps
public java.util.List getNonFinalizedReferencingProps()
INTERNAL:
-
setNonFinalizedMappingURIs
public void setNonFinalizedMappingURIs(java.util.List nonFinalizedMappingURIsList)
INTERNAL:
-
getNonFinalizedMappingURIs
public java.util.List getNonFinalizedMappingURIs()
INTERNAL:
-
setAppInfoElements
public void setAppInfoElements(java.util.List appInfoElementsList)
INTERNAL:
-
getAppInfoElements
public java.util.List getAppInfoElements()
INTERNAL:
-
getAppInfoMap
public java.util.Map getAppInfoMap()
INTERNAL:
-
getPseudoDefault
public java.lang.Object getPseudoDefault()
INTERNAL: Return the wrapped initial value for the primitive numeric (when not defined) See p.45 of Java Spec 4th edition. See p.85 Sect 9.3 of the SDO Spec.- Returns:
- aDefault Object (primitive numerics) or null (DataObjects, String, Lists)
-
setPseudoDefault
public void setPseudoDefault(java.lang.Object anObject)
INTERNAL: Set an Object wrapper around primitive numeric types- Parameters:
anObject-
-
getHelperContext
public commonj.sdo.helper.HelperContext getHelperContext()
Return the HelperContext object associated with this type. For example, the typeHelper associated with the returned HelperContext would contain this type
-
isChangeSummaryType
public boolean isChangeSummaryType()
-
isDataObjectType
public boolean isDataObjectType()
-
isTypeType
public boolean isTypeType()
-
isOpenSequencedType
public boolean isOpenSequencedType()
-
isWrapperType
public boolean isWrapperType()
-
-