Package tenapull.data.persistence
Class SimpleStringLookupDao<POJO extends SimpleStringLookupPojo<POJO>>
java.lang.Object
tenapull.data.persistence.Dao<POJO>
tenapull.data.persistence.SimpleStringLookupDao<POJO>
- Type Parameters:
POJO
- the pojo type
- All Implemented Interfaces:
StringLookupDao<POJO>
public class SimpleStringLookupDao<POJO extends SimpleStringLookupPojo<POJO>> extends Dao<POJO> implements StringLookupDao<POJO>
Used for simple string lookups, typically of DB data type varchar(255)
though may be shorter than 255 in some cases. These string lookups do
NOT use a hash value for indexing
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimpleStringLookupDao(java.lang.Class<POJO> pojoType)
Instantiates a new Simple string lookup dao using the provided pojo type -
Method Summary
Modifier and Type Method Description static <P extends DbPojo, D extends Dao<P>>
Dget(java.lang.Class<P> lookupPojoType)
Gets the representing the provided SimpleStringLookupPojo 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.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
-
SimpleStringLookupDao
public SimpleStringLookupDao(java.lang.Class<POJO> pojoType) throws java.lang.IllegalArgumentExceptionInstantiates a new Simple string lookup dao using the provided pojo type- 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 SimpleStringLookupPojo<POJO>>
- Parameters:
string
- the string- Returns:
- the or create
-
toString
public java.lang.String toString()- Overrides:
toString
in classDao<POJO extends SimpleStringLookupPojo<POJO>>
-
get
Gets the representing the provided SimpleStringLookupPojo type- Type Parameters:
P
- the type parameterD
- the type parameter- Parameters:
lookupPojoType
- the lookup pojo type- Returns:
- the d
-