Package net.ideahut.springboot.entity
Class EntityNative
java.lang.Object
net.ideahut.springboot.entity.EntityNative
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaliasColumn(String alias, String column) static voidappendInsert(FieldInfo fieldInfo, StringBuilder sqlInto, StringBuilder sqlValues, List<EntityNative.Parameter> parameters, Object entity) static IntegerappendSelect(FieldInfo fieldInfo, EntityNative.Select select, StringBuilder query, String alias, Integer idxSelect, boolean commaAtFirst) static voidappendUpdate(FieldInfo fieldInfo, StringBuilder query, List<EntityNative.Parameter> parameters, Object entity) static <T> Tdelete(EntityInfo info, Integer replica, T entity) static <T> Tdelete(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static <T> List<T>entitesOf(List<Object[]> rows, org.hibernate.Session session, EntityInfo entityInfo, List<EntityNative.Select> selects, List<String> load) static Objectstatic StringgenerateInIdsQuery(List<Object> ids, EntityInfo entityInfo, String alias, List<EntityNative.Parameter> parameters, Integer startIndex) static <T> Tinsert(EntityInfo info, Integer replica, T entity) static <T> Tinsert(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static <T> org.hibernate.query.Query<T>static <T> org.hibernate.query.Query<T>queryOf(org.hibernate.SharedSessionContract session, String sql, List<EntityNative.Parameter> parameters) static <T> org.hibernate.query.Query<T>queryOf(org.hibernate.SharedSessionContract session, String sql, List<EntityNative.Parameter> parameters, Integer start, Integer limit) static <T> Treload(EntityInfo info, Integer replica, T entity) static <T> Treload(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static <T> Tsave(EntityInfo info, Integer replica, T entity) static <T> Tsave(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static <T> TsaveOrUpdate(EntityInfo info, Integer replica, T entity) static <T> TsaveOrUpdate(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static StringtableReplica(EntityInfo entityInfo, Integer replica) static <T> Tupdate(EntityInfo info, Integer replica, T entity) static <T> Tupdate(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) static <T> TvalueOf(EntityNative.Select select, Object[] data) static int
-
Method Details
-
tableReplica
-
aliasColumn
-
appendSelect
public static Integer appendSelect(FieldInfo fieldInfo, EntityNative.Select select, StringBuilder query, String alias, Integer idxSelect, boolean commaAtFirst) -
appendInsert
public static void appendInsert(FieldInfo fieldInfo, StringBuilder sqlInto, StringBuilder sqlValues, List<EntityNative.Parameter> parameters, Object entity) throws Exception - Throws:
Exception
-
appendUpdate
public static void appendUpdate(FieldInfo fieldInfo, StringBuilder query, List<EntityNative.Parameter> parameters, Object entity) throws Exception - Throws:
Exception
-
valueOf
- Throws:
Exception
-
valueOf
public static int valueOf(FieldInfo fieldInfo, Object[] data, Object entity, int start) throws Exception - Throws:
Exception
-
enumValue
-
entitesOf
public static <T> List<T> entitesOf(List<Object[]> rows, org.hibernate.Session session, EntityInfo entityInfo, List<EntityNative.Select> selects, List<String> load) throws Exception - Throws:
Exception
-
reload
-
reload
public static <T> T reload(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception
-
generateInIdsQuery
public static String generateInIdsQuery(List<Object> ids, EntityInfo entityInfo, String alias, List<EntityNative.Parameter> parameters, Integer startIndex) -
insert
-
insert
public static <T> T insert(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception
-
update
-
update
public static <T> T update(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception
-
delete
-
delete
public static <T> T delete(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception
-
save
-
save
public static <T> T save(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception
-
saveOrUpdate
-
saveOrUpdate
public static <T> T saveOrUpdate(org.hibernate.Session session, EntityInfo info, Integer replica, T entity) throws Exception - Throws:
Exception