Package com.majorana.maj_orm.ORM_ACCESS
Class DbBeanInstance
java.lang.Object
com.majorana.maj_orm.ORM_ACCESS.DbBeanInstance
- All Implemented Interfaces:
DbBeanInstInterface
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
DbBeanInstance
(CassandraState cass, Map<String, String> addMap) protected
DbBeanInstance
(DBEnvSetup dbEnv) protected
DbBeanInstance
(String url, String driver, String user, String pass) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
connect()
deleteBeanById
(MultiId mid, BaseMajoranaEntity bde) int
deleteBeanById
(Class<? extends BaseMajoranaEntity> beanClass, String table, MultiId id) deleteBeanByParams
(MultiId mid, BaseMajoranaEntity bde) int
deleteBeans
(Class beanClass, String table, String[] paramNames, Object[] params) Deprecated.void
execSQLNoResult
(String sql, Object... params) boolean
getBeanNPWithSelectClause
(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) Object[]
getBeansArray
(Class beanClass, String sql, Object[] params) Object[]
getBeansArray
(Class beanClass, String table, String sql, Object[] params) Object[]
getBeansNP
(Class beanClass, String sql, String[] paramNames, Object[] params) getBeansNPWithSelectClause
(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) protected CassandraState
protected CassandraState
protected CassandraState
org.springframework.data.cassandra.core.CassandraTemplate
com.datastax.oss.driver.api.core.cql.PreparedStatement
protected Map<Class,
MajoranaAnnotationRepository> org.springframework.data.cassandra.core.cql.CqlTemplate
protected com.datastax.oss.driver.api.core.CqlSession
getCs()
protected Connection
getDbCon()
getDbURL()
protected com.zaxxer.hikari.HikariDataSource
getDs()
protected MajoranaDBConnectionFactory
getIdField
(Class beanClass) protected org.springframework.jdbc.core.JdbcTemplate
protected org.springframework.data.cassandra.core.CassandraTemplate
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
getParamMap
(String[] named, Object[] params) static DbBeanInstance
protected static DbBeanInstance
getSingletonLazy
(boolean state) protected static DbBeanInstance
getSingletonLazy
(CassandraState state, Map<String, String> inMap) protected static DbBeanInstance
getSingletonLazy
(String url, String driver, String user, String pass) protected boolean
isCass()
static int
mapParams
(PreparedStatement ps, Object[] args) void
float
readJavaObject
(String sql, Object[] params) updateBean
(MultiId mid, BaseMajoranaEntity bde) int
long
writeJavaObject
(Object object, String sql)
-
Constructor Details
-
DbBeanInstance
protected DbBeanInstance() -
DbBeanInstance
-
DbBeanInstance
-
DbBeanInstance
Deprecated.
-
-
Method Details
-
getDbURL
-
getNamedTemplate
public org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate getNamedTemplate() -
getCassandraTemplate
public org.springframework.data.cassandra.core.CassandraTemplate getCassandraTemplate() -
getCqlTemplate
public org.springframework.data.cassandra.core.cql.CqlTemplate getCqlTemplate() -
getEntityFinder
-
getSingletonLazy
-
getMainDsn
-
getCassDsn
-
getJdbcDsn
-
getEnvSetup
-
getCassPreparedStatement
- Specified by:
getCassPreparedStatement
in interfaceDbBeanInstInterface
-
preloadEntities
public void preloadEntities()- Specified by:
preloadEntities
in interfaceDbBeanInstInterface
-
getSingletonLazy
-
getSingletonLazy
-
getSingletonLazy
protected static DbBeanInstance getSingletonLazy(String url, String driver, String user, String pass) -
connect
- Specified by:
connect
in interfaceDbBeanInstInterface
- Throws:
ClassNotFoundException
SQLException
-
close
- Specified by:
close
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
execSQL
Deprecated.- Specified by:
execSQL
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
execSQLNoResult
-
execSQL
- Specified by:
execSQL
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
existsSQL
- Specified by:
existsSQL
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
updateSQL
- Specified by:
updateSQL
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getIdField
- Specified by:
getIdField
in interfaceDbBeanInstInterface
-
getRepo
- Specified by:
getRepo
in interfaceDbBeanInstInterface
-
getRepo
- Specified by:
getRepo
in interfaceDbBeanInstInterface
-
getBeanNP
public Object getBeanNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeanNP
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBeanNPWithSelectClause
public Object getBeanNPWithSelectClause(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeanNPWithSelectClause
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBean
public Object getBean(Class beanClass, String table, String sql1, Object[] params) throws SQLException - Specified by:
getBean
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBeans
public List<Object> getBeans(Class beanClass, String table, String sql1, Object[] params) throws SQLException - Specified by:
getBeans
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBeansArrayNP
public Object[] getBeansArrayNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Throws:
SQLException
-
getBeansArray
public Object[] getBeansArray(Class beanClass, String table, String sql, Object[] params) throws SQLException - Throws:
SQLException
-
getParamMap
- Specified by:
getParamMap
in interfaceDbBeanInstInterface
-
getBeansNPWithSelectClause
public List<Object> getBeansNPWithSelectClause(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeansNPWithSelectClause
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBeansNP
public List<Object> getBeansNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeansNP
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
deleteBeans
public int deleteBeans(Class beanClass, String table, String[] paramNames, Object[] params) throws SQLException - Specified by:
deleteBeans
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
deleteBeanById
public int deleteBeanById(Class<? extends BaseMajoranaEntity> beanClass, String table, MultiId id) throws SQLException - Throws:
SQLException
-
storeBean
- Specified by:
storeBean
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
updateBean
- Specified by:
updateBean
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
deleteBeanById
- Specified by:
deleteBeanById
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
deleteBeanByParams
- Specified by:
deleteBeanByParams
in interfaceDbBeanInstInterface
- Throws:
SQLException
-
getBean
- Throws:
SQLException
-
getBeansArray
- Throws:
SQLException
-
getBeansNP
-
getBeans
- Throws:
SQLException
-
mapParams
- Throws:
SQLException
-
readFloat
- Specified by:
readFloat
in interfaceDbBeanInstInterface
- Throws:
Exception
-
writeJavaObject
- Specified by:
writeJavaObject
in interfaceDbBeanInstInterface
- Throws:
Exception
-
readJavaObject
- Specified by:
readJavaObject
in interfaceDbBeanInstInterface
- Throws:
Exception
-
getDbCon
-
getDs
protected com.zaxxer.hikari.HikariDataSource getDs() -
getCs
protected com.datastax.oss.driver.api.core.CqlSession getCs() -
getFactory
-
getJdbcTemplate
protected org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate() -
getCassandraState
-
getCassandraIsMain
-
getCassandraDbIsPresent
-
getClassDBmap
-
getMockCass
protected org.springframework.data.cassandra.core.CassandraTemplate getMockCass() -
isCass
protected boolean isCass()
-