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
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedDbBeanInstance(CassandraState cass, Map<String, String> addMap) protectedDbBeanInstance(DBEnvSetup dbEnv) protectedDbBeanInstance(String url, String driver, String user, String pass) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanconnect()deleteBeanById(MultiId mid, BaseMajoranaEntity bde) intdeleteBeanById(Class<? extends BaseMajoranaEntity> beanClass, String table, MultiId id) deleteBeanByParams(MultiId mid, BaseMajoranaEntity bde) intdeleteBeans(Class beanClass, String table, String[] paramNames, Object[] params) Deprecated.voidexecSQLNoResult(String sql, Object... params) booleangetBeanNPWithSelectClause(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 CassandraStateprotected CassandraStateprotected CassandraStateorg.springframework.data.cassandra.core.CassandraTemplatecom.datastax.oss.driver.api.core.cql.PreparedStatementprotected Map<Class,MajoranaAnnotationRepository> org.springframework.data.cassandra.core.cql.CqlTemplateprotected com.datastax.oss.driver.api.core.CqlSessiongetCs()protected ConnectiongetDbCon()getDbURL()protected com.zaxxer.hikari.HikariDataSourcegetDs()protected MajoranaDBConnectionFactorygetIdField(Class beanClass) protected org.springframework.jdbc.core.JdbcTemplateprotected org.springframework.data.cassandra.core.CassandraTemplateorg.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplategetParamMap(String[] named, Object[] params) static DbBeanInstanceprotected static DbBeanInstancegetSingletonLazy(boolean state) protected static DbBeanInstancegetSingletonLazy(CassandraState state, Map<String, String> inMap) protected static DbBeanInstancegetSingletonLazy(String url, String driver, String user, String pass) protected booleanisCass()static intmapParams(PreparedStatement ps, Object[] args) voidfloatreadJavaObject(String sql, Object[] params) updateBean(MultiId mid, BaseMajoranaEntity bde) intlongwriteJavaObject(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:
getCassPreparedStatementin interfaceDbBeanInstInterface
-
preloadEntities
public void preloadEntities()- Specified by:
preloadEntitiesin interfaceDbBeanInstInterface
-
getSingletonLazy
-
getSingletonLazy
-
getSingletonLazy
protected static DbBeanInstance getSingletonLazy(String url, String driver, String user, String pass) -
connect
- Specified by:
connectin interfaceDbBeanInstInterface- Throws:
ClassNotFoundExceptionSQLException
-
close
- Specified by:
closein interfaceDbBeanInstInterface- Throws:
SQLException
-
execSQL
Deprecated.- Specified by:
execSQLin interfaceDbBeanInstInterface- Throws:
SQLException
-
execSQLNoResult
-
execSQL
- Specified by:
execSQLin interfaceDbBeanInstInterface- Throws:
SQLException
-
existsSQL
- Specified by:
existsSQLin interfaceDbBeanInstInterface- Throws:
SQLException
-
updateSQL
- Specified by:
updateSQLin interfaceDbBeanInstInterface- Throws:
SQLException
-
getIdField
- Specified by:
getIdFieldin interfaceDbBeanInstInterface
-
getRepo
- Specified by:
getRepoin interfaceDbBeanInstInterface
-
getRepo
- Specified by:
getRepoin interfaceDbBeanInstInterface
-
getBeanNP
public Object getBeanNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeanNPin interfaceDbBeanInstInterface- Throws:
SQLException
-
getBeanNPWithSelectClause
public Object getBeanNPWithSelectClause(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeanNPWithSelectClausein interfaceDbBeanInstInterface- Throws:
SQLException
-
getBean
public Object getBean(Class beanClass, String table, String sql1, Object[] params) throws SQLException - Specified by:
getBeanin interfaceDbBeanInstInterface- Throws:
SQLException
-
getBeans
public List<Object> getBeans(Class beanClass, String table, String sql1, Object[] params) throws SQLException - Specified by:
getBeansin 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:
getParamMapin interfaceDbBeanInstInterface
-
getBeansNPWithSelectClause
public List<Object> getBeansNPWithSelectClause(Class beanClass, String table, String sql1, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeansNPWithSelectClausein interfaceDbBeanInstInterface- Throws:
SQLException
-
getBeansNP
public List<Object> getBeansNP(Class beanClass, String table, String sql, String[] paramNames, Object[] params) throws SQLException - Specified by:
getBeansNPin interfaceDbBeanInstInterface- Throws:
SQLException
-
deleteBeans
public int deleteBeans(Class beanClass, String table, String[] paramNames, Object[] params) throws SQLException - Specified by:
deleteBeansin interfaceDbBeanInstInterface- Throws:
SQLException
-
deleteBeanById
public int deleteBeanById(Class<? extends BaseMajoranaEntity> beanClass, String table, MultiId id) throws SQLException - Throws:
SQLException
-
storeBean
- Specified by:
storeBeanin interfaceDbBeanInstInterface- Throws:
SQLException
-
updateBean
- Specified by:
updateBeanin interfaceDbBeanInstInterface- Throws:
SQLException
-
deleteBeanById
- Specified by:
deleteBeanByIdin interfaceDbBeanInstInterface- Throws:
SQLException
-
deleteBeanByParams
- Specified by:
deleteBeanByParamsin interfaceDbBeanInstInterface- Throws:
SQLException
-
getBean
- Throws:
SQLException
-
getBeansArray
- Throws:
SQLException
-
getBeansNP
-
getBeans
- Throws:
SQLException
-
mapParams
- Throws:
SQLException
-
readFloat
- Specified by:
readFloatin interfaceDbBeanInstInterface- Throws:
Exception
-
writeJavaObject
- Specified by:
writeJavaObjectin interfaceDbBeanInstInterface- Throws:
Exception
-
readJavaObject
- Specified by:
readJavaObjectin 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()
-