Class RDBMSStoreData


  • public class RDBMSStoreData
    extends org.datanucleus.store.StoreData
    Representation of a class (FCO) / field (SCO) that is persisted to an RDBMS table. Extends the basic data to allow determination of whether it is a table or a view being represented.
    • Field Detail

      • tableName

        protected String tableName
      • tableOwner

        protected boolean tableOwner
    • Constructor Detail

      • RDBMSStoreData

        public RDBMSStoreData​(String name,
                              String tableName,
                              boolean tableOwner,
                              org.datanucleus.store.StoreData.Type type,
                              String interfaceName)
        Constructor. To be used when creating for the auto-start mechanism.
        Parameters:
        name - Name of the class/field
        tableName - Name of the table associated
        tableOwner - Whether this is the owner
        type - The type (FCO/SCO)
        interfaceName - if this class is an implementation of a persistent interface (multiple persistent interface names are comma separated), otherwise is null.
      • RDBMSStoreData

        public RDBMSStoreData​(org.datanucleus.metadata.ClassMetaData cmd,
                              Table table,
                              boolean tableOwner)
        Constructor for FCO data.
        Parameters:
        cmd - MetaData for the class.
        table - Table where the class is stored.
        tableOwner - Whether the class is the owner of the table.
      • RDBMSStoreData

        public RDBMSStoreData​(org.datanucleus.metadata.AbstractMemberMetaData mmd,
                              Table table)
        Constructor for SCO data. Takes in the meta data for the field, and the table it is mapped to.
        Parameters:
        mmd - MetaData for the field.
        table - Table definition
    • Method Detail

      • mapsToView

        public boolean mapsToView()
        Utility to return whether this table is a view.
        Returns:
        Whether it is for a view.
      • getTableName

        public String getTableName()
        Accessor for tableName.
        Returns:
        Returns the tableName.
      • isTableOwner

        public boolean isTableOwner()
        Accessor for whether this class is the owner of the table.
        Returns:
        Whether it owns the table
      • hasTable

        public boolean hasTable()
        Accessor for whether this has a table representation.
        Returns:
        Whether it has a table
      • getDatastoreIdentifier

        public DatastoreIdentifier getDatastoreIdentifier()
        Accessor for the identifier for the table.
        Returns:
        The table identifier
      • setDatastoreContainerObject

        public void setDatastoreContainerObject​(DatastoreClass table)
        Convenience to set the table. To be used in cases where the table isn't known until after the initial create
        Parameters:
        table - The table
      • toString

        public String toString()
        Method to return this class/field managed object as a string.
        Overrides:
        toString in class org.datanucleus.store.StoreData
        Returns:
        String version of this class/field managed object.