Package com.majorana.maj_orm.ORM
Class MajoranaAnnotationRepository<T extends BaseMajoranaEntity>
java.lang.Object
com.majorana.maj_orm.ORM.MajoranaAnnotationRepository<T>
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
-
Field Summary
Modifier and TypeFieldDescriptionprotected MajoranaDBConnectionFactory
protected MajDataSourceName
protected Method
protected Method
protected List<MajoranaRepositoryField>
-
Constructor Summary
ConstructorDescriptionMajoranaAnnotationRepository
(MajoranaDBConnectionFactory dbFactory, MajDataSourceName dbName, Class<T> clazz) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getCreateString
(T sUser) getCreateStringNP
(T sUser) protected Timestamp
getDeleteString
(String table, String[] paramNames, Object[] params) org.springframework.jdbc.core.RowMapper<Integer>
getKeyId()
org.springframework.jdbc.core.RowMapper<T>
getParameterMap
(T entity) getParameterMapWithDeletedAt
(MajDataSourceName sDn, T entity) getReadString
(String table) getReadStringNP
(String table, String[] paramNames, Object[] params) getReadStringNPSelectClause
(String table, String sql1, String[] paramNames, Object[] params) getReadStringSelectClause
(String table, String sql1) static List<MajoranaRepositoryField>
protected org.springframework.jdbc.core.namedparam.SqlParameterSource
getSqlParameterSource
(T entity) org.springframework.jdbc.core.namedparam.SqlParameterSource
getSqlParameterSourceWithDeletedAt
(MajDataSourceName sDn, T entity) protected org.springframework.jdbc.core.PreparedStatementCreator
getSqlPreparedStatementParameter
(String sql, T entity, boolean genKey) getUpAltIdStringNP
(T sUser) protected String
getUpdateString
(T sUser) getUpdateStringNP
(T sUser) getUpdateStringNPSansWhere
(T sUser) static Object
invokeGetter
(Object obj, Method getter) void
invokeMethod
(Object obj, Method method) static void
invokeSetter
(Object obj, Object variableValue, Method setter) static boolean
isInStringArray
(String[] potentialTargets, String test) static int
mapParams
(PreparedStatement ps, Object[] args) static void
setRandom
(List<MajoranaRepositoryField> lmf, Object ob, Random r)
-
Field Details
-
clazz
-
dbFactory
-
dbName
-
repoFields
-
preSave
-
postLoad
-
-
Constructor Details
-
MajoranaAnnotationRepository
public MajoranaAnnotationRepository(MajoranaDBConnectionFactory dbFactory, MajDataSourceName dbName, Class<T> clazz)
-
-
Method Details
-
mapParams
- Throws:
SQLException
-
getRepositoryFields
-
getReadStringNP
-
getReadStringNPSelectClause
-
getReadStringSelectClause
-
getReadString
-
getDeleteString
-
getCreateStringNP
-
getRepoFields
-
getUpdateStringNP
-
getUpAltIdStringNP
-
getUpdateStringNPSansWhere
-
getSqlFieldString
-
getSqlFieldStringWithPrefix
-
getCreateString
-
getUpdateString
-
getIdField
-
isInStringArray
-
getKeyUuid
-
getKeyId
-
getSqlPreparedStatementParameter
-
getSqlParameterSource
protected org.springframework.jdbc.core.namedparam.SqlParameterSource getSqlParameterSource(T entity) -
getSqlParameterSourceWithDeletedAt
public org.springframework.jdbc.core.namedparam.SqlParameterSource getSqlParameterSourceWithDeletedAt(MajDataSourceName sDn, T entity) -
getParameterMapWithDeletedAt
-
getDeletedA
-
getParameterMap
-
setRandom
-
getMapper
-
getIntegerMapper
-
invokeSetter
public static void invokeSetter(Object obj, Object variableValue, Method setter) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException -
invokeGetter
public static Object invokeGetter(Object obj, Method getter) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException -
invokeMethod
-