Class StringHashLookupDao<POJO extends StringHashLookupPojo<POJO>>

java.lang.Object
Type Parameters:
POJO - the type parameter
All Implemented Interfaces:
StringLookupDao<POJO>

public class StringHashLookupDao<POJO extends StringHashLookupPojo<POJO>>
extends HashLookupDao<POJO>
implements StringLookupDao<POJO>
Dao used for string lookups of the longtext db data type, which cannot be indexed by MySQL. Therefore a hash of the string is used for indexing instead
  • Constructor Details

    • StringHashLookupDao

      public StringHashLookupDao​(java.lang.Class<POJO> pojoType) throws java.lang.IllegalArgumentException
      Instantiates a new String hash lookup dao.
      Parameters:
      pojoType - the pojo type
      Throws:
      java.lang.IllegalArgumentException - if a dao has already been instantiated for the provided pojoType
  • Method Details

    • getOrCreate

      public POJO getOrCreate​(java.lang.String string)
      Description copied from interface: StringLookupDao
      Gets or creates a string lookup pojo representing the provided string
      Specified by:
      getOrCreate in interface StringLookupDao<POJO extends StringHashLookupPojo<POJO>>
      Parameters:
      string - the string
      Returns:
      the or create
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class HashLookupDao<POJO extends StringHashLookupPojo<POJO>>
    • get

      public static <P extends DbPojo,​ D extends Dao<P>> D get​(java.lang.Class<P> lookupPojoType)
      Get the StringHashLookupDao which represents the provided StringHashLookUpPojo type
      Type Parameters:
      P - the type parameter
      D - the type parameter
      Parameters:
      lookupPojoType - the lookup pojo type
      Returns:
      the d