Package com.db4o.ext

Interface StoredClass

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 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 name)
      renames this stored class.
      StoredField storedField​(java.lang.String name, java.lang.Object type)
      returns an existing stored field of this stored class.
    • Method Detail

      • getName

        java.lang.String getName()
        returns the name of this stored class.
      • getIDs

        long[] getIDs()
        returns an array of IDs of all stored object instances of this stored class.
      • getParentStoredClass

        StoredClass getParentStoredClass()
        returns the StoredClass for the parent of the class, this StoredClass represents.
      • getStoredFields

        StoredField[] getStoredFields()
        returns all stored fields of this stored class.
      • hasClassIndex

        boolean hasClassIndex()
        returns true if this StoredClass has a class index.
      • rename

        void rename​(java.lang.String name)
        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]

        Parameters:
        name - the new name
      • storedField

        StoredField storedField​(java.lang.String name,
                                java.lang.Object type)
        returns an existing stored field of this stored class.
        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
      • instanceCount

        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.
        Returns:
        The number of instances