Class InterfaceContainerPolicy

    • Field Detail

      • containerClass

        protected Class containerClass
        The concrete container class.
      • containerClassName

        protected String containerClassName
      • cloneMethod

        protected transient Method cloneMethod
        The method which will return a clone of an instance of the containerClass.
    • Constructor Detail

      • InterfaceContainerPolicy

        public InterfaceContainerPolicy()
        INTERNAL: Construct a new policy.
      • InterfaceContainerPolicy

        public InterfaceContainerPolicy​(Class containerClass)
        INTERNAL: Construct a new policy for the specified class.
      • InterfaceContainerPolicy

        public InterfaceContainerPolicy​(String containerClassName)
        INTERNAL: Construct a new policy for the specified class name.
    • Method Detail

      • equals

        public boolean equals​(Object object)
        INTERNAL: Return if the policy is equal to the other. By default if they are the same class, they are considered equal. This is used for query parse caching.
        Overrides:
        equals in class ContainerPolicy
      • convertClassNamesToClasses

        public void convertClassNamesToClasses​(ClassLoader classLoader)
        INTERNAL: Convert all the class-name-based settings in this ContainerPolicy to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
        Overrides:
        convertClassNamesToClasses in class ContainerPolicy
        Parameters:
        classLoader -
      • createQueryKeyForMapKey

        public QueryKey createQueryKeyForMapKey()
        INTERNAL: Create a query key that links to the map key InterfaceContainerPolicy does not support maps, so this method will return null subclasses will extend this method.
      • getCloneMethod

        public Method getCloneMethod()
        INTERNAL: Return the 'clone()' Method for the container class. Lazy initialization is used, so we can serialize these things.
      • getCloneMethod

        protected Method getCloneMethod​(Class javaClass)
        INTERNAL: Return the 'clone()' Method for the specified class. Return null if the method does not exist anywhere in the hierarchy
      • getDirectKeyField

        public DatabaseField getDirectKeyField​(CollectionMapping mapping)
        INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping. If the keyMapping is not a DirectMapping, this will return null.
      • getInterfaceType

        public abstract Class getInterfaceType()
      • invokeCloneMethodOn

        protected Object invokeCloneMethodOn​(Method method,
                                             Object container)
        INTERNAL: Invoke the specified clone method on the container, handling the necessary exceptions.
      • isMapKeyAttribute

        public boolean isMapKeyAttribute()
        INTERNAL: Return whether a map key this container policy represents is an attribute By default this method will return false since only subclasses actually represent maps.
      • setCloneMethod

        public void setCloneMethod​(Method cloneMethod)
        INTERNAL: Set the Method that will return a clone of an instance of the containerClass.