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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.datanucleus.store.StoreData

        org.datanucleus.store.StoreData.Type
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected DatastoreIdentifier tableIdentifier  
      protected java.lang.String tableName  
      protected boolean tableOwner  
      • Fields inherited from class org.datanucleus.store.StoreData

        interfaceName, metadata, name, properties, table, type
    • Constructor Summary

      Constructors 
      Constructor Description
      RDBMSStoreData​(java.lang.String name, java.lang.String tableName, boolean tableOwner, org.datanucleus.store.StoreData.Type type, java.lang.String interfaceName)
      Constructor.
      RDBMSStoreData​(org.datanucleus.metadata.AbstractMemberMetaData mmd, Table table)
      Constructor for SCO data.
      RDBMSStoreData​(org.datanucleus.metadata.ClassMetaData cmd, Table table, boolean tableOwner)
      Constructor for FCO data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DatastoreIdentifier getDatastoreIdentifier()
      Accessor for the identifier for the table.
      java.lang.String getTableName()
      Accessor for tableName.
      boolean hasTable()
      Accessor for whether this has a table representation.
      boolean isTableOwner()
      Accessor for whether this class is the owner of the table.
      boolean mapsToView()
      Utility to return whether this table is a view.
      void setDatastoreContainerObject​(DatastoreClass table)
      Convenience to set the table.
      java.lang.String toString()
      Method to return this class/field managed object as a string.
      • Methods inherited from class org.datanucleus.store.StoreData

        addProperty, getInterfaceName, getMetaData, getName, getProperties, getProperty, getTable, getType, isFCO, isSCO, setMetaData, setTable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • tableName

        protected java.lang.String tableName
      • tableOwner

        protected boolean tableOwner
    • Constructor Detail

      • RDBMSStoreData

        public RDBMSStoreData​(java.lang.String name,
                              java.lang.String tableName,
                              boolean tableOwner,
                              org.datanucleus.store.StoreData.Type type,
                              java.lang.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 java.lang.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 java.lang.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.