Package io.jsondb

Class CollectionMetaData


  • public class CollectionMetaData
    extends java.lang.Object
    • Constructor Detail

      • CollectionMetaData

        public CollectionMetaData​(java.lang.String collectionName,
                                  java.lang.Class<?> clazz,
                                  java.lang.String schemaVersion,
                                  java.util.Comparator<java.lang.String> schemaComparator)
    • Method Detail

      • getCollectionLock

        protected java.util.concurrent.locks.ReentrantReadWriteLock getCollectionLock()
      • getCollectionName

        public java.lang.String getCollectionName()
      • getSchemaVersion

        public java.lang.String getSchemaVersion()
      • getActualSchemaVersion

        public java.lang.String getActualSchemaVersion()
      • setActualSchemaVersion

        public void setActualSchemaVersion​(java.lang.String actualSchemaVersion)
      • getClazz

        public java.lang.Class getClazz()
      • getIdAnnotatedFieldName

        public java.lang.String getIdAnnotatedFieldName()
      • getIdAnnotatedFieldGetterMethod

        public java.lang.reflect.Method getIdAnnotatedFieldGetterMethod()
      • getIdAnnotatedFieldSetterMethod

        public java.lang.reflect.Method getIdAnnotatedFieldSetterMethod()
      • getSecretAnnotatedFieldNames

        public java.util.List<java.lang.String> getSecretAnnotatedFieldNames()
      • isSecretField

        public boolean isSecretField​(java.lang.String fieldName)
      • getGetterMethodForFieldName

        public java.lang.reflect.Method getGetterMethodForFieldName​(java.lang.String fieldName)
      • getSetterMethodForFieldName

        public java.lang.reflect.Method getSetterMethodForFieldName​(java.lang.String fieldName)
      • hasSecret

        public boolean hasSecret()
      • isReadOnly

        public boolean isReadOnly()
      • builder

        public static java.util.Map<java.lang.String,​CollectionMetaData> builder​(JsonDBConfig dbConfig)
        A utility builder method to scan through the specified package and find all classes/POJOs that are annotated with the @Document annotation.
        Parameters:
        dbConfig - the object that holds all the baseScanPackage and other settings.
        Returns:
        A Map of collection classes/POJOs