Package tenapull.data.persistence
Class StringHashLookupDao<POJO extends StringHashLookupPojo<POJO>>
java.lang.Object
tenapull.data.persistence.Dao<POJO>
tenapull.data.persistence.AbstractPojoLookupDao<POJO>
tenapull.data.persistence.HashLookupDao<POJO>
tenapull.data.persistence.StringHashLookupDao<POJO>
- 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
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StringHashLookupDao(java.lang.Class<POJO> pojoType)
Instantiates a new String hash lookup dao. -
Method Summary
Modifier and Type Method Description static <P extends DbPojo, D extends Dao<P>>
Dget(java.lang.Class<P> lookupPojoType)
Get the StringHashLookupDao which represents the provided StringHashLookUpPojo typePOJO
getOrCreate(java.lang.String string)
Gets or creates a string lookup pojo representing the provided stringjava.lang.String
toString()
Methods inherited from class tenapull.data.persistence.HashLookupDao
checkedGetOrCreate, finalizeResult, getByHash, searchForInstanceId, tryMatchFilter, useHash
Methods inherited from class tenapull.data.persistence.AbstractPojoLookupDao
getOrCreate, getOrCreate
Methods inherited from class tenapull.data.persistence.Dao
borrowSessionsFrom, checkedUnproxy, delete, delete, findByExactPojo, findByPojoNonNull, findByPropertyEqual, findByPropertyEqual, getAccessMap, getAll, getAttributeMap, getById, getGetterMap, getIdMap, getLogger, getPojoType, getSession, hasActiveSession, holdSession, insert, insert, keyValueSearch, lenderHasActiveSession, makeExactPojoSearchMap, makePojoNonNullSearchMap, mapSearch, releaseSession, saveOrUpdate, saveOrUpdate, unproxy
-
Constructor Details
-
StringHashLookupDao
public StringHashLookupDao(java.lang.Class<POJO> pojoType) throws java.lang.IllegalArgumentExceptionInstantiates 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
Description copied from interface:StringLookupDao
Gets or creates a string lookup pojo representing the provided string- Specified by:
getOrCreate
in interfaceStringLookupDao<POJO extends StringHashLookupPojo<POJO>>
- Parameters:
string
- the string- Returns:
- the or create
-
toString
public java.lang.String toString()- Overrides:
toString
in classHashLookupDao<POJO extends StringHashLookupPojo<POJO>>
-
get
Get the StringHashLookupDao which represents the provided StringHashLookUpPojo type- Type Parameters:
P
- the type parameterD
- the type parameter- Parameters:
lookupPojoType
- the lookup pojo type- Returns:
- the d
-