Class ObjectPropertyMapDB

    • Constructor Detail

      • ObjectPropertyMapDB

        public ObjectPropertyMapDB​(DBHandle dbHandle,
                                   int openMode,
                                   ErrorHandler errHandler,
                                   ChangeManager changeMgr,
                                   AddressMap addrMap,
                                   java.lang.String name,
                                   java.lang.Class<? extends Saveable> saveableObjectClass,
                                   TaskMonitor monitor,
                                   boolean supportsPrivate)
                            throws VersionException,
                                   CancelledException,
                                   java.io.IOException
        Construct an Saveable object property map.
        Parameters:
        dbHandle - database handle.
        openMode - the mode that the program was opened in.
        errHandler - database error handler.
        changeMgr - change manager for event notification
        addrMap - address map.
        name - property name.
        monitor - progress monitor that is only used when upgrading
        Throws:
        CancelledException - if the user cancels the upgrade operation.
        java.io.IOException - if a database io error occurs.
        VersionException - the map version is incompatible with the current Saveable object class version. This will never be thrown if upgrade is true.
    • Method Detail

      • getSaveableClassForName

        public static java.lang.Class<? extends Saveable> getSaveableClassForName​(java.lang.String classPath)
        Returns the class for the indicated class path name. If the class can't be determined, the GenericSaveable class is returned.
        Parameters:
        classPath - the class path name of the desired class.
        Returns:
        the class or a GenericSaveable.
      • add

        public void add​(Address addr,
                        Saveable value)
        Description copied from interface: ObjectPropertyMap
        Add an object value at the specified address.
        Specified by:
        add in interface ObjectPropertyMap
        Parameters:
        addr - address for the property
        value - value of the property
      • getObject

        public java.lang.Object getObject​(Address addr)
        Description copied from interface: PropertyMap
        Returns the property value stored at the specified address or null if no property found.
        Specified by:
        getObject in interface PropertyMap
        Parameters:
        addr - property address
        Returns:
        property value
      • applyValue

        public void applyValue​(PropertyVisitor visitor,
                               Address addr)
        Description copied from interface: PropertyMap
        Applies a property value at the indicated address without knowing its type (String, int, long, etc.) by using the property visitor.
        Specified by:
        applyValue in interface PropertyMap
        Parameters:
        visitor - the property visitor that lets you apply the property without knowing its specific type ahead of time.
        addr - the address where the property is to be applied.
      • getPropertyFieldClass

        protected java.lang.Class<?> getPropertyFieldClass()
        NOTE: Custom schema is utilized.
      • createTable

        protected void createTable()
        Create the necessary table(s) to support this property. Schema will vary depending upon Saveable object.