Package com.majorana.maj_orm.ORM_ACCESS
Class DbBean
java.lang.Object
com.majorana.maj_orm.ORM_ACCESS.DbBean
- All Implemented Interfaces:
DbBeanInterface
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static DbBeanInstance
protected static HashMap<Class,
DbBeanGenericInstance> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
connect()
deleteBeanById
(MultiId mid, BaseMajoranaEntity bde) deleteBeanByParams
(MultiId mid, BaseMajoranaEntity bde) int
deleteBeans
(Class beanClass, String table, String[] paramNames, Object[] params) Deprecated.void
execSQLNoResult
(String sql, Object... params) boolean
getBeanNP
(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) getBeanNPWithSelectClause
(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) getBeanNPWithSelectClause
(Class beanClass, String table, String sql, String[] paramNames, Object[] params) getBeans
(Class<? extends BaseMajoranaEntity> beanClass, String sql1, Object[] params) Object[]
getBeansArray
(Class<? extends BaseMajoranaEntity> beanClass, String sql, Object[] params) Object[]
getBeansArrayNP
(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) Object[]
Object[]
getBeansArrayNPWithSelectClause
(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) Object[]
getBeansArrayNPWithSelectClause
(Class beanClass, String table, String sql, String[] paramNames, Object[] params) getBeansNP
(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) getBeansNPWithSelectClause
(Class<? extends BaseMajoranaEntity> beanClass, String sql1, String[] paramNames, Object[] params) getBeansNPWithSelectClause
(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) com.datastax.oss.driver.api.core.cql.PreparedStatement
protected MajoranaDBConnectionFactory
getFailoverBean
(List<MajDataSourceName> names) getIdField
(Class T) protected static DbBeanInstance
getParamMap
(String[] named, Object[] params) void
protected static DbBeanInstance
getSingletonLazy
(Map<String, String> inMap) <T extends BaseMajoranaEntity>
DbBeanGenericInterface<T>getTypedBean
(Class<? extends BaseMajoranaEntity> T) protected DbBeanGenericInstance
<T> List<T>
static int
mapParams
(PreparedStatement ps, Object[] args) void
protected void
putTypedBeanToStore
(Class s, DbBeanGenericInstance<? extends BaseMajoranaEntity> b) float
readJavaObject
(String sql, Object[] params) updateBean
(MultiId mid, BaseMajoranaEntity bde) int
long
writeJavaObject
(Object object, String sql)
-
Field Details
-
mainBean
-
typeBeans
-
-
Constructor Details
-
DbBean
public DbBean()
-
-
Method Details
-
getMainBean
-
getTypedList
-
getTypedBean
public <T extends BaseMajoranaEntity> DbBeanGenericInterface<T> getTypedBean(Class<? extends BaseMajoranaEntity> T) throws ClassNotFoundException, SQLException - Throws:
ClassNotFoundException
SQLException
-
getFactory
-
getIdField
- Specified by:
getIdField
in interfaceDbBeanInterface
-
getIdFieldName
-
getSingletonLazy
public void getSingletonLazy() -
getTypedBeanFromStore
-
putTypedBeanToStore
-
getFailoverBean
-
getCassPreparedStatement
- Specified by:
getCassPreparedStatement
in interfaceDbBeanInterface
-
preloadEntities
public void preloadEntities()- Specified by:
preloadEntities
in interfaceDbBeanInterface
-
getSingletonLazy
-
connect
- Specified by:
connect
in interfaceDbBeanInterface
- Throws:
ClassNotFoundException
SQLException
-
close
- Specified by:
close
in interfaceDbBeanInterface
- Throws:
SQLException
-
execSQL
Deprecated.- Specified by:
execSQL
in interfaceDbBeanInterface
- Throws:
SQLException
-
execSQLNoResult
- Throws:
SQLException
-
execSQL
- Specified by:
execSQL
in interfaceDbBeanInterface
- Throws:
SQLException
-
existsSQL
- Specified by:
existsSQL
in interfaceDbBeanInterface
- Throws:
SQLException
-
updateSQL
- Specified by:
updateSQL
in interfaceDbBeanInterface
- Throws:
SQLException
-
getRepo
- Specified by:
getRepo
in interfaceDbBeanInterface
-
getRepo
- Specified by:
getRepo
in interfaceDbBeanInterface
-
getBeansNP
public List<Object> getBeansNP(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansNPWithSelectClause
public List<Object> getBeansNPWithSelectClause(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansNPWithSelectClause
public List<Object> getBeansNPWithSelectClause(Class<? extends BaseMajoranaEntity> beanClass, String sql1, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeans
public List<Object> getBeans(Class beanClass, String table, String sql1, Object[] params) throws SQLException - Throws:
SQLException
-
getBeans
public List<Object> getBeans(Class<? extends BaseMajoranaEntity> beanClass, String sql1, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArrayNP
public Object[] getBeansArrayNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArrayNP
public Object[] getBeansArrayNP(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArrayNPWithSelectClause
public Object[] getBeansArrayNPWithSelectClause(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArrayNPWithSelectClause
public Object[] getBeansArrayNPWithSelectClause(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArray
public Object[] getBeansArray(Class<? extends BaseMajoranaEntity> beanClass, String sql, Object[] params) throws SQLException - Throws:
SQLException
-
getBeanNP
public Object getBeanNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeanNPWithSelectClause
public Object getBeanNPWithSelectClause(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeanNPWithSelectClause
public Object getBeanNPWithSelectClause(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansNP
public List<Object> getBeansNP(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBean
public Object getBean(Class beanClass, String table, String sql, Object[] params) throws SQLException - Throws:
SQLException
-
getParamMap
- Specified by:
getParamMap
in interfaceDbBeanInterface
-
deleteBeans
public int deleteBeans(Class beanClass, String table, String[] paramNames, Object[] params) throws SQLException - Specified by:
deleteBeans
in interfaceDbBeanInterface
- Throws:
SQLException
-
getFields
-
getFields
-
storeBean
- Specified by:
storeBean
in interfaceDbBeanInterface
- Throws:
SQLException
-
updateBean
- Specified by:
updateBean
in interfaceDbBeanInterface
- Throws:
SQLException
-
getUUID
-
deleteBeanById
- Specified by:
deleteBeanById
in interfaceDbBeanInterface
- Throws:
SQLException
-
deleteBeanByParams
- Specified by:
deleteBeanByParams
in interfaceDbBeanInterface
- Throws:
SQLException
-
getBean
- Throws:
SQLException
-
getBeanNP
public Object getBeanNP(Class<? extends BaseMajoranaEntity> beanClass, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeans
public List getBeans(Class beanClass, String table, String sql, String... params) throws SQLException - Throws:
SQLException
-
mapParams
- Throws:
SQLException
-
readFloat
- Specified by:
readFloat
in interfaceDbBeanInterface
- Throws:
Exception
-
writeJavaObject
- Specified by:
writeJavaObject
in interfaceDbBeanInterface
- Throws:
Exception
-
readJavaObject
- Specified by:
readJavaObject
in interfaceDbBeanInterface
- Throws:
Exception
-