Class MongoMappingBuilder<K,T extends ai.platon.gora.persistency.impl.PersistentBase>

java.lang.Object
ai.platon.gora.mongodb.store.MongoMappingBuilder<K,T>

public class MongoMappingBuilder<K,T extends ai.platon.gora.persistency.impl.PersistentBase> extends Object
A builder for creating the mapper. This will allow building a thread safe MongoMapping using simple immutabilty.
  • Constructor Details

    • MongoMappingBuilder

      public MongoMappingBuilder(MongoStore<K,T> store)
  • Method Details

    • build

      public MongoMapping build()
      Return the built mapping if it is in a legal state
    • fromInputStream

      protected void fromInputStream(InputStream is) throws IOException
      Load the MongoMapping from an input stream passed in parameter.
      Parameters:
      is - input stream holding the mapping
      Throws:
      IOException
    • loadPersistentClass

      protected void loadPersistentClass(org.jdom.Element classElement, Class<T> pPersistentClass)
      Handle the XML parsing of the class definition.
      Parameters:
      classElement - the XML node containing the class definition