Esempio n. 1
0
 public int update(
     final SqlSession sqlSession, final PersonLibrary personLibrary, SqlControl sqlControl) {
   if (logger.isTraceEnabled()) {
     logger.trace("sql update personLibrary: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlCrudEngine sqlUpdateEnginePersonLibrary =
       sqlEngineFactory.getCheckedCrudEngine("UPDATE_PERSON_LIBRARY");
   int count = sqlUpdateEnginePersonLibrary.update(sqlSession, personLibrary, sqlControl);
   if (logger.isTraceEnabled()) {
     logger.trace("sql update personLibrary result count: " + count);
   }
   return count;
 }
Esempio n. 2
0
 public PersonLibrary insert(
     final SqlSession sqlSession, final PersonLibrary personLibrary, SqlControl sqlControl) {
   if (logger.isTraceEnabled()) {
     logger.trace("sql insert personLibrary: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlCrudEngine sqlInsertPersonLibrary =
       sqlEngineFactory.getCheckedCrudEngine("INSERT_PERSON_LIBRARY");
   int count = sqlInsertPersonLibrary.insert(sqlSession, personLibrary, sqlControl);
   if (logger.isTraceEnabled()) {
     logger.trace("sql insert personLibrary result: " + count + " " + personLibrary);
   }
   return (count > 0) ? personLibrary : null;
 }
Esempio n. 3
0
 public int count(
     final SqlSession sqlSession, final PersonLibrary personLibrary, SqlControl sqlControl) {
   if (logger.isTraceEnabled()) {
     logger.trace("count personLibrary: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlQueryEngine sqlEnginePersonLibrary =
       sqlEngineFactory.getCheckedQueryEngine("SELECT_PERSON_LIBRARY");
   // sqlControl = getMoreResultClasses(personLibrary, sqlControl);
   int count = sqlEnginePersonLibrary.queryCount(sqlSession, personLibrary, sqlControl);
   if (logger.isTraceEnabled()) {
     logger.trace("count: " + count);
   }
   return count;
 }
Esempio n. 4
0
 public PersonLibrary get(
     final SqlSession sqlSession, final PersonLibrary personLibrary, SqlControl sqlControl) {
   if (logger.isTraceEnabled()) {
     logger.trace("sql get: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlCrudEngine sqlGetEnginePersonLibrary =
       sqlEngineFactory.getCheckedCrudEngine("GET_PERSON_LIBRARY");
   // sqlControl = getMoreResultClasses(personLibrary, sqlControl);
   PersonLibrary personLibraryGot =
       sqlGetEnginePersonLibrary.get(sqlSession, PersonLibrary.class, personLibrary, sqlControl);
   if (logger.isTraceEnabled()) {
     logger.trace("sql get personLibrary result: " + personLibraryGot);
   }
   return personLibraryGot;
 }
Esempio n. 5
0
 public List<PersonLibrary> list(
     final SqlSession sqlSession, final PersonLibrary personLibrary, SqlControl sqlControl) {
   if (logger.isTraceEnabled()) {
     logger.trace("sql list personLibrary: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlQueryEngine sqlEnginePersonLibrary =
       sqlEngineFactory.getCheckedQueryEngine("SELECT_PERSON_LIBRARY");
   // sqlControl = getMoreResultClasses(personLibrary, sqlControl);
   List<PersonLibrary> personLibraryList =
       sqlEnginePersonLibrary.query(sqlSession, PersonLibrary.class, personLibrary, sqlControl);
   if (logger.isTraceEnabled()) {
     logger.trace(
         "sql list personLibrary size: "
             + ((personLibraryList != null) ? personLibraryList.size() : "null"));
   }
   return personLibraryList;
 }
Esempio n. 6
0
 public int query(
     final SqlSession sqlSession,
     final PersonLibrary personLibrary,
     SqlControl sqlControl,
     final SqlRowProcessor<PersonLibrary> sqlRowProcessor) {
   if (logger.isTraceEnabled()) {
     logger.trace("sql query personLibrary: " + personLibrary + " " + sqlControl);
   }
   org.sqlproc.engine.SqlQueryEngine sqlEnginePersonLibrary =
       sqlEngineFactory.getCheckedQueryEngine("SELECT_PERSON_LIBRARY");
   // sqlControl = getMoreResultClasses(personLibrary, sqlControl);
   int rownums =
       sqlEnginePersonLibrary.query(
           sqlSession, PersonLibrary.class, personLibrary, sqlControl, sqlRowProcessor);
   if (logger.isTraceEnabled()) {
     logger.trace("sql query personLibrary size: " + rownums);
   }
   return rownums;
 }
Esempio n. 7
0
 SqlProcedureEngine getProcedureEngine(String name) {
   SqlEngineFactory factory = getEngineFactory(name);
   SqlProcedureEngine sqlEngine = factory.getProcedureEngine(name);
   assertNotNull(sqlEngine);
   return sqlEngine;
 }
Esempio n. 8
0
 SqlCrudEngine getCrudEngine(String name) {
   SqlEngineFactory factory = getEngineFactory(name);
   SqlCrudEngine sqlEngine = factory.getCrudEngine(name);
   assertNotNull(sqlEngine);
   return sqlEngine;
 }
Esempio n. 9
0
 protected SqlCrudEngine getCrudEngine(String name, String filter) {
   SqlEngineFactory factory = getEngineFactory(name, filter);
   SqlCrudEngine sqlEngine = factory.getCrudEngine(name);
   assertNotNull(sqlEngine);
   return sqlEngine;
 }
Esempio n. 10
0
 protected SqlQueryEngine getQueryEngine(String name, SqlPluginFactory sqlPluginFactory) {
   SqlEngineFactory factory = getEngineFactory(name, sqlPluginFactory);
   SqlQueryEngine sqlEngine = factory.getQueryEngine(name);
   assertNotNull(sqlEngine);
   return sqlEngine;
 }