Class NoneMetaDataFactory

    • Constructor Detail

      • NoneMetaDataFactory

        public NoneMetaDataFactory()
    • Method Detail

      • setStoreDirectory

        public void setStoreDirectory​(java.io.File dir)
        Description copied from interface: MetaDataFactory
        Base directory for storing metadata. May not be called.
        Specified by:
        setStoreDirectory in interface MetaDataFactory
      • setStrict

        public void setStrict​(boolean strict)
        Description copied from interface: MetaDataFactory
        If true, I/O's must exactly obey the mode directives given, and may not load additional information.
        Specified by:
        setStrict in interface MetaDataFactory
      • load

        public void load​(java.lang.Class cls,
                         int mode,
                         java.lang.ClassLoader envLoader)
        Description copied from interface: MetaDataFactory
        Load metadata for the given class in the given mode(s). If loading in MetaDataModes.MODE_QUERY, the class may be null. Loaded metadata should be added directly to the repository. It should have its source mode set appropriately via ClassMetaData.setSourceMode(int).
        Specified by:
        load in interface MetaDataFactory
        mode - the mode to load metadata in: if mapping information is stored together with metadata, then you can load mapping data even if this mode only includes MODE_META, so long as the strict property hasn't been set
      • store

        public boolean store​(ClassMetaData[] metas,
                             QueryMetaData[] queries,
                             SequenceMetaData[] seqs,
                             int mode,
                             java.util.Map output)
        Description copied from interface: MetaDataFactory
        Store the given metadata.
        Specified by:
        store in interface MetaDataFactory
        mode - hint about what aspects of the metadata have changed
        output - if non-null, rather than storing metadata directly, add entries mapping each output destination such as a File to the planned output for that destination in string form
        Returns:
        false if this factory is unable to store metadata
      • drop

        public boolean drop​(java.lang.Class[] cls,
                            int mode,
                            java.lang.ClassLoader envLoader)
        Description copied from interface: MetaDataFactory
        Drop the metadata for the given classes in the given mode(s).
        Specified by:
        drop in interface MetaDataFactory
        Returns:
        false if any metadata could not be dropped
      • getQueryScope

        public java.lang.Class getQueryScope​(java.lang.String queryName,
                                             java.lang.ClassLoader loader)
        Description copied from interface: MetaDataFactory
        Return the type defining the given query name, if any.
        Specified by:
        getQueryScope in interface MetaDataFactory
      • getResultSetMappingScope

        public java.lang.Class getResultSetMappingScope​(java.lang.String resultSetMappingName,
                                                        java.lang.ClassLoader loader)
        Description copied from interface: MetaDataFactory
        Return the type defining the given result set mapping name, if any.
        Specified by:
        getResultSetMappingScope in interface MetaDataFactory
      • newClassArgParser

        public org.apache.openjpa.lib.meta.ClassArgParser newClassArgParser()
        Description copied from interface: MetaDataFactory
        Return a properly-configured class arg parser for our expected metadata format.
        Specified by:
        newClassArgParser in interface MetaDataFactory
      • addClassExtensionKeys

        public void addClassExtensionKeys​(java.util.Collection exts)
        Description copied from interface: MetaDataFactory
        Add any extension keys used by this instance to the given set.
        Specified by:
        addClassExtensionKeys in interface MetaDataFactory
      • addFieldExtensionKeys

        public void addFieldExtensionKeys​(java.util.Collection exts)
        Description copied from interface: MetaDataFactory
        Add any extension keys used by this instance to the given set.
        Specified by:
        addFieldExtensionKeys in interface MetaDataFactory
      • getCallbacksBeforeListeners

        public boolean getCallbacksBeforeListeners​(int type)
        Description copied from interface: MetaDataDefaults
        If callbacks are fired before listeners for the given event type. Defaults to false.
        Specified by:
        getCallbacksBeforeListeners in interface MetaDataDefaults
      • setIgnoreNonPersistent

        public void setIgnoreNonPersistent​(boolean ignore)
        Description copied from interface: MetaDataDefaults
        Whether to ignore members which are not persistent by default during metadata population. Defaults to true.
        Specified by:
        setIgnoreNonPersistent in interface MetaDataDefaults
      • isDataStoreObjectIdFieldUnwrapped

        public boolean isDataStoreObjectIdFieldUnwrapped()
        Description copied from interface: MetaDataDefaults
        Whether the field in the object id class corresponding to a datastore id persistence-capable primary key field is the simple datastore id value of the related instance. Defaults to false.
        Specified by:
        isDataStoreObjectIdFieldUnwrapped in interface MetaDataDefaults
      • getMemberByProperty

        public java.lang.reflect.Member getMemberByProperty​(ClassMetaData meta,
                                                            java.lang.String property,
                                                            int access,
                                                            boolean scan)
        Description copied from interface: MetaDataDefaults
        Get the field or getter for the given attribute of the given class.
        Specified by:
        getMemberByProperty in interface MetaDataDefaults
        Parameters:
        meta - is the declaring class
        property - name of the logical attribute
        access - whether to look for the field of getter method. If unknown, then field or property is chosen based on the access type used by the given class.
        scan - if true and access is unknown then scans the annotation on the member to determine access.
      • getUnimplementedExceptionType

        public java.lang.Class<? extends java.lang.Exception> getUnimplementedExceptionType()
        Description copied from interface: MetaDataDefaults
        Return a runtime exception class to throw for un-implemented managed interface methods.
        Specified by:
        getUnimplementedExceptionType in interface MetaDataDefaults
      • loadXMLMetaData

        public void loadXMLMetaData​(java.lang.Class<?> cls)
        Description copied from interface: MetaDataFactory
        Load XMLClassMetadata for the given class. Loaded metadata should be added directly to the repository.
        Specified by:
        loadXMLMetaData in interface MetaDataFactory
      • getMetaModelClassName

        public java.lang.String getMetaModelClassName​(java.lang.String managedClassName)
        Description copied from interface: MetaDataFactory
        Gets the name of the meta-model class for the given fully-qualified managed class name.
        Specified by:
        getMetaModelClassName in interface MetaDataFactory
      • getManagedClassName

        public java.lang.String getManagedClassName​(java.lang.String metamodelClassName)
        Description copied from interface: MetaDataFactory
        Gets the name of the managed class for the given fully-qualified meta-model class name.
        Specified by:
        getManagedClassName in interface MetaDataFactory
      • isMetaClass

        public boolean isMetaClass​(java.lang.Class<?> c)
        Description copied from interface: MetaDataFactory
        Affirms if the given class is a meta-class.
        Specified by:
        isMetaClass in interface MetaDataFactory
      • getManagedClass

        public java.lang.Class<?> getManagedClass​(java.lang.Class<?> c)
        Description copied from interface: MetaDataFactory
        Gets the managed class corresponding to the given meta-class.
        Specified by:
        getManagedClass in interface MetaDataFactory
        Returns:
        null if the given input is not a meta-class.