Class QNameInheritancePolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class QNameInheritancePolicy
    extends InheritancePolicy
    INTERNAL:

    Purpose: A Subclass of Inheritance Policy to be used with XML Descriptors. If the class indicator field is an xsi:type, the value of that field may be a qualified type name. For example xsi:type="myns:my-type-name". Since any given XML document can use different prefixes for these namespaces, we must be able to find the class based on QName instead of just the string "myns:my-type-name".

    Since:
    10.1.3
    Author:
    mmacivor
    See Also:
    Serialized Form
    • Constructor Detail

      • QNameInheritancePolicy

        public QNameInheritancePolicy()
      • QNameInheritancePolicy

        public QNameInheritancePolicy​(ClassDescriptor desc)
    • Method Detail

      • updateTables

        protected void updateTables()
        Override to control order of uniqueTables, child tablenames should be first since getDefaultRootElement on an XMLDescriptor will return the first table.
        Overrides:
        updateTables in class InheritancePolicy
      • initialize

        public void initialize​(AbstractSession session)
        INTERNAL: Initialized the inheritance properties of the descriptor once the mappings are initialized. This is done before formal postInitialize during the end of mapping initialize.
        Overrides:
        initialize in class InheritancePolicy
      • setNamespaceResolver

        public void setNamespaceResolver​(NamespaceResolver resolver)
      • setClassIndicatorFieldName

        public void setClassIndicatorFieldName​(java.lang.String fieldName)
        PUBLIC: To set the class indicator field name. This is the name of the field in the table that stores what type of object this is.
        Overrides:
        setClassIndicatorFieldName in class InheritancePolicy
      • addClassIndicatorFieldToRow

        public void addClassIndicatorFieldToRow​(AbstractRecord databaseRow)
        INTERNAL: Add abstract class indicator information to the database row. This is required when building a row for an insert or an update of a concrete child descriptor.
        Overrides:
        addClassIndicatorFieldToRow in class InheritancePolicy