Class ClassMetadata

    • Field Detail

      • _typeHandler

        protected TypeHandler4 _typeHandler
        For reference types, _typeHandler always holds a StandardReferenceTypeHandler that will use the _aspects of this class to take care of its business. A custom type handler would appear as a TypeHandlerAspect in that case. For value types, _typeHandler always holds the actual value type handler be it a custom type handler or a builtin one.
    • Method Detail

      • isInternal

        public boolean isInternal()
      • addFieldIndices

        public final void addFieldIndices​(StatefulBuffer buffer)
      • aspectsAreInitialized

        public boolean aspectsAreInitialized()
      • descendOnCascadingActivation

        public boolean descendOnCascadingActivation()
      • checkType

        public void checkType()
      • isDb4oTypeImpl

        public boolean isDb4oTypeImpl()
      • cascadesOnDeleteOrUpdate

        public boolean cascadesOnDeleteOrUpdate()
      • updateDepthFromConfig

        public final int updateDepthFromConfig()
      • collectConstraints

        public void collectConstraints​(Transaction trans,
                                       QConObject parentConstraint,
                                       java.lang.Object obj,
                                       Visitor4 visitor)
      • collectIDs

        public final void collectIDs​(CollectIdContext context,
                                     java.lang.String fieldName)
      • configOrAncestorConfig

        public Config4Class configOrAncestorConfig()
      • cascadeOnDeleteTernary

        public TernaryBool cascadeOnDeleteTernary()
      • cascadeOnDelete

        public boolean cascadeOnDelete()
      • dispatchEvent

        public final boolean dispatchEvent​(Transaction trans,
                                           java.lang.Object obj,
                                           int message)
      • hasEventRegistered

        public final boolean hasEventRegistered​(Transaction trans,
                                                int eventID)
      • declaredAspectCount

        public final int declaredAspectCount()
      • aspectCount

        public final int aspectCount()
      • generateUUIDs

        public boolean generateUUIDs()
      • generateCommitTimestamps

        public boolean generateCommitTimestamps()
      • getComparableObject

        public java.lang.Object getComparableObject​(java.lang.Object forObject)
      • 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
      • hasClassIndex

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

        public boolean hasVersionField()
      • indexEntryCount

        public int indexEntryCount​(Transaction ta)
      • getName

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

        public FieldMetadata fieldMetadataForName​(java.lang.String name)
      • hasField

        public boolean hasField​(ObjectContainerBase container,
                                java.lang.String fieldName)
        Parameters:
        container -
      • holdsAnyClass

        public boolean holdsAnyClass()
      • onInstantiate

        protected final void onInstantiate​(UnmarshallingContext context,
                                           java.lang.Object obj)
      • instantiateTransient

        public java.lang.Object instantiateTransient​(UnmarshallingContext context)
      • hasObjectConstructor

        public boolean hasObjectConstructor()
      • isTranslated

        public boolean isTranslated()
      • isArray

        public boolean isArray()
      • hasIdentity

        public boolean hasIdentity()
      • isStronglyTyped

        public boolean isStronglyTyped()
        no any, primitive, array or other tricks. overridden in YapClassAny and YapClassPrimitive
      • isValueType

        public boolean isValueType()
      • nameToWrite

        public java.lang.String nameToWrite()
      • callConstructor

        public final boolean callConstructor()
      • readAspectCount

        public final int readAspectCount​(ReadBuffer buffer)
      • 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
      • refresh

        public void refresh()
      • storedField

        public StoredField storedField​(java.lang.String fieldName,
                                       java.lang.Object fieldType)
        Description copied from interface: StoredClass
        returns an existing stored field of this stored class.
        Specified by:
        storedField in interface StoredClass
        Parameters:
        fieldName - the name of the field
        fieldType - 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
      • toString

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

        public boolean isAssignableFrom​(ClassMetadata other)
      • setAncestor

        public void setAncestor​(ClassMetadata ancestor)
      • wrapWithTransactionContext

        public java.lang.Object wrapWithTransactionContext​(Transaction transaction,
                                                           java.lang.Object value)
      • traverseDeclaredFields

        public void traverseDeclaredFields​(Procedure4 procedure)
      • traverseDeclaredAspects

        public void traverseDeclaredAspects​(Procedure4 procedure)
      • aspectsAreNull

        public boolean aspectsAreNull()
      • isModified

        public boolean isModified​(java.lang.Object obj)
      • 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
      • instanceCount

        public int instanceCount​(Transaction trans)
      • isStorable

        public boolean isStorable()
      • isStruct

        public boolean isStruct()
      • dropClassIndex

        public void dropClassIndex()