Class IndexInfo

  • All Implemented Interfaces:
    org.datanucleus.store.schema.StoreSchemaData

    public class IndexInfo
    extends java.lang.Object
    implements org.datanucleus.store.schema.StoreSchemaData
    Represents the metadata of a specific index column. Supports the following properties.
    • table_cat
    • table_schem
    • table_name
    • column_name
    • non_unique
    • index_name
    • type
    • ordinal_position
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hash
      Hashcode.
      (package private) java.util.Map<java.lang.String,​java.lang.Object> properties
      Properties of the index.
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexInfo​(java.sql.ResultSet rs)
      Constructs an index information object from the current row of the given result set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addProperty​(java.lang.String name, java.lang.Object value)
      Method to add a property for the index.
      boolean equals​(java.lang.Object obj)
      Indicates whether some object is "equal to" this one.
      java.lang.Object getProperty​(java.lang.String name)
      Accessor for a property.
      int hashCode()
      Returns a hash code value for this object.
      java.lang.String toString()
      Returns the string representation of this object.
      • Methods inherited from class java.lang.Object

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

      • properties

        java.util.Map<java.lang.String,​java.lang.Object> properties
        Properties of the index.
      • hash

        private int hash
        Hashcode. Set on first use.
    • Constructor Detail

      • IndexInfo

        public IndexInfo​(java.sql.ResultSet rs)
        Constructs an index information object from the current row of the given result set. The ResultSet object passed must have been obtained from a call to java.sql.DatabaseMetaData.getIndexInfo().
        Parameters:
        rs - The result set returned from java.sql.DatabaseMetaData.getIndexInfo().
        Throws:
        org.datanucleus.exceptions.NucleusDataStoreException - if an exception occurs during retrieval
    • Method Detail

      • addProperty

        public void addProperty​(java.lang.String name,
                                java.lang.Object value)
        Method to add a property for the index.
        Specified by:
        addProperty in interface org.datanucleus.store.schema.StoreSchemaData
        Parameters:
        name - Name of property
        value - Its value
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Accessor for a property.
        Specified by:
        getProperty in interface org.datanucleus.store.schema.StoreSchemaData
        Parameters:
        name - Name of the property
        Returns:
        Its value, or null if not defined
      • equals

        public final boolean equals​(java.lang.Object obj)
        Indicates whether some object is "equal to" this one. Two IndexInfo objects are considered equal if their catalog, schema, table, and column names AND index name are all equal.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the reference object with which to compare
        Returns:
        Whether they are equal
      • hashCode

        public final int hashCode()
        Returns a hash code value for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object.
      • toString

        public java.lang.String toString()
        Returns the string representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation of this object.