Class StoredClassImpl

  • All Implemented Interfaces:
    StoredClass

    public class StoredClassImpl
    extends java.lang.Object
    implements StoredClass
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      long[] getIDs()
      returns an array of IDs of all stored object instances of this stored class.
      java.lang.String getName()
      returns the name of this stored class.
      StoredClass getParentStoredClass()
      returns the StoredClass for the parent of the class, this StoredClass represents.
      StoredField[] getStoredFields()
      returns all stored fields of this stored class.
      boolean hasClassIndex()
      returns true if this StoredClass has a class index.
      int hashCode()  
      int instanceCount()
      Returns the number of instances of this class that have been persisted to the database, as seen by the transaction (container) that produces this StoredClass instance.
      void rename​(java.lang.String newName)
      renames this stored class.
      StoredField storedField​(java.lang.String name, java.lang.Object type)
      returns an existing stored field of this stored class.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • getIDs

        public long[] getIDs()
        Description copied from interface: StoredClass
        returns an array of IDs of all stored object instances of this stored class.
        Specified by:
        getIDs in interface StoredClass
      • getName

        public java.lang.String getName()
        Description copied from interface: StoredClass
        returns the name of this stored class.
        Specified by:
        getName in interface StoredClass
      • hasClassIndex

        public boolean hasClassIndex()
        Description copied from interface: StoredClass
        returns true if this StoredClass has a class index.
        Specified by:
        hasClassIndex in interface StoredClass
      • rename

        public void rename​(java.lang.String newName)
        Description copied from interface: StoredClass
        renames this stored class.

        After renaming one or multiple classes the ObjectContainer has to be closed and reopened to allow internal caches to be refreshed.

        .NET: As the name you should provide [Classname, Assemblyname]

        Specified by:
        rename in interface StoredClass
        Parameters:
        newName - the new name
      • storedField

        public StoredField storedField​(java.lang.String name,
                                       java.lang.Object type)
        Description copied from interface: StoredClass
        returns an existing stored field of this stored class.
        Specified by:
        storedField in interface StoredClass
        Parameters:
        name - the name of the field
        type - the type of the field. There are four possibilities how to supply the type:
        - a Class object. (.NET: a Type object)
        - a fully qualified classname.
        - any object to be used as a template.

        - null, if the first found field should be returned.
        Returns:
        the StoredField
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • instanceCount

        public int instanceCount()
        Description copied from interface: StoredClass
        Returns the number of instances of this class that have been persisted to the database, as seen by the transaction (container) that produces this StoredClass instance.
        Specified by:
        instanceCount in interface StoredClass
        Returns:
        The number of instances