Class Persistence

    • Constructor Detail

      • Persistence

        public Persistence()
    • Method Detail

      • engineName

        public static String engineName()
      • objectIdLabel

        public static final String objectIdLabel()
      • objectIdShortLabel

        public static final String objectIdShortLabel()
      • objectIdType

        public static final Class<?> objectIdType()
        Central architectural information method that always returns long.class.
        Returns:
        long.class
      • nullId

        public static final long nullId()
      • notFoundId

        public static final long notFoundId()
      • defaultStartTypeId

        public static final long defaultStartTypeId()
      • defaultStartConstantId

        public static final long defaultStartConstantId()
      • defaultStartObjectId

        public static final long defaultStartObjectId()
      • defaultBoundConstantId

        public static final long defaultBoundConstantId()
      • classTypeId

        public static final long classTypeId()
      • isNativeType

        public static final boolean isNativeType​(Class<?> type)
      • getNativeTypeId

        public static final Long getNativeTypeId​(Class<?> type)
      • registerJavaBasicTypes

        public static final <R extends PersistenceTypeRegistry> R registerJavaBasicTypes​(R registry)
      • iterateJavaBasicTypes

        public static final <C extends BiConsumer<Class<?>,​Long>> C iterateJavaBasicTypes​(C iterator)
      • iterateReferences

        public static final void iterateReferences​(PersistenceFunction iterator,
                                                   Object[] array,
                                                   int offset,
                                                   int length)
      • iterateReferencesIterable

        public static final void iterateReferencesIterable​(PersistenceFunction iterator,
                                                           Iterable<?> elements)
      • iterateReferencesMap

        public static final void iterateReferencesMap​(PersistenceFunction iterator,
                                                      Map<?,​?> elements)
      • standardCharset

        public static final Charset standardCharset()
        Reasons for choosing UTF8 as the standard charset: 1.) It is independent from endianess. 2.) It is massively smaller due to most content containing almost only single-byte ASCII characters 3.) It is overall more commonly and widespread used and compatible than any specific format.
      • defaultFilenameTypeDictionary

        public static String defaultFilenameTypeDictionary()
      • unpersistableTypes

        public static XGettingEnum<Class<?>> unpersistableTypes()
        Types whose instances cannot be persisted. E.g. Unpersistable, Thread, ClassLoader, etc. Note that the Class instances representing these types are very well persistable and will get empty type descriptions to assign type ids to them. Only their instances cannot be persisted.
      • isPersistable

        public static boolean isPersistable​(Class<?> type)
      • isUnpersistable

        public static boolean isUnpersistable​(Class<?> type)
      • isPersisterField

        public static final boolean isPersisterField​(Field field)
      • isHandleableEnumField

        public static boolean isHandleableEnumField​(Class<?> enumClass,
                                                    Field field)
      • isHandleableCollectionField

        public static boolean isHandleableCollectionField​(Class<?> collectionClass,
                                                          Field field)
      • resolveEnumeratedClassIdentifierSeparatedType

        public static <T> Class<T> resolveEnumeratedClassIdentifierSeparatedType​(String typeName,
                                                                                 String substituteClassIdentifierSeparator)
      • resolveType

        public static <T> Class<T> resolveType​(String typeName)
      • resolveType

        public static <T> Class<T> resolveType​(String typeName,
                                               String substituteClassIdentifierSeparator)
      • tryResolveType

        public static <T> Class<T> tryResolveType​(String typeName)
      • enumRootIdentifierStart

        public static String enumRootIdentifierStart()
      • parseEnumRootIdentifierTypeId

        public static Long parseEnumRootIdentifierTypeId​(String enumRootIdentifier)
      • isEnumRootIdentifier

        public static boolean isEnumRootIdentifier​(String enumRootIdentifier)
      • isPotentialEnumRootIdentifier

        public static boolean isPotentialEnumRootIdentifier​(String enumRootIdentifier)
      • defaultRootIdentifier

        @Deprecated
        public static final String defaultRootIdentifier()
        Deprecated.
      • customRootIdentifier

        @Deprecated
        public static final String customRootIdentifier()
        Deprecated.
      • rootIdentifier

        public static final String rootIdentifier()
      • substituteClassIdentifierSeparator

        public static final String substituteClassIdentifierSeparator()
        Persistence-specific separator between a class name and a proper identifier that replaces unreliable class names (like "$1", "$2" etc.) by a reliably identifying substitute name.
      • derivePersistentTypeName

        public static final String derivePersistentTypeName​(Class<?> type)
      • derivePersistentTypeName

        public static final String derivePersistentTypeName​(Class<?> type,
                                                            String substituteClassIdentifierSeparator)
      • derivePersistentTypeNameEnum

        public static final String derivePersistentTypeNameEnum​(Class<?> type,
                                                                String substituteClassIdentifierSeparator)