Class MappedClass


  • @Deprecated
    public class MappedClass
    extends java.lang.Object
    Deprecated.
    Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Summary

      Constructors 
      Constructor Description
      MappedClass​(java.lang.Class<?> clazz, Mapper mapper)
      Deprecated.
      Creates a MappedClass instance
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz, java.lang.annotation.Annotation ann)
      Deprecated.
      Adds the given Annotation to the internal list for the given Class.
      static void addInterestingAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
      Deprecated.
      Adds an annotation for Morphia to retain when mapping.
      protected void basicValidate()
      Deprecated.
       
      com.mongodb.DBObject callLifecycleMethods​(java.lang.Class<? extends java.lang.annotation.Annotation> event, java.lang.Object entity, com.mongodb.DBObject dbObj, Mapper mapper)
      Deprecated.
      Call the lifecycle methods
      boolean containsJavaFieldName​(java.lang.String name)
      Deprecated.
      Check java field name that will be stored in mongodb
      protected void discover​(Mapper mapper)
      Deprecated.
      Discovers interesting (that we care about) things about the class.
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      java.lang.annotation.Annotation getAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
      Deprecated.
      Looks for an annotation of the type given
      <T> java.util.List<T> getAnnotations​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
      Deprecated.
      Looks for an annotation in the annotations found on a class while mapping
      java.lang.Class<?> getClazz()
      Deprecated.
       
      java.lang.String getCollectionName()
      Deprecated.
       
      Embedded getEmbeddedAnnotation()
      Deprecated.
       
      Entity getEntityAnnotation()
      Deprecated.
       
      java.util.List<MappedField> getFieldsAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
      Deprecated.
      Returns fields annotated with the clazz
      java.lang.annotation.Annotation getFirstAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
      Deprecated.
      Returns the first found Annotation, or null.
      java.lang.reflect.Field getIdField()
      Deprecated.
       
      MappedField getMappedField​(java.lang.String storedName)
      Deprecated.
      Returns the MappedField by the name that it will stored in mongodb as
      MappedField getMappedFieldByJavaField​(java.lang.String name)
      Deprecated.
      Returns MappedField for a given java field name on the this MappedClass
      MappedField getMappedIdField()
      Deprecated.
       
      MappedField getMappedVersionField()
      Deprecated.
       
      java.util.List<MappedField> getPersistenceFields()
      Deprecated.
       
      java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.util.List<java.lang.annotation.Annotation>> getRelevantAnnotations()
      Deprecated.
       
      MappedClass getSuperClass()
      Deprecated.
      This is an internal method subject to change without notice.
      int hashCode()
      Deprecated.
       
      boolean isAbstract()
      Deprecated.
      This is an internal method subject to change without notice.
      boolean isInterface()
      Deprecated.
       
      static boolean isSupportedType​(java.lang.Class<?> clazz)
      Deprecated.
      Checks to see if it a Map/Set/List or a property supported by the MongoDB java driver
      java.lang.String toString()
      Deprecated.
       
      void update()
      Deprecated.
      Update mappings based on fields/annotations.
      void validate​(Mapper mapper)
      Deprecated.
      Validates this MappedClass
      • Methods inherited from class java.lang.Object

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

      • MappedClass

        public MappedClass​(java.lang.Class<?> clazz,
                           Mapper mapper)
        Deprecated.
        Creates a MappedClass instance
        Parameters:
        clazz - the class to be mapped
        mapper - the Mapper to use
    • Method Detail

      • getSuperClass

        public MappedClass getSuperClass()
        Deprecated.
        This is an internal method subject to change without notice.
        Returns:
        the parent class of this type if there is one null otherwise
        Since:
        1.3
      • isInterface

        public boolean isInterface()
        Deprecated.
        Returns:
        true if the MappedClass is an interface
      • isAbstract

        public boolean isAbstract()
        Deprecated.
        This is an internal method subject to change without notice.
        Returns:
        true if the MappedClass is abstract
        Since:
        1.3
      • isSupportedType

        public static boolean isSupportedType​(java.lang.Class<?> clazz)
        Deprecated.
        Checks to see if it a Map/Set/List or a property supported by the MongoDB java driver
        Parameters:
        clazz - the type to check
        Returns:
        true if the type is supported
      • addInterestingAnnotation

        public static void addInterestingAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
        Deprecated.
        Adds an annotation for Morphia to retain when mapping.
        Parameters:
        annotation - the type to retain
      • addAnnotation

        public void addAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz,
                                  java.lang.annotation.Annotation ann)
        Deprecated.
        Adds the given Annotation to the internal list for the given Class.
        Parameters:
        clazz - the type to add
        ann - the annotation to add
      • callLifecycleMethods

        public com.mongodb.DBObject callLifecycleMethods​(java.lang.Class<? extends java.lang.annotation.Annotation> event,
                                                         java.lang.Object entity,
                                                         com.mongodb.DBObject dbObj,
                                                         Mapper mapper)
        Deprecated.
        Call the lifecycle methods
        Parameters:
        event - the lifecycle annotation
        entity - the entity to process
        dbObj - the dbObject to use
        mapper - the Mapper to use
        Returns:
        dbObj
      • containsJavaFieldName

        public boolean containsJavaFieldName​(java.lang.String name)
        Deprecated.
        Check java field name that will be stored in mongodb
        Parameters:
        name - the name to search for
        Returns:
        true if a Java field with that name is found
      • getAnnotation

        public java.lang.annotation.Annotation getAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
        Deprecated.
        Looks for an annotation of the type given
        Parameters:
        clazz - the type to search for
        Returns:
        the instance if it was found, if more than one was found, the last one added
      • getAnnotations

        public <T> java.util.List<T> getAnnotations​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
        Deprecated.
        Looks for an annotation in the annotations found on a class while mapping
        Type Parameters:
        T - the type of annotation to find
        Parameters:
        clazz - the class to search for
        Returns:
        the instance if it was found, if more than one was found, the last one added
      • getClazz

        public java.lang.Class<?> getClazz()
        Deprecated.
        Returns:
        the clazz
      • getCollectionName

        public java.lang.String getCollectionName()
        Deprecated.
        Returns:
        the collName
      • getEmbeddedAnnotation

        public Embedded getEmbeddedAnnotation()
        Deprecated.
        Returns:
        the embeddedAn
      • getEntityAnnotation

        public Entity getEntityAnnotation()
        Deprecated.
        Returns:
        the entityAn
      • getFieldsAnnotatedWith

        public java.util.List<MappedField> getFieldsAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
        Deprecated.
        Returns fields annotated with the clazz
        Parameters:
        clazz - The Annotation to find.
        Returns:
        the list of fields
      • getFirstAnnotation

        public java.lang.annotation.Annotation getFirstAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
        Deprecated.
        Returns the first found Annotation, or null.
        Parameters:
        clazz - The Annotation to find.
        Returns:
        First found Annotation or null of none found.
      • getIdField

        public java.lang.reflect.Field getIdField()
        Deprecated.
        Returns:
        the idField
      • getMappedField

        public MappedField getMappedField​(java.lang.String storedName)
        Deprecated.
        Returns the MappedField by the name that it will stored in mongodb as
        Parameters:
        storedName - the name to search for
        Returns:
        true if that mapped field name is found
      • getMappedFieldByJavaField

        public MappedField getMappedFieldByJavaField​(java.lang.String name)
        Deprecated.
        Returns MappedField for a given java field name on the this MappedClass
        Parameters:
        name - the Java field name to search for
        Returns:
        the MappedField for the named Java field
      • getMappedIdField

        public MappedField getMappedIdField()
        Deprecated.
        Returns:
        the ID field for the class
      • getMappedVersionField

        public MappedField getMappedVersionField()
        Deprecated.
        Returns:
        the ID field for the class
      • getPersistenceFields

        public java.util.List<MappedField> getPersistenceFields()
        Deprecated.
        Returns:
        the persistenceFields
      • getRelevantAnnotations

        public java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.util.List<java.lang.annotation.Annotation>> getRelevantAnnotations()
        Deprecated.
        Returns:
        the relevantAnnotations
      • hashCode

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

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

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

        public void update()
        Deprecated.
        Update mappings based on fields/annotations.
      • validate

        public void validate​(Mapper mapper)
        Deprecated.
        Validates this MappedClass
        Parameters:
        mapper - the Mapper to use for validation
      • basicValidate

        protected void basicValidate()
        Deprecated.
      • discover

        protected void discover​(Mapper mapper)
        Deprecated.
        Discovers interesting (that we care about) things about the class.