From f56f6644fccbfd7fc1969c3a1c3d0a8fb7a2c6d4 Mon Sep 17 00:00:00 2001 From: koda Date: Sat, 10 Jan 2015 07:32:27 +0900 Subject: [PATCH] =?UTF-8?q?0.3.2=20=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 16 +- .../project}/knowledge/bat/FileParseBat.java | 41 ++-- .../knowledge/bat/KnowledgeFileClearBat.java | 8 +- .../project/knowledge/bat/MailSendBat.java | 156 +++++++++++++ .../project}/knowledge/config/AppConfig.java | 4 +- .../project}/knowledge/config/FileType.java | 2 +- .../project}/knowledge/config/IndexType.java | 2 +- .../project/knowledge/config/MailConfig.java | 33 +++ .../knowledge/config/SystemConfig.java | 2 +- .../project}/knowledge/control/Control.java | 25 +- .../knowledge/control/IndexControl.java | 23 ++ .../control/admin/ConfigControl.java | 22 +- .../knowledge/control/admin/MailControl.java | 22 +- .../knowledge/control/admin/UsersControl.java | 90 ++++++-- .../control/open/AccountControl.java | 16 +- .../knowledge/control/open/FileControl.java | 20 +- .../control/open/KnowledgeControl.java | 44 ++-- .../control/open/LicenseControl.java | 10 + .../knowledge/control/open/SignupControl.java | 217 ++++++++++++++++++ .../control/protect/AccountControl.java | 41 ++-- .../control/protect/FileControl.java | 29 ++- .../control/protect/KnowledgeControl.java | 40 ++-- .../knowledge/dao/AccountImagesDao.java | 12 +- .../project}/knowledge/dao/CommentsDao.java | 12 +- .../knowledge/dao/KnowledgeFilesDao.java | 22 +- .../knowledge/dao/KnowledgeGroupsDao.java | 11 +- .../knowledge/dao/KnowledgeTagsDao.java | 10 +- .../knowledge/dao/KnowledgeUsersDao.java | 10 +- .../project}/knowledge/dao/KnowledgesDao.java | 16 +- .../project}/knowledge/dao/LikesDao.java | 10 +- .../project}/knowledge/dao/StocksDao.java | 11 +- .../project}/knowledge/dao/TagsDao.java | 20 +- .../knowledge/dao/ViewHistoriesDao.java | 11 +- .../project}/knowledge/dao/VotesDao.java | 11 +- .../dao/gen/GenAccountImagesDao.java | 74 +++--- .../knowledge/dao/gen/GenCommentsDao.java | 74 +++--- .../dao/gen/GenKnowledgeFilesDao.java | 74 +++--- .../dao/gen/GenKnowledgeGroupsDao.java | 82 +++---- .../dao/gen/GenKnowledgeTagsDao.java | 82 +++---- .../dao/gen/GenKnowledgeUsersDao.java | 82 +++---- .../knowledge/dao/gen/GenKnowledgesDao.java | 74 +++--- .../knowledge/dao/gen/GenLikesDao.java | 74 +++--- .../knowledge/dao/gen/GenStocksDao.java | 82 +++---- .../knowledge/dao/gen/GenTagsDao.java | 74 +++--- .../dao/gen/GenViewHistoriesDao.java | 74 +++--- .../knowledge/dao/gen/GenVotesDao.java | 74 +++--- .../project}/knowledge/deploy/InitDB.java | 14 +- .../deploy/InitializationListener.java | 14 +- .../project}/knowledge/deploy/Migrate.java | 2 +- .../deploy/v0_0_1/InitializeSystem.java | 26 +-- .../deploy/v0_1_0/Migrate_0_1_0.java | 16 ++ .../deploy/v0_3_0/Migrate_0_3_0.java | 23 ++ .../deploy/v0_3_1/Migrate_0_3_1.java | 22 ++ .../knowledge/entity/AccountImagesEntity.java | 16 +- .../knowledge/entity/CommentsEntity.java | 16 +- .../entity/KnowledgeFilesEntity.java | 13 +- .../entity/KnowledgeGroupsEntity.java | 16 +- .../knowledge/entity/KnowledgeTagsEntity.java | 13 +- .../entity/KnowledgeUsersEntity.java | 16 +- .../knowledge/entity/KnowledgesEntity.java | 21 +- .../knowledge/entity/LikesEntity.java | 10 +- .../knowledge/entity/StocksEntity.java | 16 +- .../project}/knowledge/entity/TagsEntity.java | 13 +- .../knowledge/entity/ViewHistoriesEntity.java | 16 +- .../knowledge/entity/VotesEntity.java | 16 +- .../entity/gen/GenAccountImagesEntity.java | 14 +- .../entity/gen/GenCommentsEntity.java | 14 +- .../entity/gen/GenKnowledgeFilesEntity.java | 14 +- .../entity/gen/GenKnowledgeGroupsEntity.java | 14 +- .../entity/gen/GenKnowledgeTagsEntity.java | 14 +- .../entity/gen/GenKnowledgeUsersEntity.java | 14 +- .../entity/gen/GenKnowledgesEntity.java | 14 +- .../knowledge/entity/gen/GenLikesEntity.java | 14 +- .../knowledge/entity/gen/GenStocksEntity.java | 14 +- .../knowledge/entity/gen/GenTagsEntity.java | 14 +- .../entity/gen/GenViewHistoriesEntity.java | 14 +- .../knowledge/entity/gen/GenVotesEntity.java | 14 +- .../project}/knowledge/indexer/Indexer.java | 6 +- .../knowledge/indexer/IndexingValue.java | 4 +- .../knowledge/indexer/impl/LuceneIndexer.java | 17 +- .../knowledge/listener/CronListener.java | 41 +++- .../knowledge/logic/AccountLogic.java | 19 +- .../project}/knowledge/logic/IndexLogic.java | 19 +- .../knowledge/logic/KnowledgeLogic.java | 64 +++--- .../project/knowledge/logic/MailLogic.java | 170 ++++++++++++++ .../knowledge/logic/SystemConfigLogic.java | 16 +- .../project}/knowledge/logic/TagLogic.java | 14 +- .../knowledge/logic/UploadedFileLogic.java | 25 +- .../project}/knowledge/logic/UserLogic.java | 83 +++++-- .../project}/knowledge/parser/Parser.java | 4 +- .../knowledge/parser/ParserFactory.java | 10 +- .../knowledge/parser/impl/TextParser.java | 17 +- .../knowledge/parser/impl/TikaParser.java | 17 +- .../knowledge/searcher/SearchResultValue.java | 2 +- .../project}/knowledge/searcher/Searcher.java | 6 +- .../knowledge/searcher/SearchingValue.java | 8 +- .../searcher/impl/LuceneSearcher.java | 23 +- .../project}/knowledge/vo/LikeCount.java | 2 +- .../project}/knowledge/vo/ParseResult.java | 2 +- .../support/project}/knowledge/vo/Roles.java | 4 +- .../project}/knowledge/vo/Sentence.java | 2 +- .../project}/knowledge/vo/UploadFile.java | 2 +- .../project}/knowledge/vo/UploadResults.java | 2 +- .../redcomet/knowledge/bat/MailSendBat.java | 11 - .../knowledge/control/IndexControl.java | 23 -- .../control/open/LicenseControl.java | 10 - .../knowledge/control/open/SignupControl.java | 146 ------------ .../deploy/v0_1_0/Migrate_0_1_0.java | 16 -- .../deploy/v0_3_0/Migrate_0_3_0.java | 23 -- .../deploy/v0_3_1/Migrate_0_3_1.java | 22 -- .../redcomet/knowledge/logic/MailLogic.java | 24 -- src/main/resources/log4j.xml | 59 +---- .../AccountImagesDao_delete.sql | 0 .../AccountImagesDao_insert.sql | 0 .../AccountImagesDao_physical_select_all.sql | 0 ...ccountImagesDao_physical_select_on_key.sql | 0 .../AccountImagesDao_select_all.sql | 0 .../AccountImagesDao_select_on_key.sql | 0 .../AccountImagesDao_update.sql | 0 .../sql/CommentsDao/CommentsDao_delete.sql | 0 .../sql/CommentsDao/CommentsDao_insert.sql | 0 .../CommentsDao_physical_select_all.sql | 0 .../CommentsDao_physical_select_on_key.sql | 0 .../CommentsDao/CommentsDao_select_all.sql | 0 .../CommentsDao/CommentsDao_select_on_key.sql | 0 .../sql/CommentsDao/CommentsDao_update.sql | 0 .../KnowledgeFilesDao_delete.sql | 0 .../KnowledgeFilesDao_insert.sql | 0 .../KnowledgeFilesDao_physical_select_all.sql | 0 ...dgeFilesDao_physical_select_on_file_no.sql | 0 ...owledgeFilesDao_physical_select_on_key.sql | 0 ...lesDao_physical_select_on_knowledge_id.sql | 0 .../KnowledgeFilesDao_select_all.sql | 0 .../KnowledgeFilesDao_select_on_file_no.sql | 0 .../KnowledgeFilesDao_select_on_key.sql | 0 ...owledgeFilesDao_select_on_knowledge_id.sql | 0 .../KnowledgeFilesDao_update.sql | 0 .../KnowledgeGroupsDao_delete.sql | 0 .../KnowledgeGroupsDao_insert.sql | 0 ...KnowledgeGroupsDao_physical_select_all.sql | 0 ...eGroupsDao_physical_select_on_group_id.sql | 0 ...wledgeGroupsDao_physical_select_on_key.sql | 0 ...upsDao_physical_select_on_knowledge_id.sql | 0 .../KnowledgeGroupsDao_select_all.sql | 0 .../KnowledgeGroupsDao_select_on_group_id.sql | 0 .../KnowledgeGroupsDao_select_on_key.sql | 0 ...wledgeGroupsDao_select_on_knowledge_id.sql | 0 .../KnowledgeGroupsDao_update.sql | 0 .../KnowledgeTagsDao_delete.sql | 0 .../KnowledgeTagsDao_insert.sql | 0 .../KnowledgeTagsDao_physical_select_all.sql | 0 ...nowledgeTagsDao_physical_select_on_key.sql | 0 ...agsDao_physical_select_on_knowledge_id.sql | 0 ...ledgeTagsDao_physical_select_on_tag_id.sql | 0 .../KnowledgeTagsDao_select_all.sql | 0 .../KnowledgeTagsDao_select_on_key.sql | 0 ...nowledgeTagsDao_select_on_knowledge_id.sql | 0 .../KnowledgeTagsDao_select_on_tag_id.sql | 0 .../KnowledgeTagsDao_update.sql | 0 .../KnowledgeUsersDao_delete.sql | 0 .../KnowledgeUsersDao_insert.sql | 0 .../KnowledgeUsersDao_physical_select_all.sql | 0 ...owledgeUsersDao_physical_select_on_key.sql | 0 ...ersDao_physical_select_on_knowledge_id.sql | 0 ...dgeUsersDao_physical_select_on_user_id.sql | 0 .../KnowledgeUsersDao_select_all.sql | 0 .../KnowledgeUsersDao_select_on_key.sql | 0 ...owledgeUsersDao_select_on_knowledge_id.sql | 0 .../KnowledgeUsersDao_select_on_user_id.sql | 0 .../KnowledgeUsersDao_update.sql | 0 .../KnowledgesDao/KnowledgesDao_delete.sql | 0 .../KnowledgesDao/KnowledgesDao_insert.sql | 0 .../KnowledgesDao_physical_select_all.sql | 0 .../KnowledgesDao_physical_select_on_key.sql | 0 .../KnowledgesDao_selectOnKeyWithUserName.sql | 0 .../KnowledgesDao_select_all.sql | 0 .../KnowledgesDao_select_on_key.sql | 0 .../KnowledgesDao/KnowledgesDao_update.sql | 0 .../dao/sql/LikesDao/LikesDao_delete.sql | 0 .../dao/sql/LikesDao/LikesDao_insert.sql | 0 .../LikesDao/LikesDao_physical_select_all.sql | 0 .../LikesDao_physical_select_on_key.sql | 0 .../dao/sql/LikesDao/LikesDao_select_all.sql | 0 .../sql/LikesDao/LikesDao_select_on_key.sql | 0 .../dao/sql/LikesDao/LikesDao_update.sql | 0 .../dao/sql/StocksDao/StocksDao_delete.sql | 0 .../dao/sql/StocksDao/StocksDao_insert.sql | 0 .../StocksDao_physical_select_all.sql | 0 .../StocksDao_physical_select_on_key.sql | 0 ...cksDao_physical_select_on_knowledge_id.sql | 0 .../StocksDao_physical_select_on_user_id.sql | 0 .../sql/StocksDao/StocksDao_select_all.sql | 0 .../sql/StocksDao/StocksDao_select_on_key.sql | 0 .../StocksDao_select_on_knowledge_id.sql | 0 .../StocksDao/StocksDao_select_on_user_id.sql | 0 .../dao/sql/StocksDao/StocksDao_update.sql | 0 .../dao/sql/TagsDao/TagsDao_delete.sql | 0 .../dao/sql/TagsDao/TagsDao_insert.sql | 0 .../TagsDao/TagsDao_physical_select_all.sql | 0 .../TagsDao_physical_select_on_key.sql | 0 .../TagsDao/TagsDao_selectOnKnowledgeId.sql | 0 .../TagsDao/TagsDao_selectTagsWithCount.sql | 0 .../TagsDao_selectTagsWithCountOnUser.sql | 0 .../dao/sql/TagsDao/TagsDao_select_all.sql | 0 .../dao/sql/TagsDao/TagsDao_select_on_key.sql | 0 .../dao/sql/TagsDao/TagsDao_update.sql | 0 .../ViewHistoriesDao_delete.sql | 0 .../ViewHistoriesDao_insert.sql | 0 .../ViewHistoriesDao_physical_select_all.sql | 0 ...iewHistoriesDao_physical_select_on_key.sql | 0 .../ViewHistoriesDao_select_all.sql | 0 .../ViewHistoriesDao_select_on_key.sql | 0 .../ViewHistoriesDao_update.sql | 0 .../dao/sql/VotesDao/VotesDao_delete.sql | 0 .../dao/sql/VotesDao/VotesDao_insert.sql | 0 .../VotesDao/VotesDao_physical_select_all.sql | 0 .../VotesDao_physical_select_on_key.sql | 0 .../dao/sql/VotesDao/VotesDao_select_all.sql | 0 .../sql/VotesDao/VotesDao_select_on_key.sql | 0 .../dao/sql/VotesDao/VotesDao_update.sql | 0 .../project}/knowledge/database/ddl.sql | 0 .../knowledge/deploy/v0_3_0/migrate.sql | 0 .../knowledge/deploy/v0_3_0/migrate2.sql | 0 .../knowledge/deploy/v0_3_1/migrate.sql | 0 .../project/knowledge/mail/accept_user.xml | 24 ++ .../project/knowledge/mail/invitation.xml | 22 ++ .../knowledge/mail/notify_accept_user.xml | 16 ++ .../knowledge/mail/notify_add_user.xml | 17 ++ .../WEB-INF/views/admin/config/config.jsp | 12 +- .../WEB-INF/views/admin/mail/config.jsp | 6 +- .../WEB-INF/views/admin/users/accept_list.jsp | 45 ++++ .../webapp/WEB-INF/views/admin/users/list.jsp | 4 +- .../WEB-INF/views/admin/users/view_add.jsp | 4 +- .../WEB-INF/views/admin/users/view_edit.jsp | 4 +- src/main/webapp/WEB-INF/views/auth/form.jsp | 4 +- .../views/commons/layout/commonNavbar.jsp | 25 +- .../views/commons/layout/commonScripts.jsp | 4 +- .../views/commons/layout/layoutMain.jsp | 2 +- .../WEB-INF/views/open/knowledge/list.jsp | 6 +- .../WEB-INF/views/open/knowledge/view.jsp | 8 +- .../WEB-INF/views/open/signup/mail_sended.jsp | 2 +- .../open/signup/provisional_registration.jsp | 2 +- .../WEB-INF/views/open/signup/signup.jsp | 2 +- .../WEB-INF/views/protect/account/index.jsp | 2 +- .../views/protect/account/withdrawal.jsp | 2 +- .../views/protect/knowledge/view_add.jsp | 4 +- .../views/protect/knowledge/view_edit.jsp | 4 +- src/main/webapp/WEB-INF/web.xml | 20 +- .../project}/knowledge/TestCommon.java | 24 +- .../knowledge/dao/KnowledgesDaoTest.java | 16 +- .../knowledge/logic/KnowledgeLogicTest.java | 26 +-- .../knowledge/searcher/SearchTest.java | 26 ++- .../knowledge/tool/AddSampleDatas.java | 41 ++-- .../knowledge/tool/AddSampleKnowledge.java | 32 +-- .../project}/knowledge/tool/DBStart.java | 7 +- .../project}/knowledge/tool/DataClear.java | 12 +- .../knowledge/tool/KnowledgeDBGen.java | 8 +- src/test/resources/ormappingtool.xml | 10 +- 258 files changed, 2157 insertions(+), 1605 deletions(-) rename src/main/java/{redcomet => org/support/project}/knowledge/bat/FileParseBat.java (81%) rename src/main/java/{redcomet => org/support/project}/knowledge/bat/KnowledgeFileClearBat.java (66%) create mode 100644 src/main/java/org/support/project/knowledge/bat/MailSendBat.java rename src/main/java/{redcomet => org/support/project}/knowledge/config/AppConfig.java (85%) rename src/main/java/{redcomet => org/support/project}/knowledge/config/FileType.java (87%) rename src/main/java/{redcomet => org/support/project}/knowledge/config/IndexType.java (82%) create mode 100644 src/main/java/org/support/project/knowledge/config/MailConfig.java rename src/main/java/{redcomet => org/support/project}/knowledge/config/SystemConfig.java (96%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/Control.java (81%) create mode 100644 src/main/java/org/support/project/knowledge/control/IndexControl.java rename src/main/java/{redcomet => org/support/project}/knowledge/control/admin/ConfigControl.java (80%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/admin/MailControl.java (83%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/admin/UsersControl.java (74%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/open/AccountControl.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/open/FileControl.java (54%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/open/KnowledgeControl.java (84%) create mode 100644 src/main/java/org/support/project/knowledge/control/open/LicenseControl.java create mode 100644 src/main/java/org/support/project/knowledge/control/open/SignupControl.java rename src/main/java/{redcomet => org/support/project}/knowledge/control/protect/AccountControl.java (80%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/protect/FileControl.java (75%) rename src/main/java/{redcomet => org/support/project}/knowledge/control/protect/KnowledgeControl.java (88%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/AccountImagesDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/CommentsDao.java (74%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/KnowledgeFilesDao.java (85%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/KnowledgeGroupsDao.java (64%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/KnowledgeTagsDao.java (73%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/KnowledgeUsersDao.java (75%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/KnowledgesDao.java (87%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/LikesDao.java (71%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/StocksDao.java (62%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/TagsDao.java (73%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/ViewHistoriesDao.java (63%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/VotesDao.java (61%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenAccountImagesDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenCommentsDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenKnowledgeFilesDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenKnowledgeGroupsDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenKnowledgeTagsDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenKnowledgeUsersDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenKnowledgesDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenLikesDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenStocksDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenTagsDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenViewHistoriesDao.java (67%) rename src/main/java/{redcomet => org/support/project}/knowledge/dao/gen/GenVotesDao.java (66%) rename src/main/java/{redcomet => org/support/project}/knowledge/deploy/InitDB.java (83%) rename src/main/java/{redcomet => org/support/project}/knowledge/deploy/InitializationListener.java (79%) rename src/main/java/{redcomet => org/support/project}/knowledge/deploy/Migrate.java (77%) rename src/main/java/{redcomet => org/support/project}/knowledge/deploy/v0_0_1/InitializeSystem.java (67%) create mode 100644 src/main/java/org/support/project/knowledge/deploy/v0_1_0/Migrate_0_1_0.java create mode 100644 src/main/java/org/support/project/knowledge/deploy/v0_3_0/Migrate_0_3_0.java create mode 100644 src/main/java/org/support/project/knowledge/deploy/v0_3_1/Migrate_0_3_1.java rename src/main/java/{redcomet => org/support/project}/knowledge/entity/AccountImagesEntity.java (71%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/CommentsEntity.java (77%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/KnowledgeFilesEntity.java (74%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/KnowledgeGroupsEntity.java (73%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/KnowledgeTagsEntity.java (75%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/KnowledgeUsersEntity.java (72%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/KnowledgesEntity.java (79%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/LikesEntity.java (70%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/StocksEntity.java (72%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/TagsEntity.java (80%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/ViewHistoriesEntity.java (70%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/VotesEntity.java (69%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenAccountImagesEntity.java (96%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenCommentsEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenKnowledgeFilesEntity.java (96%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenKnowledgeGroupsEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenKnowledgeTagsEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenKnowledgeUsersEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenKnowledgesEntity.java (96%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenLikesEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenStocksEntity.java (96%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenTagsEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenViewHistoriesEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/entity/gen/GenVotesEntity.java (95%) rename src/main/java/{redcomet => org/support/project}/knowledge/indexer/Indexer.java (74%) rename src/main/java/{redcomet => org/support/project}/knowledge/indexer/IndexingValue.java (91%) rename src/main/java/{redcomet => org/support/project}/knowledge/indexer/impl/LuceneIndexer.java (90%) rename src/main/java/{redcomet => org/support/project}/knowledge/listener/CronListener.java (65%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/AccountLogic.java (83%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/IndexLogic.java (76%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/KnowledgeLogic.java (90%) create mode 100644 src/main/java/org/support/project/knowledge/logic/MailLogic.java rename src/main/java/{redcomet => org/support/project}/knowledge/logic/SystemConfigLogic.java (64%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/TagLogic.java (69%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/UploadedFileLogic.java (91%) rename src/main/java/{redcomet => org/support/project}/knowledge/logic/UserLogic.java (52%) rename src/main/java/{redcomet => org/support/project}/knowledge/parser/Parser.java (65%) rename src/main/java/{redcomet => org/support/project}/knowledge/parser/ParserFactory.java (83%) rename src/main/java/{redcomet => org/support/project}/knowledge/parser/impl/TextParser.java (85%) rename src/main/java/{redcomet => org/support/project}/knowledge/parser/impl/TikaParser.java (82%) rename src/main/java/{redcomet => org/support/project}/knowledge/searcher/SearchResultValue.java (92%) rename src/main/java/{redcomet => org/support/project}/knowledge/searcher/Searcher.java (58%) rename src/main/java/{redcomet => org/support/project}/knowledge/searcher/SearchingValue.java (87%) rename src/main/java/{redcomet => org/support/project}/knowledge/searcher/impl/LuceneSearcher.java (91%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/LikeCount.java (92%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/ParseResult.java (89%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/Roles.java (76%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/Sentence.java (90%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/UploadFile.java (98%) rename src/main/java/{redcomet => org/support/project}/knowledge/vo/UploadResults.java (87%) delete mode 100644 src/main/java/redcomet/knowledge/bat/MailSendBat.java delete mode 100644 src/main/java/redcomet/knowledge/control/IndexControl.java delete mode 100644 src/main/java/redcomet/knowledge/control/open/LicenseControl.java delete mode 100644 src/main/java/redcomet/knowledge/control/open/SignupControl.java delete mode 100644 src/main/java/redcomet/knowledge/deploy/v0_1_0/Migrate_0_1_0.java delete mode 100644 src/main/java/redcomet/knowledge/deploy/v0_3_0/Migrate_0_3_0.java delete mode 100644 src/main/java/redcomet/knowledge/deploy/v0_3_1/Migrate_0_3_1.java delete mode 100644 src/main/java/redcomet/knowledge/logic/MailLogic.java rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_file_no.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_file_no.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/LikesDao/LikesDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/StocksDao/StocksDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/TagsDao/TagsDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_delete.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_insert.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/dao/sql/VotesDao/VotesDao_update.sql (100%) rename src/main/resources/{redcomet => org/support/project}/knowledge/database/ddl.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/deploy/v0_3_0/migrate.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/deploy/v0_3_0/migrate2.sql (100%) rename src/main/{java/redcomet => resources/org/support/project}/knowledge/deploy/v0_3_1/migrate.sql (100%) create mode 100644 src/main/resources/org/support/project/knowledge/mail/accept_user.xml create mode 100644 src/main/resources/org/support/project/knowledge/mail/invitation.xml create mode 100644 src/main/resources/org/support/project/knowledge/mail/notify_accept_user.xml create mode 100644 src/main/resources/org/support/project/knowledge/mail/notify_add_user.xml create mode 100644 src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp rename src/test/java/{redcomet => org/support/project}/knowledge/TestCommon.java (70%) rename src/test/java/{redcomet => org/support/project}/knowledge/dao/KnowledgesDaoTest.java (78%) rename src/test/java/{redcomet => org/support/project}/knowledge/logic/KnowledgeLogicTest.java (85%) rename src/test/java/{redcomet => org/support/project}/knowledge/searcher/SearchTest.java (87%) rename src/test/java/{redcomet => org/support/project}/knowledge/tool/AddSampleDatas.java (84%) rename src/test/java/{redcomet => org/support/project}/knowledge/tool/AddSampleKnowledge.java (77%) rename src/test/java/{redcomet => org/support/project}/knowledge/tool/DBStart.java (75%) rename src/test/java/{redcomet => org/support/project}/knowledge/tool/DataClear.java (59%) rename src/test/java/{redcomet => org/support/project}/knowledge/tool/KnowledgeDBGen.java (66%) diff --git a/pom.xml b/pom.xml index e79de8e7a..356971a94 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,10 @@ 4.0.0 - redcomet + org.support-project knowledge war - 0.3.1 + 0.3.2 webapp for knowledge https://support-project.org/ @@ -15,9 +15,9 @@ - redcomet + org.support-project web - 0.3.1 + 0.3.2 @@ -95,8 +95,8 @@ 3.1 UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -114,11 +114,11 @@ - redcomet-releases + org.support.project-releases https://support-project.org/nexus/content/repositories/releases/ - redcomet-snapshots + org.support.project-snapshots https://support-project.org/nexus/content/repositories/snapshots/ diff --git a/src/main/java/redcomet/knowledge/bat/FileParseBat.java b/src/main/java/org/support/project/knowledge/bat/FileParseBat.java similarity index 81% rename from src/main/java/redcomet/knowledge/bat/FileParseBat.java rename to src/main/java/org/support/project/knowledge/bat/FileParseBat.java index db407dde4..02a8d2497 100644 --- a/src/main/java/redcomet/knowledge/bat/FileParseBat.java +++ b/src/main/java/org/support/project/knowledge/bat/FileParseBat.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.bat; +package org.support.project.knowledge.bat; import java.io.File; import java.io.FileOutputStream; @@ -9,26 +9,25 @@ import org.apache.tika.mime.MimeType; import org.apache.tika.mime.MimeTypes; - -import redcomet.common.config.ConfigLoader; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.FileUtil; -import redcomet.common.util.StringUtils; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.config.IndexType; -import redcomet.knowledge.dao.KnowledgeFilesDao; -import redcomet.knowledge.dao.KnowledgesDao; -import redcomet.knowledge.dao.TagsDao; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.knowledge.indexer.IndexingValue; -import redcomet.knowledge.logic.IndexLogic; -import redcomet.knowledge.logic.KnowledgeLogic; -import redcomet.knowledge.parser.Parser; -import redcomet.knowledge.parser.ParserFactory; -import redcomet.knowledge.vo.ParseResult; +import org.support.project.common.config.ConfigLoader; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.FileUtil; +import org.support.project.common.util.StringUtils; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.IndexType; +import org.support.project.knowledge.dao.KnowledgeFilesDao; +import org.support.project.knowledge.dao.KnowledgesDao; +import org.support.project.knowledge.dao.TagsDao; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.knowledge.indexer.IndexingValue; +import org.support.project.knowledge.logic.IndexLogic; +import org.support.project.knowledge.logic.KnowledgeLogic; +import org.support.project.knowledge.parser.Parser; +import org.support.project.knowledge.parser.ParserFactory; +import org.support.project.knowledge.vo.ParseResult; public class FileParseBat { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/bat/KnowledgeFileClearBat.java b/src/main/java/org/support/project/knowledge/bat/KnowledgeFileClearBat.java similarity index 66% rename from src/main/java/redcomet/knowledge/bat/KnowledgeFileClearBat.java rename to src/main/java/org/support/project/knowledge/bat/KnowledgeFileClearBat.java index e6b186fde..0a57b6730 100644 --- a/src/main/java/redcomet/knowledge/bat/KnowledgeFileClearBat.java +++ b/src/main/java/org/support/project/knowledge/bat/KnowledgeFileClearBat.java @@ -1,8 +1,8 @@ -package redcomet.knowledge.bat; +package org.support.project.knowledge.bat; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.knowledge.dao.KnowledgeFilesDao; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.knowledge.dao.KnowledgeFilesDao; public class KnowledgeFileClearBat { diff --git a/src/main/java/org/support/project/knowledge/bat/MailSendBat.java b/src/main/java/org/support/project/knowledge/bat/MailSendBat.java new file mode 100644 index 000000000..4095e5362 --- /dev/null +++ b/src/main/java/org/support/project/knowledge/bat/MailSendBat.java @@ -0,0 +1,156 @@ +package org.support.project.knowledge.bat; + +import java.io.UnsupportedEncodingException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.util.Date; +import java.util.List; +import java.util.Properties; + +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.PasswordAuthentication; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; + +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.PasswordUtil; +import org.support.project.common.util.StringUtils; +import org.support.project.web.dao.MailConfigsDao; +import org.support.project.web.dao.MailsDao; +import org.support.project.web.entity.MailConfigsEntity; +import org.support.project.web.entity.MailsEntity; + +/** + * メールの送信処理は、時間がかかるため、バッチ処理の中で処理する + * + * @author Koda + * + */ +public class MailSendBat { + /** ログ */ + private static Log LOG = LogFactory.getLog(MailSendBat.class); + + /** メールの状態:未送信(送信待ち) */ + public static final int MAIL_STATUS_UNSENT = 0; + /** メールの状態:送信済 */ + public static final int MAIL_STATUS_SENDED = 10; + + public static void main(String[] args) throws Exception { + MailSendBat bat = new MailSendBat(); + bat.start(); + + } + + /** + * メール送信処理の実行 + * @throws UnsupportedEncodingException + * @throws MessagingException + * @throws InvalidKeyException + * @throws NoSuchAlgorithmException + * @throws NoSuchPaddingException + * @throws IllegalBlockSizeException + * @throws BadPaddingException + */ + public void start() throws UnsupportedEncodingException, MessagingException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { + MailConfigsDao mailConfigsDao = MailConfigsDao.get(); + MailConfigsEntity mailConfigsEntity = mailConfigsDao.selectOnKey(org.support.project.knowledge.config.AppConfig.SYSTEM_NAME); + if (mailConfigsEntity == null) { + // メールの設定が登録されていなければ、送信処理は終了 + return; + } + + MailsDao dao = MailsDao.get(); + List entities = dao.selectOnStatus(MAIL_STATUS_UNSENT); + int count = 0; + for (MailsEntity mailsEntity : entities) { + mailSend(mailConfigsEntity, mailsEntity); + count++; + } + LOG.info("MAIL sended. count: " + count); + } + + /** + * メールを送信 + * @param config + * @param entity + * @throws MessagingException + * @throws UnsupportedEncodingException + * @throws BadPaddingException + * @throws IllegalBlockSizeException + * @throws NoSuchPaddingException + * @throws NoSuchAlgorithmException + * @throws InvalidKeyException + */ + private void mailSend(MailConfigsEntity config, MailsEntity entity) throws MessagingException, UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { + String host = config.getHost(); + String port = String.valueOf(config.getPort()); + + String to = entity.getToAddress(); + String toName = entity.getToName(); + + String from = entity.getFromAddress(); + String fromName = entity.getFromName(); + if (StringUtils.isEmpty(from)) { + from = config.getFromAddress(); + } + if (StringUtils.isEmpty(fromName)) { + fromName = config.getFromName(); + } + + String title = entity.getTitle(); + String message = entity.getContent(); + + Properties property = new Properties(); + property.put("mail.smtp.host", host); + property.put("mail.smtp.port", port); + property.put("mail.smtp.socketFactory.port", port); + property.put("mail.smtp.debug", "true"); + + Session session; + if (1 == config.getAuthType()) { + // 認証あり + final String smtpid = config.getSmtpId(); + final String smtppass = PasswordUtil.decrypt(config.getSmtpPassword(), config.getSalt()); + + property.put("mail.smtp.auth", "true"); + property.put("mail.smtp.starttls.enable", "true"); + property.put("mail.smtp.ssl.trust", host); + + session = Session.getInstance(property, new javax.mail.Authenticator() { + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(smtpid, smtppass); + } + }); + } else { + // 認証無し + session = Session.getDefaultInstance(property); + } + + MimeMessage mimeMessage = new MimeMessage(session); + InternetAddress toAddress = new InternetAddress(to, toName, "ISO-2022-JP"); + mimeMessage.setRecipient(Message.RecipientType.TO, toAddress); + InternetAddress fromAddress = new InternetAddress(from, fromName, "ISO-2022-JP"); + mimeMessage.setFrom(fromAddress); + mimeMessage.setSubject(title, "ISO-2022-JP"); + mimeMessage.setText(message, "ISO-2022-JP"); + + // メールの形式を指定 + // mimeMessage.setHeader( "Content-Type", "text/html" ); + // 送信日付を指定 + mimeMessage.setSentDate( new Date() ); + Transport.send(mimeMessage); + LOG.debug("Mail sended."); + + // ステータス更新 + MailsDao dao = MailsDao.get(); + entity.setStatus(MAIL_STATUS_SENDED); + dao.save(entity); + } +} diff --git a/src/main/java/redcomet/knowledge/config/AppConfig.java b/src/main/java/org/support/project/knowledge/config/AppConfig.java similarity index 85% rename from src/main/java/redcomet/knowledge/config/AppConfig.java rename to src/main/java/org/support/project/knowledge/config/AppConfig.java index f65687ce2..55a5953a2 100644 --- a/src/main/java/redcomet/knowledge/config/AppConfig.java +++ b/src/main/java/org/support/project/knowledge/config/AppConfig.java @@ -1,7 +1,7 @@ -package redcomet.knowledge.config; +package org.support.project.knowledge.config; -public class AppConfig extends redcomet.web.config.AppConfig { +public class AppConfig extends org.support.project.web.config.AppConfig { public static final String SYSTEM_NAME = "knowledge"; private String indexPath; diff --git a/src/main/java/redcomet/knowledge/config/FileType.java b/src/main/java/org/support/project/knowledge/config/FileType.java similarity index 87% rename from src/main/java/redcomet/knowledge/config/FileType.java rename to src/main/java/org/support/project/knowledge/config/FileType.java index bc27cce25..c334c1e39 100644 --- a/src/main/java/redcomet/knowledge/config/FileType.java +++ b/src/main/java/org/support/project/knowledge/config/FileType.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.config; +package org.support.project.knowledge.config; public enum FileType { diff --git a/src/main/java/redcomet/knowledge/config/IndexType.java b/src/main/java/org/support/project/knowledge/config/IndexType.java similarity index 82% rename from src/main/java/redcomet/knowledge/config/IndexType.java rename to src/main/java/org/support/project/knowledge/config/IndexType.java index e84eac5c6..a7414b7eb 100644 --- a/src/main/java/redcomet/knowledge/config/IndexType.java +++ b/src/main/java/org/support/project/knowledge/config/IndexType.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.config; +package org.support.project.knowledge.config; public enum IndexType { knowledge, diff --git a/src/main/java/org/support/project/knowledge/config/MailConfig.java b/src/main/java/org/support/project/knowledge/config/MailConfig.java new file mode 100644 index 000000000..dbf56fa05 --- /dev/null +++ b/src/main/java/org/support/project/knowledge/config/MailConfig.java @@ -0,0 +1,33 @@ +package org.support.project.knowledge.config; + +public class MailConfig { + + private String title; + private String contents; + /** + * @return the title + */ + public String getTitle() { + return title; + } + /** + * @param title the title to set + */ + public void setTitle(String title) { + this.title = title; + } + /** + * @return the contents + */ + public String getContents() { + return contents; + } + /** + * @param contents the contents to set + */ + public void setContents(String contents) { + this.contents = contents; + } + + +} diff --git a/src/main/java/redcomet/knowledge/config/SystemConfig.java b/src/main/java/org/support/project/knowledge/config/SystemConfig.java similarity index 96% rename from src/main/java/redcomet/knowledge/config/SystemConfig.java rename to src/main/java/org/support/project/knowledge/config/SystemConfig.java index 78323e8cb..933a59b89 100644 --- a/src/main/java/redcomet/knowledge/config/SystemConfig.java +++ b/src/main/java/org/support/project/knowledge/config/SystemConfig.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.config; +package org.support.project.knowledge.config; public class SystemConfig { public static final String ROLE_ADMIN = "admin"; diff --git a/src/main/java/redcomet/knowledge/control/Control.java b/src/main/java/org/support/project/knowledge/control/Control.java similarity index 81% rename from src/main/java/redcomet/knowledge/control/Control.java rename to src/main/java/org/support/project/knowledge/control/Control.java index 17271ae49..ae12cfc37 100644 --- a/src/main/java/redcomet/knowledge/control/Control.java +++ b/src/main/java/org/support/project/knowledge/control/Control.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.control; +package org.support.project.knowledge.control; import java.util.ArrayList; import java.util.List; @@ -10,18 +10,17 @@ import org.owasp.validator.html.Policy; import org.owasp.validator.html.PolicyException; import org.owasp.validator.html.ScanException; - -import redcomet.common.bean.ValidateError; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.log.LogLevel; -import redcomet.common.util.HtmlUtils; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.web.util.JspUtil; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.log.LogLevel; +import org.support.project.common.util.HtmlUtils; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.web.util.JspUtil; @DI(instance=Instance.Prototype) -public abstract class Control extends redcomet.web.control.Control { +public abstract class Control extends org.support.project.web.control.Control { /** ログ */ private static Log LOG = LogFactory.getLog(Control.class); @@ -95,10 +94,10 @@ public static String doSamy(String str) throws PolicyException, ScanException { } /* (non-Javadoc) - * @see redcomet.web.control.Control#copy(redcomet.web.control.Control) + * @see org.support.project.web.control.Control#copy(org.support.project.web.control.Control) */ @Override - protected void copy(redcomet.web.control.Control control) { + protected void copy(org.support.project.web.control.Control control) { super.copy(control); if (control instanceof Control) { Control c = (Control) control; diff --git a/src/main/java/org/support/project/knowledge/control/IndexControl.java b/src/main/java/org/support/project/knowledge/control/IndexControl.java new file mode 100644 index 000000000..6cd6fc954 --- /dev/null +++ b/src/main/java/org/support/project/knowledge/control/IndexControl.java @@ -0,0 +1,23 @@ +package org.support.project.knowledge.control; + +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.web.bean.MessageResult; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.config.MessageStatus; + +@DI(instance=Instance.Prototype) +public class IndexControl extends Control { + /** ログ */ + private static Log log = LogFactory.getLog(IndexControl.class); + + public Boundary msg() { + MessageResult result = new MessageResult(); + result.setStatus(MessageStatus.Success.getValue()); + result.setMessage("OK"); + return send(result); + } + +} diff --git a/src/main/java/redcomet/knowledge/control/admin/ConfigControl.java b/src/main/java/org/support/project/knowledge/control/admin/ConfigControl.java similarity index 80% rename from src/main/java/redcomet/knowledge/control/admin/ConfigControl.java rename to src/main/java/org/support/project/knowledge/control/admin/ConfigControl.java index 7d6dcbc26..35ed35617 100644 --- a/src/main/java/redcomet/knowledge/control/admin/ConfigControl.java +++ b/src/main/java/org/support/project/knowledge/control/admin/ConfigControl.java @@ -1,18 +1,18 @@ -package redcomet.knowledge.control.admin; +package org.support.project.knowledge.control.admin; import java.util.ArrayList; import java.util.List; -import redcomet.common.bean.ValidateError; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.config.SystemConfig; -import redcomet.knowledge.control.Control; -import redcomet.web.annotation.Auth; -import redcomet.web.boundary.Boundary; -import redcomet.web.dao.MailConfigsDao; -import redcomet.web.dao.SystemConfigsDao; -import redcomet.web.entity.MailConfigsEntity; -import redcomet.web.entity.SystemConfigsEntity; +import org.support.project.common.bean.ValidateError; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.knowledge.control.Control; +import org.support.project.web.annotation.Auth; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.dao.MailConfigsDao; +import org.support.project.web.dao.SystemConfigsDao; +import org.support.project.web.entity.MailConfigsEntity; +import org.support.project.web.entity.SystemConfigsEntity; public class ConfigControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/admin/MailControl.java b/src/main/java/org/support/project/knowledge/control/admin/MailControl.java similarity index 83% rename from src/main/java/redcomet/knowledge/control/admin/MailControl.java rename to src/main/java/org/support/project/knowledge/control/admin/MailControl.java index b5357fd52..d794f2a6b 100644 --- a/src/main/java/redcomet/knowledge/control/admin/MailControl.java +++ b/src/main/java/org/support/project/knowledge/control/admin/MailControl.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.control.admin; +package org.support.project.knowledge.control.admin; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; @@ -9,16 +9,16 @@ import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; -import redcomet.common.bean.ValidateError; -import redcomet.common.config.INT_FLAG; -import redcomet.common.util.PasswordUtil; -import redcomet.common.util.StringUtils; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.control.Control; -import redcomet.web.annotation.Auth; -import redcomet.web.boundary.Boundary; -import redcomet.web.dao.MailConfigsDao; -import redcomet.web.entity.MailConfigsEntity; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.config.INT_FLAG; +import org.support.project.common.util.PasswordUtil; +import org.support.project.common.util.StringUtils; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.control.Control; +import org.support.project.web.annotation.Auth; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.dao.MailConfigsDao; +import org.support.project.web.entity.MailConfigsEntity; public class MailControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/admin/UsersControl.java b/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java similarity index 74% rename from src/main/java/redcomet/knowledge/control/admin/UsersControl.java rename to src/main/java/org/support/project/knowledge/control/admin/UsersControl.java index 62f9af1e2..8182d8240 100644 --- a/src/main/java/redcomet/knowledge/control/admin/UsersControl.java +++ b/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java @@ -1,26 +1,31 @@ -package redcomet.knowledge.control.admin; +package org.support.project.knowledge.control.admin; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import redcomet.common.bean.ValidateError; -import redcomet.common.util.PropertyUtil; -import redcomet.common.util.StringUtils; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.logic.UserLogic; -import redcomet.knowledge.vo.Roles; -import redcomet.web.annotation.Auth; -import redcomet.web.boundary.Boundary; -import redcomet.web.config.RedCometWebParameter; -import redcomet.web.dao.RolesDao; -import redcomet.web.dao.UsersDao; -import redcomet.web.entity.RolesEntity; -import redcomet.web.entity.UsersEntity; -import redcomet.web.exception.InvalidParamException; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.util.PropertyUtil; +import org.support.project.common.util.StringUtils; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.logic.MailLogic; +import org.support.project.knowledge.logic.UserLogic; +import org.support.project.knowledge.vo.Roles; +import org.support.project.web.annotation.Auth; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; +import org.support.project.web.common.HttpUtil; +import org.support.project.web.config.CommonWebParameter; +import org.support.project.web.dao.ProvisionalRegistrationsDao; +import org.support.project.web.dao.RolesDao; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.ProvisionalRegistrationsEntity; +import org.support.project.web.entity.RolesEntity; +import org.support.project.web.entity.UsersEntity; +import org.support.project.web.exception.InvalidParamException; @DI(instance=Instance.Prototype) public class UsersControl extends Control { @@ -117,8 +122,8 @@ private void setSystemRoles(UsersEntity user) { } } else { // ユーザが指定されていない = 新規登録なので、デフォルト値をチェック(一般ユーザ権限にチェック) - if (map.containsKey(RedCometWebParameter.ROLE_USER)) { - Roles role = map.get(RedCometWebParameter.ROLE_USER); + if (map.containsKey(CommonWebParameter.ROLE_USER)) { + Roles role = map.get(CommonWebParameter.ROLE_USER); role.setChecked(true); } } @@ -293,6 +298,53 @@ public Boundary delete() throws Exception { return list(Integer.parseInt(offset), ""); } + /** + * ユーザ登録承認待ちの一覧表示 + * @return + */ + @Auth(roles="admin") + public Boundary accept_list() { + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + List entries = dao.selectAll(); + setAttribute("entries", entries); + return forward("accept_list.jsp"); + } + + + /** + * ユーザ登録承認 + * @return + */ + @Auth(roles="admin") + public Boundary accept() { + String id = getPathInfo(); + if (StringUtils.isEmpty(id)) { + return accept_list(); + } + if (id.startsWith("/")) { + id = id.substring(1); + } + + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + ProvisionalRegistrationsEntity entity = dao.selectOnKey(id); + if (entity == null) { + addMsgWarn("承認する仮登録情報が見つかりませんでした。(他の管理者が承認)"); + return accept_list(); + } + + UsersEntity user = UserLogic.get().activate(entity); + if (user != null) { + addMsgSuccess("承認しました"); + + // 承認されたことを通知 + MailLogic mailLogic = MailLogic.get(); + String url = HttpUtil.getContextUrl(getRequest()); + mailLogic.sendAcceptedAddRequest(entity, url); + } else { + addMsgInfo("他の管理者がすでに承認していました"); + } + return accept_list(); + } } diff --git a/src/main/java/redcomet/knowledge/control/open/AccountControl.java b/src/main/java/org/support/project/knowledge/control/open/AccountControl.java similarity index 67% rename from src/main/java/redcomet/knowledge/control/open/AccountControl.java rename to src/main/java/org/support/project/knowledge/control/open/AccountControl.java index f78474a4a..51f8d1285 100644 --- a/src/main/java/redcomet/knowledge/control/open/AccountControl.java +++ b/src/main/java/org/support/project/knowledge/control/open/AccountControl.java @@ -1,14 +1,14 @@ -package redcomet.knowledge.control.open; +package org.support.project.knowledge.control.open; import java.io.InputStream; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.dao.AccountImagesDao; -import redcomet.knowledge.entity.AccountImagesEntity; -import redcomet.web.boundary.Boundary; -import redcomet.web.exception.InvalidParamException; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.dao.AccountImagesDao; +import org.support.project.knowledge.entity.AccountImagesEntity; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.exception.InvalidParamException; @DI(instance=Instance.Prototype) public class AccountControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/open/FileControl.java b/src/main/java/org/support/project/knowledge/control/open/FileControl.java similarity index 54% rename from src/main/java/redcomet/knowledge/control/open/FileControl.java rename to src/main/java/org/support/project/knowledge/control/open/FileControl.java index 0250222ac..0184f2db1 100644 --- a/src/main/java/redcomet/knowledge/control/open/FileControl.java +++ b/src/main/java/org/support/project/knowledge/control/open/FileControl.java @@ -1,14 +1,14 @@ -package redcomet.knowledge.control.open; +package org.support.project.knowledge.control.open; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.logic.UploadedFileLogic; -import redcomet.web.boundary.Boundary; -import redcomet.web.common.HttpStatus; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.logic.UploadedFileLogic; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; @DI(instance=Instance.Prototype) public class FileControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/open/KnowledgeControl.java b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java similarity index 84% rename from src/main/java/redcomet/knowledge/control/open/KnowledgeControl.java rename to src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java index 1d09e8362..5c190a265 100644 --- a/src/main/java/redcomet/knowledge/control/open/KnowledgeControl.java +++ b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java @@ -1,31 +1,31 @@ -package redcomet.knowledge.control.open; +package org.support.project.knowledge.control.open; import java.util.ArrayList; import java.util.List; import javax.servlet.http.Cookie; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.StringUtils; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.dao.CommentsDao; -import redcomet.knowledge.dao.LikesDao; -import redcomet.knowledge.dao.TagsDao; -import redcomet.knowledge.entity.CommentsEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.knowledge.logic.KnowledgeLogic; -import redcomet.knowledge.logic.TagLogic; -import redcomet.knowledge.logic.UploadedFileLogic; -import redcomet.knowledge.vo.LikeCount; -import redcomet.knowledge.vo.UploadFile; -import redcomet.web.bean.LoginedUser; -import redcomet.web.boundary.Boundary; -import redcomet.web.common.HttpStatus; -import redcomet.web.exception.InvalidParamException; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.StringUtils; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.dao.CommentsDao; +import org.support.project.knowledge.dao.LikesDao; +import org.support.project.knowledge.dao.TagsDao; +import org.support.project.knowledge.entity.CommentsEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.knowledge.logic.KnowledgeLogic; +import org.support.project.knowledge.logic.TagLogic; +import org.support.project.knowledge.logic.UploadedFileLogic; +import org.support.project.knowledge.vo.LikeCount; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.web.bean.LoginedUser; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; +import org.support.project.web.exception.InvalidParamException; @DI(instance=Instance.Prototype) public class KnowledgeControl extends Control { diff --git a/src/main/java/org/support/project/knowledge/control/open/LicenseControl.java b/src/main/java/org/support/project/knowledge/control/open/LicenseControl.java new file mode 100644 index 000000000..71bf2f6ab --- /dev/null +++ b/src/main/java/org/support/project/knowledge/control/open/LicenseControl.java @@ -0,0 +1,10 @@ +package org.support.project.knowledge.control.open; + +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; + +@DI(instance=Instance.Prototype) +public class LicenseControl extends Control { + +} diff --git a/src/main/java/org/support/project/knowledge/control/open/SignupControl.java b/src/main/java/org/support/project/knowledge/control/open/SignupControl.java new file mode 100644 index 000000000..d50ad53db --- /dev/null +++ b/src/main/java/org/support/project/knowledge/control/open/SignupControl.java @@ -0,0 +1,217 @@ +package org.support.project.knowledge.control.open; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +import org.support.project.aop.Aspect; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.util.StringUtils; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.logic.MailLogic; +import org.support.project.knowledge.logic.UserLogic; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; +import org.support.project.web.common.HttpUtil; +import org.support.project.web.dao.ProvisionalRegistrationsDao; +import org.support.project.web.dao.SystemConfigsDao; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.ProvisionalRegistrationsEntity; +import org.support.project.web.entity.SystemConfigsEntity; +import org.support.project.web.entity.UsersEntity; +import org.support.project.web.logic.AuthenticationLogic; +import org.support.project.web.logic.impl.DefaultAuthenticationLogicImpl; + +public class SignupControl extends Control { + + /** + * ユーザのサインアップ画面を表示 + * @return + */ + public Boundary view() { + return forward("signup.jsp"); + } + + /** + * 新規登録処理を保存 + * @return + */ + public Boundary save() { + SystemConfigsDao systemConfigsDao = SystemConfigsDao.get(); + SystemConfigsEntity userAddType = systemConfigsDao.selectOnKey(SystemConfig.USER_ADD_TYPE, AppConfig.SYSTEM_NAME); + if (userAddType == null) { + // ユーザによるデータの追加は認められていない + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_ADMIN)) { + // ユーザによるデータの追加は認められていない + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + + List errors = validate(); + if (!errors.isEmpty()) { + setResult(null, errors); + return forward("signup.jsp"); + } + + if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_USER)) { + // ユーザが自分で登録 + addUser(); + addMsgInfo("ユーザ登録しました"); + return redirect(getRequest().getContextPath()); + } else if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_MAIL)) { + // 招待メールで登録 + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + List check = dao.selectOnUserKey(getParam("userKey")); + if (!check.isEmpty()) { + long now = new Date().getTime(); + for (ProvisionalRegistrationsEntity entity : check) { + if (now - entity.getInsertDatetime().getTime() > 1000 * 60 * 60) { + // 無効なものなので、削除 + dao.delete(entity); + } else { + addMsgWarn("既に登録済です。登録されたメールアドレスに招待のメールを送信していますので、ご確認ください。"); + return forward("signup.jsp"); + } + } + } + // 仮登録を行う + ProvisionalRegistrationsEntity entity = addProvisionalRegistration(); + // 招待のメールを送信 + String url = HttpUtil.getContextUrl(getRequest()); + MailLogic mailLogic = MailLogic.get(); + mailLogic.sendInvitation(entity, url); + return forward("mail_sended.jsp"); + } else if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_APPROVE)){ + // 管理者が承認 + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + List check = dao.selectOnUserKey(getParam("userKey")); + if (!check.isEmpty()) { + addMsgWarn("既に登録済ですが管理者による確認がすんでいません。少々お待ちください。"); + return forward("signup.jsp"); + } + // 仮登録を行う + ProvisionalRegistrationsEntity entity = addProvisionalRegistration(); + // 管理者へメール通知 + MailLogic mailLogic = MailLogic.get(); + mailLogic.sendNotifyAcceptUser(entity); + + return forward("provisional_registration.jsp"); + } + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + + + + /** + * 仮登録 + * @return + */ + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) + private ProvisionalRegistrationsEntity addProvisionalRegistration() { + ProvisionalRegistrationsEntity entity = super.getParams(ProvisionalRegistrationsEntity.class); + String id = UUID.randomUUID().toString() + "-" + new Date().getTime() + "-" + UUID.randomUUID().toString(); + entity.setId(id); + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + //既に仮登録が行われたユーザ(メールアドレス)でも、再度仮登録できる + //ただし、以前の登録は無効にする + dao.deleteOnUserKey(entity.getUserKey()); + //データ登録 + entity = dao.insert(entity); + return entity; + } + + /** + * ユーザ追加 + */ + private void addUser() { + // エラーが無い場合のみ登録 + UsersEntity user = super.getParams(UsersEntity.class); + String[] roles = {SystemConfig.ROLE_USER}; + user = UserLogic.get().insert(user, roles, getLoginedUser()); + setAttributeOnProperty(user); + + // 管理者へユーザが追加されたことを通知 + MailLogic mailLogic = MailLogic.get(); + mailLogic.sendNotifyAddUser(user); + + // ログイン処理 + AuthenticationLogic logic = Container.getComp(DefaultAuthenticationLogicImpl.class); + logic.setSession(user.getUserKey(), getRequest()); + } + + /** + * 入力チェック + * @return + */ + private List validate() { + List errors = UsersEntity.get().validate(getParams()); + if (!StringUtils.isEmpty(getParam("password"))) { + if (!getParam("password").equals(getParam("confirm_password", String.class))) { + ValidateError error = new ValidateError("PasswordとConfirm Passwordが違っています"); + errors.add(error); + } + } + UsersDao dao = UsersDao.get(); + UsersEntity user = dao.selectOnUserKey(getParam("userKey")); + if (user != null) { + ValidateError error = new ValidateError("既に登録されているEmail Addressです"); + errors.add(error); + } + + Validator validator = ValidatorFactory.getInstance(Validator.MAIL); + ValidateError error = validator.validate(getParam("userKey"), "Email Address"); + if (error != null) { + errors.add(error); + } + return errors; + } + + + /** + * 招待メールからの本登録 + * @return + */ + public Boundary activate() { + String id = getPathInfo(); + if (StringUtils.isEmpty(id)) { + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + if (id.startsWith("/")) { + id = id.substring(1); + } + + ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); + ProvisionalRegistrationsEntity entity = dao.selectOnKey(id); + if (entity == null) { + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + + long now = new Date().getTime(); + if (now - entity.getInsertDatetime().getTime() > 1000 * 60 * 60) { + return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); + } + + // 仮登録から本登録へ + UsersEntity user = UserLogic.get().activate(entity); + // 管理者へユーザが追加されたことを通知 + if (user != null) { + MailLogic mailLogic = MailLogic.get(); + mailLogic.sendNotifyAddUser(user); + + } + + // ログイン処理 + AuthenticationLogic logic = Container.getComp(DefaultAuthenticationLogicImpl.class); + logic.setSession(entity.getUserKey(), getRequest()); + + addMsgInfo("ユーザ登録が完了しました"); + return devolution("Index/index"); + } + +} diff --git a/src/main/java/redcomet/knowledge/control/protect/AccountControl.java b/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java similarity index 80% rename from src/main/java/redcomet/knowledge/control/protect/AccountControl.java rename to src/main/java/org/support/project/knowledge/control/protect/AccountControl.java index e8ad78b6d..b17bf40f6 100644 --- a/src/main/java/redcomet/knowledge/control/protect/AccountControl.java +++ b/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.control.protect; +package org.support.project.knowledge.control.protect; import java.io.IOException; import java.util.ArrayList; @@ -6,26 +6,25 @@ import java.util.Map; import org.apache.commons.fileupload.FileItem; - -import redcomet.common.bean.ValidateError; -import redcomet.common.util.StringUtils; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.logic.AccountLogic; -import redcomet.knowledge.logic.UserLogic; -import redcomet.knowledge.vo.UploadFile; -import redcomet.knowledge.vo.UploadResults; -import redcomet.web.bean.LoginedUser; -import redcomet.web.boundary.Boundary; -import redcomet.web.common.HttpStatus; -import redcomet.web.dao.UsersDao; -import redcomet.web.entity.UsersEntity; -import redcomet.web.logic.AuthenticationLogic; -import redcomet.web.logic.impl.DefaultAuthenticationLogicImpl; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.util.StringUtils; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.logic.AccountLogic; +import org.support.project.knowledge.logic.UserLogic; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.knowledge.vo.UploadResults; +import org.support.project.web.bean.LoginedUser; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.UsersEntity; +import org.support.project.web.logic.AuthenticationLogic; +import org.support.project.web.logic.impl.DefaultAuthenticationLogicImpl; @DI(instance=Instance.Prototype) public class AccountControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/protect/FileControl.java b/src/main/java/org/support/project/knowledge/control/protect/FileControl.java similarity index 75% rename from src/main/java/redcomet/knowledge/control/protect/FileControl.java rename to src/main/java/org/support/project/knowledge/control/protect/FileControl.java index b5a81b285..190dfe8ec 100644 --- a/src/main/java/redcomet/knowledge/control/protect/FileControl.java +++ b/src/main/java/org/support/project/knowledge/control/protect/FileControl.java @@ -1,23 +1,22 @@ -package redcomet.knowledge.control.protect; +package org.support.project.knowledge.control.protect; import java.util.ArrayList; import java.util.List; import org.apache.commons.fileupload.FileItem; - -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.dao.KnowledgeFilesDao; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.logic.UploadedFileLogic; -import redcomet.knowledge.vo.UploadFile; -import redcomet.knowledge.vo.UploadResults; -import redcomet.web.boundary.Boundary; -import redcomet.web.boundary.JsonBoundary; -import redcomet.web.common.HttpStatus; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.dao.KnowledgeFilesDao; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.logic.UploadedFileLogic; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.knowledge.vo.UploadResults; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.boundary.JsonBoundary; +import org.support.project.web.common.HttpStatus; @DI(instance=Instance.Prototype) public class FileControl extends Control { diff --git a/src/main/java/redcomet/knowledge/control/protect/KnowledgeControl.java b/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java similarity index 88% rename from src/main/java/redcomet/knowledge/control/protect/KnowledgeControl.java rename to src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java index 9a53844df..b4924cb0f 100644 --- a/src/main/java/redcomet/knowledge/control/protect/KnowledgeControl.java +++ b/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java @@ -1,28 +1,28 @@ -package redcomet.knowledge.control.protect; +package org.support.project.knowledge.control.protect; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import redcomet.common.bean.ValidateError; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.dao.CommentsDao; -import redcomet.knowledge.dao.KnowledgesDao; -import redcomet.knowledge.entity.CommentsEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.knowledge.logic.KnowledgeLogic; -import redcomet.knowledge.logic.UploadedFileLogic; -import redcomet.knowledge.vo.UploadFile; -import redcomet.web.boundary.Boundary; -import redcomet.web.common.HttpStatus; -import redcomet.web.exception.InvalidParamException; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.dao.CommentsDao; +import org.support.project.knowledge.dao.KnowledgesDao; +import org.support.project.knowledge.entity.CommentsEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.knowledge.logic.KnowledgeLogic; +import org.support.project.knowledge.logic.UploadedFileLogic; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.web.boundary.Boundary; +import org.support.project.web.common.HttpStatus; +import org.support.project.web.exception.InvalidParamException; @DI(instance=Instance.Prototype) public class KnowledgeControl extends Control { diff --git a/src/main/java/redcomet/knowledge/dao/AccountImagesDao.java b/src/main/java/org/support/project/knowledge/dao/AccountImagesDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/AccountImagesDao.java rename to src/main/java/org/support/project/knowledge/dao/AccountImagesDao.java index b5958eca6..5ca93a690 100644 --- a/src/main/java/redcomet/knowledge/dao/AccountImagesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/AccountImagesDao.java @@ -1,10 +1,10 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenAccountImagesDao; -import redcomet.knowledge.entity.AccountImagesEntity; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenAccountImagesDao; +import org.support.project.knowledge.entity.AccountImagesEntity; /** * アカウントの画像 diff --git a/src/main/java/redcomet/knowledge/dao/CommentsDao.java b/src/main/java/org/support/project/knowledge/dao/CommentsDao.java similarity index 74% rename from src/main/java/redcomet/knowledge/dao/CommentsDao.java rename to src/main/java/org/support/project/knowledge/dao/CommentsDao.java index 5712acbd9..43e83f3d4 100644 --- a/src/main/java/redcomet/knowledge/dao/CommentsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/CommentsDao.java @@ -1,12 +1,12 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; import java.util.List; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenCommentsDao; -import redcomet.knowledge.entity.CommentsEntity; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenCommentsDao; +import org.support.project.knowledge.entity.CommentsEntity; /** * コメント diff --git a/src/main/java/redcomet/knowledge/dao/KnowledgeFilesDao.java b/src/main/java/org/support/project/knowledge/dao/KnowledgeFilesDao.java similarity index 85% rename from src/main/java/redcomet/knowledge/dao/KnowledgeFilesDao.java rename to src/main/java/org/support/project/knowledge/dao/KnowledgeFilesDao.java index 035d8866c..1a61da6d0 100644 --- a/src/main/java/redcomet/knowledge/dao/KnowledgeFilesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/KnowledgeFilesDao.java @@ -1,17 +1,17 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; import java.sql.Timestamp; import java.util.Date; import java.util.List; -import redcomet.aop.Aspect; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenKnowledgeFilesDao; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.web.bean.LoginedUser; +import org.support.project.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenKnowledgeFilesDao; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.web.bean.LoginedUser; /** * 添付ファイル @@ -72,7 +72,7 @@ public void connectKnowledge(Long fileNo, Long knowledgeId, LoginedUser loginedU /** * ナレッジに紐づいていないファイルで、かつ更新日が24時間前のものは削除する */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public int deleteNotConnectFiles() { StringBuilder sql = new StringBuilder(); sql.append("DELETE FROM KNOWLEDGE_FILES WHERE KNOWLEDGE_ID IS NULL AND UPDATE_DATETIME < ? "); @@ -100,7 +100,7 @@ public List selectWaitStateFiles() { * @param parseStatus * @param updateUserId */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void changeStatus(Long fileNo, int parseStatus, Integer updateUserId) { StringBuilder sql = new StringBuilder(); sql.append("UPDATE KNOWLEDGE_FILES "); diff --git a/src/main/java/redcomet/knowledge/dao/KnowledgeGroupsDao.java b/src/main/java/org/support/project/knowledge/dao/KnowledgeGroupsDao.java similarity index 64% rename from src/main/java/redcomet/knowledge/dao/KnowledgeGroupsDao.java rename to src/main/java/org/support/project/knowledge/dao/KnowledgeGroupsDao.java index 5a5a84f4c..a11071929 100644 --- a/src/main/java/redcomet/knowledge/dao/KnowledgeGroupsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/KnowledgeGroupsDao.java @@ -1,10 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - -import redcomet.knowledge.dao.gen.GenKnowledgeGroupsDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenKnowledgeGroupsDao; /** * アクセス可能なグループ diff --git a/src/main/java/redcomet/knowledge/dao/KnowledgeTagsDao.java b/src/main/java/org/support/project/knowledge/dao/KnowledgeTagsDao.java similarity index 73% rename from src/main/java/redcomet/knowledge/dao/KnowledgeTagsDao.java rename to src/main/java/org/support/project/knowledge/dao/KnowledgeTagsDao.java index f9f94f265..9e7cdff31 100644 --- a/src/main/java/redcomet/knowledge/dao/KnowledgeTagsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/KnowledgeTagsDao.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenKnowledgeTagsDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenKnowledgeTagsDao; /** * ナレッジが持つタグ diff --git a/src/main/java/redcomet/knowledge/dao/KnowledgeUsersDao.java b/src/main/java/org/support/project/knowledge/dao/KnowledgeUsersDao.java similarity index 75% rename from src/main/java/redcomet/knowledge/dao/KnowledgeUsersDao.java rename to src/main/java/org/support/project/knowledge/dao/KnowledgeUsersDao.java index 60c744e2b..6cf11040f 100644 --- a/src/main/java/redcomet/knowledge/dao/KnowledgeUsersDao.java +++ b/src/main/java/org/support/project/knowledge/dao/KnowledgeUsersDao.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenKnowledgeUsersDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenKnowledgeUsersDao; /** * アクセス可能なユーザ diff --git a/src/main/java/redcomet/knowledge/dao/KnowledgesDao.java b/src/main/java/org/support/project/knowledge/dao/KnowledgesDao.java similarity index 87% rename from src/main/java/redcomet/knowledge/dao/KnowledgesDao.java rename to src/main/java/org/support/project/knowledge/dao/KnowledgesDao.java index c80311617..83fd1af5a 100644 --- a/src/main/java/redcomet/knowledge/dao/KnowledgesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/KnowledgesDao.java @@ -1,15 +1,15 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; import java.sql.Timestamp; import java.util.Date; import java.util.List; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenKnowledgesDao; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.ormapping.common.SQLManager; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenKnowledgesDao; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.ormapping.common.SQLManager; /** * ナレッジ @@ -101,7 +101,7 @@ public List selectKnowledges(List knowledgeIds) { * @return */ public KnowledgesEntity selectOnKeyWithUserName(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql"); return executeQueryOnKey(sql, KnowledgesEntity.class, knowledgeId); } diff --git a/src/main/java/redcomet/knowledge/dao/LikesDao.java b/src/main/java/org/support/project/knowledge/dao/LikesDao.java similarity index 71% rename from src/main/java/redcomet/knowledge/dao/LikesDao.java rename to src/main/java/org/support/project/knowledge/dao/LikesDao.java index 4991c4c8c..77cd41515 100644 --- a/src/main/java/redcomet/knowledge/dao/LikesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/LikesDao.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenLikesDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenLikesDao; /** * いいね diff --git a/src/main/java/redcomet/knowledge/dao/StocksDao.java b/src/main/java/org/support/project/knowledge/dao/StocksDao.java similarity index 62% rename from src/main/java/redcomet/knowledge/dao/StocksDao.java rename to src/main/java/org/support/project/knowledge/dao/StocksDao.java index dd1953f32..355b337c2 100644 --- a/src/main/java/redcomet/knowledge/dao/StocksDao.java +++ b/src/main/java/org/support/project/knowledge/dao/StocksDao.java @@ -1,10 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - -import redcomet.knowledge.dao.gen.GenStocksDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenStocksDao; /** * ストックしたナレッジ diff --git a/src/main/java/redcomet/knowledge/dao/TagsDao.java b/src/main/java/org/support/project/knowledge/dao/TagsDao.java similarity index 73% rename from src/main/java/redcomet/knowledge/dao/TagsDao.java rename to src/main/java/org/support/project/knowledge/dao/TagsDao.java index f39f053af..4ebdb2b84 100644 --- a/src/main/java/redcomet/knowledge/dao/TagsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/TagsDao.java @@ -1,13 +1,13 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; import java.util.List; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.dao.gen.GenTagsDao; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.ormapping.common.SQLManager; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenTagsDao; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.ormapping.common.SQLManager; /** * タグ @@ -64,7 +64,7 @@ public TagsEntity selectOnTagName(String tag) { * @return */ public List selectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql"); return executeQuery(sql, TagsEntity.class, knowledgeId); } @@ -78,7 +78,7 @@ public List selectOnKnowledgeId(Long knowledgeId) { * @return */ public List selectTagsWithCount(int offset, int limit) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql"); return executeQuery(sql, TagsEntity.class, limit, offset); } @@ -92,7 +92,7 @@ public List selectTagsWithCount(int offset, int limit) { * @return */ public List selectTagsWithCountOnUser(int userid, int offset, int limit) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql"); return executeQuery(sql, TagsEntity.class, userid, limit, offset); } diff --git a/src/main/java/redcomet/knowledge/dao/ViewHistoriesDao.java b/src/main/java/org/support/project/knowledge/dao/ViewHistoriesDao.java similarity index 63% rename from src/main/java/redcomet/knowledge/dao/ViewHistoriesDao.java rename to src/main/java/org/support/project/knowledge/dao/ViewHistoriesDao.java index 0b72241ba..71fecda43 100644 --- a/src/main/java/redcomet/knowledge/dao/ViewHistoriesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/ViewHistoriesDao.java @@ -1,10 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - -import redcomet.knowledge.dao.gen.GenViewHistoriesDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenViewHistoriesDao; /** * ナレッジの参照履歴 diff --git a/src/main/java/redcomet/knowledge/dao/VotesDao.java b/src/main/java/org/support/project/knowledge/dao/VotesDao.java similarity index 61% rename from src/main/java/redcomet/knowledge/dao/VotesDao.java rename to src/main/java/org/support/project/knowledge/dao/VotesDao.java index ef99170b4..ca6736c7f 100644 --- a/src/main/java/redcomet/knowledge/dao/VotesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/VotesDao.java @@ -1,10 +1,9 @@ -package redcomet.knowledge.dao; +package org.support.project.knowledge.dao; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - -import redcomet.knowledge.dao.gen.GenVotesDao; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.dao.gen.GenVotesDao; /** * 投票 diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenAccountImagesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenAccountImagesDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/gen/GenAccountImagesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenAccountImagesDao.java index 33692c55c..6f6e55cbe 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenAccountImagesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenAccountImagesDao.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; @@ -6,18 +6,18 @@ import java.sql.Timestamp; -import redcomet.knowledge.entity.AccountImagesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.AccountImagesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * アカウントの画像 @@ -41,36 +41,36 @@ public static GenAccountImagesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql"); return executeQuery(sql, AccountImagesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public AccountImagesEntity physicalSelectOnKey(Long imageId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, AccountImagesEntity.class, imageId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql"); return executeQuery(sql, AccountImagesEntity.class); } /** * キーで1件取得 */ public AccountImagesEntity selectOnKey(Long imageId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql"); return executeQueryOnKey(sql, AccountImagesEntity.class, imageId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity physicalInsert(AccountImagesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "imageId"); Object key = executeInsert(sql, type, entity.getImageId() @@ -92,7 +92,7 @@ public AccountImagesEntity physicalInsert(AccountImagesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity insert(Integer user, AccountImagesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -104,7 +104,7 @@ public AccountImagesEntity insert(Integer user, AccountImagesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity insert(AccountImagesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -113,9 +113,9 @@ public AccountImagesEntity insert(AccountImagesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity physicalUpdate(AccountImagesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql"); executeUpdate(sql, entity.getUserId() , entity.getFileName() @@ -135,7 +135,7 @@ public AccountImagesEntity physicalUpdate(AccountImagesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity update(Integer user, AccountImagesEntity entity) { AccountImagesEntity db = selectOnKey(entity.getImageId()); entity.setInsertUser(db.getInsertUser()); @@ -148,7 +148,7 @@ public AccountImagesEntity update(Integer user, AccountImagesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity update(AccountImagesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -157,7 +157,7 @@ public AccountImagesEntity update(AccountImagesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity save(Integer user, AccountImagesEntity entity) { AccountImagesEntity db = selectOnKey(entity.getImageId()); if (db == null) { @@ -169,7 +169,7 @@ public AccountImagesEntity save(Integer user, AccountImagesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public AccountImagesEntity save(AccountImagesEntity entity) { AccountImagesEntity db = selectOnKey(entity.getImageId()); if (db == null) { @@ -181,15 +181,15 @@ public AccountImagesEntity save(AccountImagesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long imageId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql"); executeUpdate(sql, imageId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(AccountImagesEntity entity) { physicalDelete(entity.getImageId()); @@ -197,7 +197,7 @@ public void physicalDelete(AccountImagesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long imageId) { AccountImagesEntity db = selectOnKey(imageId); db.setDeleteFlag(1); @@ -208,7 +208,7 @@ public void delete(Integer user, Long imageId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long imageId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -217,7 +217,7 @@ public void delete(Long imageId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, AccountImagesEntity entity) { delete(user, entity.getImageId()); @@ -225,7 +225,7 @@ public void delete(Integer user, AccountImagesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(AccountImagesEntity entity) { delete(entity.getImageId()); @@ -233,7 +233,7 @@ public void delete(AccountImagesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long imageId) { AccountImagesEntity db = physicalSelectOnKey(imageId); db.setDeleteFlag(0); @@ -244,7 +244,7 @@ public void activation(Integer user, Long imageId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long imageId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -253,7 +253,7 @@ public void activation(Long imageId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, AccountImagesEntity entity) { activation(user, entity.getImageId()); @@ -261,7 +261,7 @@ public void activation(Integer user, AccountImagesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(AccountImagesEntity entity) { activation(entity.getImageId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenCommentsDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenCommentsDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/gen/GenCommentsDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenCommentsDao.java index a953461b4..a8a6ba2fb 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenCommentsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenCommentsDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.CommentsEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.CommentsEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * コメント @@ -40,36 +40,36 @@ public static GenCommentsDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql"); return executeQuery(sql, CommentsEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public CommentsEntity physicalSelectOnKey(Long commentNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, CommentsEntity.class, commentNo); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql"); return executeQuery(sql, CommentsEntity.class); } /** * キーで1件取得 */ public CommentsEntity selectOnKey(Long commentNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql"); return executeQueryOnKey(sql, CommentsEntity.class, commentNo); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity physicalInsert(CommentsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "commentNo"); Object key = executeInsert(sql, type, entity.getCommentNo() @@ -87,7 +87,7 @@ public CommentsEntity physicalInsert(CommentsEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity insert(Integer user, CommentsEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -99,7 +99,7 @@ public CommentsEntity insert(Integer user, CommentsEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity insert(CommentsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -108,9 +108,9 @@ public CommentsEntity insert(CommentsEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity physicalUpdate(CommentsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getComment() @@ -126,7 +126,7 @@ public CommentsEntity physicalUpdate(CommentsEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity update(Integer user, CommentsEntity entity) { CommentsEntity db = selectOnKey(entity.getCommentNo()); entity.setInsertUser(db.getInsertUser()); @@ -139,7 +139,7 @@ public CommentsEntity update(Integer user, CommentsEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity update(CommentsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -148,7 +148,7 @@ public CommentsEntity update(CommentsEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity save(Integer user, CommentsEntity entity) { CommentsEntity db = selectOnKey(entity.getCommentNo()); if (db == null) { @@ -160,7 +160,7 @@ public CommentsEntity save(Integer user, CommentsEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public CommentsEntity save(CommentsEntity entity) { CommentsEntity db = selectOnKey(entity.getCommentNo()); if (db == null) { @@ -172,15 +172,15 @@ public CommentsEntity save(CommentsEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long commentNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql"); executeUpdate(sql, commentNo); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(CommentsEntity entity) { physicalDelete(entity.getCommentNo()); @@ -188,7 +188,7 @@ public void physicalDelete(CommentsEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long commentNo) { CommentsEntity db = selectOnKey(commentNo); db.setDeleteFlag(1); @@ -199,7 +199,7 @@ public void delete(Integer user, Long commentNo) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long commentNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -208,7 +208,7 @@ public void delete(Long commentNo) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, CommentsEntity entity) { delete(user, entity.getCommentNo()); @@ -216,7 +216,7 @@ public void delete(Integer user, CommentsEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(CommentsEntity entity) { delete(entity.getCommentNo()); @@ -224,7 +224,7 @@ public void delete(CommentsEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long commentNo) { CommentsEntity db = physicalSelectOnKey(commentNo); db.setDeleteFlag(0); @@ -235,7 +235,7 @@ public void activation(Integer user, Long commentNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long commentNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -244,7 +244,7 @@ public void activation(Long commentNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, CommentsEntity entity) { activation(user, entity.getCommentNo()); @@ -252,7 +252,7 @@ public void activation(Integer user, CommentsEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(CommentsEntity entity) { activation(entity.getCommentNo()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeFilesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeFilesDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeFilesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeFilesDao.java index d17fac7e5..878c3fb8f 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeFilesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeFilesDao.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; @@ -6,18 +6,18 @@ import java.sql.Timestamp; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * 添付ファイル @@ -41,36 +41,36 @@ public static GenKnowledgeFilesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql"); return executeQuery(sql, KnowledgeFilesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public KnowledgeFilesEntity physicalSelectOnKey(Long fileNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeFilesEntity.class, fileNo); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql"); return executeQuery(sql, KnowledgeFilesEntity.class); } /** * キーで1件取得 */ public KnowledgeFilesEntity selectOnKey(Long fileNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeFilesEntity.class, fileNo); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity physicalInsert(KnowledgeFilesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "fileNo"); Object key = executeInsert(sql, type, entity.getFileNo() @@ -91,7 +91,7 @@ public KnowledgeFilesEntity physicalInsert(KnowledgeFilesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity insert(Integer user, KnowledgeFilesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -103,7 +103,7 @@ public KnowledgeFilesEntity insert(Integer user, KnowledgeFilesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity insert(KnowledgeFilesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -112,9 +112,9 @@ public KnowledgeFilesEntity insert(KnowledgeFilesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity physicalUpdate(KnowledgeFilesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getFileName() @@ -133,7 +133,7 @@ public KnowledgeFilesEntity physicalUpdate(KnowledgeFilesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity update(Integer user, KnowledgeFilesEntity entity) { KnowledgeFilesEntity db = selectOnKey(entity.getFileNo()); entity.setInsertUser(db.getInsertUser()); @@ -146,7 +146,7 @@ public KnowledgeFilesEntity update(Integer user, KnowledgeFilesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity update(KnowledgeFilesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -155,7 +155,7 @@ public KnowledgeFilesEntity update(KnowledgeFilesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity save(Integer user, KnowledgeFilesEntity entity) { KnowledgeFilesEntity db = selectOnKey(entity.getFileNo()); if (db == null) { @@ -167,7 +167,7 @@ public KnowledgeFilesEntity save(Integer user, KnowledgeFilesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeFilesEntity save(KnowledgeFilesEntity entity) { KnowledgeFilesEntity db = selectOnKey(entity.getFileNo()); if (db == null) { @@ -179,15 +179,15 @@ public KnowledgeFilesEntity save(KnowledgeFilesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long fileNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql"); executeUpdate(sql, fileNo); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(KnowledgeFilesEntity entity) { physicalDelete(entity.getFileNo()); @@ -195,7 +195,7 @@ public void physicalDelete(KnowledgeFilesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long fileNo) { KnowledgeFilesEntity db = selectOnKey(fileNo); db.setDeleteFlag(1); @@ -206,7 +206,7 @@ public void delete(Integer user, Long fileNo) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long fileNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -215,7 +215,7 @@ public void delete(Long fileNo) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, KnowledgeFilesEntity entity) { delete(user, entity.getFileNo()); @@ -223,7 +223,7 @@ public void delete(Integer user, KnowledgeFilesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(KnowledgeFilesEntity entity) { delete(entity.getFileNo()); @@ -231,7 +231,7 @@ public void delete(KnowledgeFilesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long fileNo) { KnowledgeFilesEntity db = physicalSelectOnKey(fileNo); db.setDeleteFlag(0); @@ -242,7 +242,7 @@ public void activation(Integer user, Long fileNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long fileNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -251,7 +251,7 @@ public void activation(Long fileNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, KnowledgeFilesEntity entity) { activation(user, entity.getFileNo()); @@ -259,7 +259,7 @@ public void activation(Integer user, KnowledgeFilesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(KnowledgeFilesEntity entity) { activation(entity.getFileNo()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeGroupsDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeGroupsDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeGroupsDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeGroupsDao.java index 8ddb1f9f8..fa920c225 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeGroupsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeGroupsDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.KnowledgeGroupsEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.KnowledgeGroupsEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * アクセス可能なグループ @@ -40,64 +40,64 @@ public static GenKnowledgeGroupsDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public KnowledgeGroupsEntity physicalSelectOnKey(Integer groupId, Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeGroupsEntity.class, groupId, knowledgeId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class); } /** * キーで1件取得 */ public KnowledgeGroupsEntity selectOnKey(Integer groupId, Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeGroupsEntity.class, groupId, knowledgeId); } /** * GROUP_ID でリストを取得 */ public List selectOnGroupId(Integer groupId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class, groupId); } /** * KNOWLEDGE_ID でリストを取得 */ public List selectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class, knowledgeId); } /** * GROUP_ID でリストを取得 */ public List physicalSelectOnGroupId(Integer groupId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class, groupId); } /** * KNOWLEDGE_ID でリストを取得 */ public List physicalSelectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeGroupsEntity.class, knowledgeId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity physicalInsert(KnowledgeGroupsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getGroupId() @@ -112,7 +112,7 @@ public KnowledgeGroupsEntity physicalInsert(KnowledgeGroupsEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity insert(Integer user, KnowledgeGroupsEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -124,7 +124,7 @@ public KnowledgeGroupsEntity insert(Integer user, KnowledgeGroupsEntity entity) /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity insert(KnowledgeGroupsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -133,9 +133,9 @@ public KnowledgeGroupsEntity insert(KnowledgeGroupsEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity physicalUpdate(KnowledgeGroupsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql"); executeUpdate(sql, entity.getInsertUser() , entity.getInsertDatetime() @@ -150,7 +150,7 @@ public KnowledgeGroupsEntity physicalUpdate(KnowledgeGroupsEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity update(Integer user, KnowledgeGroupsEntity entity) { KnowledgeGroupsEntity db = selectOnKey(entity.getGroupId(), entity.getKnowledgeId()); entity.setInsertUser(db.getInsertUser()); @@ -163,7 +163,7 @@ public KnowledgeGroupsEntity update(Integer user, KnowledgeGroupsEntity entity) /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity update(KnowledgeGroupsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -172,7 +172,7 @@ public KnowledgeGroupsEntity update(KnowledgeGroupsEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity save(Integer user, KnowledgeGroupsEntity entity) { KnowledgeGroupsEntity db = selectOnKey(entity.getGroupId(), entity.getKnowledgeId()); if (db == null) { @@ -184,7 +184,7 @@ public KnowledgeGroupsEntity save(Integer user, KnowledgeGroupsEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeGroupsEntity save(KnowledgeGroupsEntity entity) { KnowledgeGroupsEntity db = selectOnKey(entity.getGroupId(), entity.getKnowledgeId()); if (db == null) { @@ -196,15 +196,15 @@ public KnowledgeGroupsEntity save(KnowledgeGroupsEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Integer groupId, Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql"); executeUpdate(sql, groupId, knowledgeId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(KnowledgeGroupsEntity entity) { physicalDelete(entity.getGroupId(), entity.getKnowledgeId()); @@ -212,7 +212,7 @@ public void physicalDelete(KnowledgeGroupsEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Integer groupId, Long knowledgeId) { KnowledgeGroupsEntity db = selectOnKey(groupId, knowledgeId); db.setDeleteFlag(1); @@ -223,7 +223,7 @@ public void delete(Integer user, Integer groupId, Long knowledgeId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer groupId, Long knowledgeId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -232,7 +232,7 @@ public void delete(Integer groupId, Long knowledgeId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, KnowledgeGroupsEntity entity) { delete(user, entity.getGroupId(), entity.getKnowledgeId()); @@ -240,7 +240,7 @@ public void delete(Integer user, KnowledgeGroupsEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(KnowledgeGroupsEntity entity) { delete(entity.getGroupId(), entity.getKnowledgeId()); @@ -248,7 +248,7 @@ public void delete(KnowledgeGroupsEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Integer groupId, Long knowledgeId) { KnowledgeGroupsEntity db = physicalSelectOnKey(groupId, knowledgeId); db.setDeleteFlag(0); @@ -259,7 +259,7 @@ public void activation(Integer user, Integer groupId, Long knowledgeId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer groupId, Long knowledgeId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -268,7 +268,7 @@ public void activation(Integer groupId, Long knowledgeId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, KnowledgeGroupsEntity entity) { activation(user, entity.getGroupId(), entity.getKnowledgeId()); @@ -276,7 +276,7 @@ public void activation(Integer user, KnowledgeGroupsEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(KnowledgeGroupsEntity entity) { activation(entity.getGroupId(), entity.getKnowledgeId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeTagsDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeTagsDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeTagsDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeTagsDao.java index 7cb0f36a9..f22405507 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeTagsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeTagsDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.KnowledgeTagsEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.KnowledgeTagsEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * ナレッジが持つタグ @@ -40,64 +40,64 @@ public static GenKnowledgeTagsDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql"); return executeQuery(sql, KnowledgeTagsEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public KnowledgeTagsEntity physicalSelectOnKey(Long knowledgeId, Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeTagsEntity.class, knowledgeId, tagId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql"); return executeQuery(sql, KnowledgeTagsEntity.class); } /** * キーで1件取得 */ public KnowledgeTagsEntity selectOnKey(Long knowledgeId, Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeTagsEntity.class, knowledgeId, tagId); } /** * KNOWLEDGE_ID でリストを取得 */ public List selectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeTagsEntity.class, knowledgeId); } /** * TAG_ID でリストを取得 */ public List selectOnTagId(Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql"); return executeQuery(sql, KnowledgeTagsEntity.class, tagId); } /** * KNOWLEDGE_ID でリストを取得 */ public List physicalSelectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeTagsEntity.class, knowledgeId); } /** * TAG_ID でリストを取得 */ public List physicalSelectOnTagId(Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql"); return executeQuery(sql, KnowledgeTagsEntity.class, tagId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity physicalInsert(KnowledgeTagsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getTagId() @@ -112,7 +112,7 @@ public KnowledgeTagsEntity physicalInsert(KnowledgeTagsEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity insert(Integer user, KnowledgeTagsEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -124,7 +124,7 @@ public KnowledgeTagsEntity insert(Integer user, KnowledgeTagsEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity insert(KnowledgeTagsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -133,9 +133,9 @@ public KnowledgeTagsEntity insert(KnowledgeTagsEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity physicalUpdate(KnowledgeTagsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql"); executeUpdate(sql, entity.getInsertUser() , entity.getInsertDatetime() @@ -150,7 +150,7 @@ public KnowledgeTagsEntity physicalUpdate(KnowledgeTagsEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity update(Integer user, KnowledgeTagsEntity entity) { KnowledgeTagsEntity db = selectOnKey(entity.getKnowledgeId(), entity.getTagId()); entity.setInsertUser(db.getInsertUser()); @@ -163,7 +163,7 @@ public KnowledgeTagsEntity update(Integer user, KnowledgeTagsEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity update(KnowledgeTagsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -172,7 +172,7 @@ public KnowledgeTagsEntity update(KnowledgeTagsEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity save(Integer user, KnowledgeTagsEntity entity) { KnowledgeTagsEntity db = selectOnKey(entity.getKnowledgeId(), entity.getTagId()); if (db == null) { @@ -184,7 +184,7 @@ public KnowledgeTagsEntity save(Integer user, KnowledgeTagsEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeTagsEntity save(KnowledgeTagsEntity entity) { KnowledgeTagsEntity db = selectOnKey(entity.getKnowledgeId(), entity.getTagId()); if (db == null) { @@ -196,15 +196,15 @@ public KnowledgeTagsEntity save(KnowledgeTagsEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long knowledgeId, Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql"); executeUpdate(sql, knowledgeId, tagId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(KnowledgeTagsEntity entity) { physicalDelete(entity.getKnowledgeId(), entity.getTagId()); @@ -212,7 +212,7 @@ public void physicalDelete(KnowledgeTagsEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long knowledgeId, Integer tagId) { KnowledgeTagsEntity db = selectOnKey(knowledgeId, tagId); db.setDeleteFlag(1); @@ -223,7 +223,7 @@ public void delete(Integer user, Long knowledgeId, Integer tagId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long knowledgeId, Integer tagId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -232,7 +232,7 @@ public void delete(Long knowledgeId, Integer tagId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, KnowledgeTagsEntity entity) { delete(user, entity.getKnowledgeId(), entity.getTagId()); @@ -240,7 +240,7 @@ public void delete(Integer user, KnowledgeTagsEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(KnowledgeTagsEntity entity) { delete(entity.getKnowledgeId(), entity.getTagId()); @@ -248,7 +248,7 @@ public void delete(KnowledgeTagsEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long knowledgeId, Integer tagId) { KnowledgeTagsEntity db = physicalSelectOnKey(knowledgeId, tagId); db.setDeleteFlag(0); @@ -259,7 +259,7 @@ public void activation(Integer user, Long knowledgeId, Integer tagId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long knowledgeId, Integer tagId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -268,7 +268,7 @@ public void activation(Long knowledgeId, Integer tagId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, KnowledgeTagsEntity entity) { activation(user, entity.getKnowledgeId(), entity.getTagId()); @@ -276,7 +276,7 @@ public void activation(Integer user, KnowledgeTagsEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(KnowledgeTagsEntity entity) { activation(entity.getKnowledgeId(), entity.getTagId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeUsersDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeUsersDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeUsersDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeUsersDao.java index 308543fb5..e921236cd 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgeUsersDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgeUsersDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.KnowledgeUsersEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.KnowledgeUsersEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * アクセス可能なユーザ @@ -40,64 +40,64 @@ public static GenKnowledgeUsersDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql"); return executeQuery(sql, KnowledgeUsersEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public KnowledgeUsersEntity physicalSelectOnKey(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeUsersEntity.class, knowledgeId, userId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql"); return executeQuery(sql, KnowledgeUsersEntity.class); } /** * キーで1件取得 */ public KnowledgeUsersEntity selectOnKey(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgeUsersEntity.class, knowledgeId, userId); } /** * KNOWLEDGE_ID でリストを取得 */ public List selectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeUsersEntity.class, knowledgeId); } /** * USER_ID でリストを取得 */ public List selectOnUserId(Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql"); return executeQuery(sql, KnowledgeUsersEntity.class, userId); } /** * KNOWLEDGE_ID でリストを取得 */ public List physicalSelectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql"); return executeQuery(sql, KnowledgeUsersEntity.class, knowledgeId); } /** * USER_ID でリストを取得 */ public List physicalSelectOnUserId(Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql"); return executeQuery(sql, KnowledgeUsersEntity.class, userId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity physicalInsert(KnowledgeUsersEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getUserId() @@ -112,7 +112,7 @@ public KnowledgeUsersEntity physicalInsert(KnowledgeUsersEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity insert(Integer user, KnowledgeUsersEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -124,7 +124,7 @@ public KnowledgeUsersEntity insert(Integer user, KnowledgeUsersEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity insert(KnowledgeUsersEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -133,9 +133,9 @@ public KnowledgeUsersEntity insert(KnowledgeUsersEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity physicalUpdate(KnowledgeUsersEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql"); executeUpdate(sql, entity.getInsertUser() , entity.getInsertDatetime() @@ -150,7 +150,7 @@ public KnowledgeUsersEntity physicalUpdate(KnowledgeUsersEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity update(Integer user, KnowledgeUsersEntity entity) { KnowledgeUsersEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); entity.setInsertUser(db.getInsertUser()); @@ -163,7 +163,7 @@ public KnowledgeUsersEntity update(Integer user, KnowledgeUsersEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity update(KnowledgeUsersEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -172,7 +172,7 @@ public KnowledgeUsersEntity update(KnowledgeUsersEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity save(Integer user, KnowledgeUsersEntity entity) { KnowledgeUsersEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); if (db == null) { @@ -184,7 +184,7 @@ public KnowledgeUsersEntity save(Integer user, KnowledgeUsersEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgeUsersEntity save(KnowledgeUsersEntity entity) { KnowledgeUsersEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); if (db == null) { @@ -196,15 +196,15 @@ public KnowledgeUsersEntity save(KnowledgeUsersEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql"); executeUpdate(sql, knowledgeId, userId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(KnowledgeUsersEntity entity) { physicalDelete(entity.getKnowledgeId(), entity.getUserId()); @@ -212,7 +212,7 @@ public void physicalDelete(KnowledgeUsersEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long knowledgeId, Integer userId) { KnowledgeUsersEntity db = selectOnKey(knowledgeId, userId); db.setDeleteFlag(1); @@ -223,7 +223,7 @@ public void delete(Integer user, Long knowledgeId, Integer userId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long knowledgeId, Integer userId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -232,7 +232,7 @@ public void delete(Long knowledgeId, Integer userId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, KnowledgeUsersEntity entity) { delete(user, entity.getKnowledgeId(), entity.getUserId()); @@ -240,7 +240,7 @@ public void delete(Integer user, KnowledgeUsersEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(KnowledgeUsersEntity entity) { delete(entity.getKnowledgeId(), entity.getUserId()); @@ -248,7 +248,7 @@ public void delete(KnowledgeUsersEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long knowledgeId, Integer userId) { KnowledgeUsersEntity db = physicalSelectOnKey(knowledgeId, userId); db.setDeleteFlag(0); @@ -259,7 +259,7 @@ public void activation(Integer user, Long knowledgeId, Integer userId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long knowledgeId, Integer userId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -268,7 +268,7 @@ public void activation(Long knowledgeId, Integer userId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, KnowledgeUsersEntity entity) { activation(user, entity.getKnowledgeId(), entity.getUserId()); @@ -276,7 +276,7 @@ public void activation(Integer user, KnowledgeUsersEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(KnowledgeUsersEntity entity) { activation(entity.getKnowledgeId(), entity.getUserId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgesDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/gen/GenKnowledgesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgesDao.java index 8f533ce5a..0e6f3bd2a 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenKnowledgesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenKnowledgesDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * ナレッジ @@ -40,36 +40,36 @@ public static GenKnowledgesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql"); return executeQuery(sql, KnowledgesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public KnowledgesEntity physicalSelectOnKey(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgesEntity.class, knowledgeId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql"); return executeQuery(sql, KnowledgesEntity.class); } /** * キーで1件取得 */ public KnowledgesEntity selectOnKey(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql"); return executeQueryOnKey(sql, KnowledgesEntity.class, knowledgeId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity physicalInsert(KnowledgesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "knowledgeId"); Object key = executeInsert(sql, type, entity.getKnowledgeId() @@ -88,7 +88,7 @@ public KnowledgesEntity physicalInsert(KnowledgesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity insert(Integer user, KnowledgesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -100,7 +100,7 @@ public KnowledgesEntity insert(Integer user, KnowledgesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity insert(KnowledgesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -109,9 +109,9 @@ public KnowledgesEntity insert(KnowledgesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity physicalUpdate(KnowledgesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql"); executeUpdate(sql, entity.getTitle() , entity.getContent() @@ -128,7 +128,7 @@ public KnowledgesEntity physicalUpdate(KnowledgesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity update(Integer user, KnowledgesEntity entity) { KnowledgesEntity db = selectOnKey(entity.getKnowledgeId()); entity.setInsertUser(db.getInsertUser()); @@ -141,7 +141,7 @@ public KnowledgesEntity update(Integer user, KnowledgesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity update(KnowledgesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -150,7 +150,7 @@ public KnowledgesEntity update(KnowledgesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity save(Integer user, KnowledgesEntity entity) { KnowledgesEntity db = selectOnKey(entity.getKnowledgeId()); if (db == null) { @@ -162,7 +162,7 @@ public KnowledgesEntity save(Integer user, KnowledgesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity save(KnowledgesEntity entity) { KnowledgesEntity db = selectOnKey(entity.getKnowledgeId()); if (db == null) { @@ -174,15 +174,15 @@ public KnowledgesEntity save(KnowledgesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql"); executeUpdate(sql, knowledgeId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(KnowledgesEntity entity) { physicalDelete(entity.getKnowledgeId()); @@ -190,7 +190,7 @@ public void physicalDelete(KnowledgesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long knowledgeId) { KnowledgesEntity db = selectOnKey(knowledgeId); db.setDeleteFlag(1); @@ -201,7 +201,7 @@ public void delete(Integer user, Long knowledgeId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long knowledgeId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -210,7 +210,7 @@ public void delete(Long knowledgeId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, KnowledgesEntity entity) { delete(user, entity.getKnowledgeId()); @@ -218,7 +218,7 @@ public void delete(Integer user, KnowledgesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(KnowledgesEntity entity) { delete(entity.getKnowledgeId()); @@ -226,7 +226,7 @@ public void delete(KnowledgesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long knowledgeId) { KnowledgesEntity db = physicalSelectOnKey(knowledgeId); db.setDeleteFlag(0); @@ -237,7 +237,7 @@ public void activation(Integer user, Long knowledgeId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long knowledgeId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -246,7 +246,7 @@ public void activation(Long knowledgeId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, KnowledgesEntity entity) { activation(user, entity.getKnowledgeId()); @@ -254,7 +254,7 @@ public void activation(Integer user, KnowledgesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(KnowledgesEntity entity) { activation(entity.getKnowledgeId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenLikesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenLikesDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenLikesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenLikesDao.java index a35e561ae..afa221277 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenLikesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenLikesDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.LikesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.LikesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * いいね @@ -40,36 +40,36 @@ public static GenLikesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql"); return executeQuery(sql, LikesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public LikesEntity physicalSelectOnKey(Long no) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, LikesEntity.class, no); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql"); return executeQuery(sql, LikesEntity.class); } /** * キーで1件取得 */ public LikesEntity selectOnKey(Long no) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql"); return executeQueryOnKey(sql, LikesEntity.class, no); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity physicalInsert(LikesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "no"); Object key = executeInsert(sql, type, entity.getNo() @@ -86,7 +86,7 @@ public LikesEntity physicalInsert(LikesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity insert(Integer user, LikesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -98,7 +98,7 @@ public LikesEntity insert(Integer user, LikesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity insert(LikesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -107,9 +107,9 @@ public LikesEntity insert(LikesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity physicalUpdate(LikesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_update.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getInsertUser() @@ -124,7 +124,7 @@ public LikesEntity physicalUpdate(LikesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity update(Integer user, LikesEntity entity) { LikesEntity db = selectOnKey(entity.getNo()); entity.setInsertUser(db.getInsertUser()); @@ -137,7 +137,7 @@ public LikesEntity update(Integer user, LikesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity update(LikesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -146,7 +146,7 @@ public LikesEntity update(LikesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity save(Integer user, LikesEntity entity) { LikesEntity db = selectOnKey(entity.getNo()); if (db == null) { @@ -158,7 +158,7 @@ public LikesEntity save(Integer user, LikesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public LikesEntity save(LikesEntity entity) { LikesEntity db = selectOnKey(entity.getNo()); if (db == null) { @@ -170,15 +170,15 @@ public LikesEntity save(LikesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long no) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/LikesDao/LikesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_delete.sql"); executeUpdate(sql, no); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(LikesEntity entity) { physicalDelete(entity.getNo()); @@ -186,7 +186,7 @@ public void physicalDelete(LikesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long no) { LikesEntity db = selectOnKey(no); db.setDeleteFlag(1); @@ -197,7 +197,7 @@ public void delete(Integer user, Long no) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long no) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -206,7 +206,7 @@ public void delete(Long no) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, LikesEntity entity) { delete(user, entity.getNo()); @@ -214,7 +214,7 @@ public void delete(Integer user, LikesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(LikesEntity entity) { delete(entity.getNo()); @@ -222,7 +222,7 @@ public void delete(LikesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long no) { LikesEntity db = physicalSelectOnKey(no); db.setDeleteFlag(0); @@ -233,7 +233,7 @@ public void activation(Integer user, Long no) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long no) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -242,7 +242,7 @@ public void activation(Long no) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, LikesEntity entity) { activation(user, entity.getNo()); @@ -250,7 +250,7 @@ public void activation(Integer user, LikesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(LikesEntity entity) { activation(entity.getNo()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenStocksDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenStocksDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenStocksDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenStocksDao.java index a1fc437fc..1bcdd7a4a 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenStocksDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenStocksDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.StocksEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.StocksEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * ストックしたナレッジ @@ -40,64 +40,64 @@ public static GenStocksDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql"); return executeQuery(sql, StocksEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public StocksEntity physicalSelectOnKey(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, StocksEntity.class, knowledgeId, userId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql"); return executeQuery(sql, StocksEntity.class); } /** * キーで1件取得 */ public StocksEntity selectOnKey(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql"); return executeQueryOnKey(sql, StocksEntity.class, knowledgeId, userId); } /** * KNOWLEDGE_ID でリストを取得 */ public List selectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql"); return executeQuery(sql, StocksEntity.class, knowledgeId); } /** * USER_ID でリストを取得 */ public List selectOnUserId(Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql"); return executeQuery(sql, StocksEntity.class, userId); } /** * KNOWLEDGE_ID でリストを取得 */ public List physicalSelectOnKnowledgeId(Long knowledgeId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql"); return executeQuery(sql, StocksEntity.class, knowledgeId); } /** * USER_ID でリストを取得 */ public List physicalSelectOnUserId(Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql"); return executeQuery(sql, StocksEntity.class, userId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity physicalInsert(StocksEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_insert.sql"); executeUpdate(sql, entity.getUserId() , entity.getKnowledgeId() @@ -113,7 +113,7 @@ public StocksEntity physicalInsert(StocksEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity insert(Integer user, StocksEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -125,7 +125,7 @@ public StocksEntity insert(Integer user, StocksEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity insert(StocksEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -134,9 +134,9 @@ public StocksEntity insert(StocksEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity physicalUpdate(StocksEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_update.sql"); executeUpdate(sql, entity.getComment() , entity.getInsertUser() @@ -152,7 +152,7 @@ public StocksEntity physicalUpdate(StocksEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity update(Integer user, StocksEntity entity) { StocksEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); entity.setInsertUser(db.getInsertUser()); @@ -165,7 +165,7 @@ public StocksEntity update(Integer user, StocksEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity update(StocksEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -174,7 +174,7 @@ public StocksEntity update(StocksEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity save(Integer user, StocksEntity entity) { StocksEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); if (db == null) { @@ -186,7 +186,7 @@ public StocksEntity save(Integer user, StocksEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public StocksEntity save(StocksEntity entity) { StocksEntity db = selectOnKey(entity.getKnowledgeId(), entity.getUserId()); if (db == null) { @@ -198,15 +198,15 @@ public StocksEntity save(StocksEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long knowledgeId, Integer userId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/StocksDao/StocksDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_delete.sql"); executeUpdate(sql, knowledgeId, userId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(StocksEntity entity) { physicalDelete(entity.getKnowledgeId(), entity.getUserId()); @@ -214,7 +214,7 @@ public void physicalDelete(StocksEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long knowledgeId, Integer userId) { StocksEntity db = selectOnKey(knowledgeId, userId); db.setDeleteFlag(1); @@ -225,7 +225,7 @@ public void delete(Integer user, Long knowledgeId, Integer userId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long knowledgeId, Integer userId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -234,7 +234,7 @@ public void delete(Long knowledgeId, Integer userId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, StocksEntity entity) { delete(user, entity.getKnowledgeId(), entity.getUserId()); @@ -242,7 +242,7 @@ public void delete(Integer user, StocksEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(StocksEntity entity) { delete(entity.getKnowledgeId(), entity.getUserId()); @@ -250,7 +250,7 @@ public void delete(StocksEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long knowledgeId, Integer userId) { StocksEntity db = physicalSelectOnKey(knowledgeId, userId); db.setDeleteFlag(0); @@ -261,7 +261,7 @@ public void activation(Integer user, Long knowledgeId, Integer userId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long knowledgeId, Integer userId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -270,7 +270,7 @@ public void activation(Long knowledgeId, Integer userId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, StocksEntity entity) { activation(user, entity.getKnowledgeId(), entity.getUserId()); @@ -278,7 +278,7 @@ public void activation(Integer user, StocksEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(StocksEntity entity) { activation(entity.getKnowledgeId(), entity.getUserId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenTagsDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenTagsDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenTagsDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenTagsDao.java index ec9b5d848..860e426af 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenTagsDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenTagsDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * タグ @@ -40,36 +40,36 @@ public static GenTagsDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql"); return executeQuery(sql, TagsEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public TagsEntity physicalSelectOnKey(Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, TagsEntity.class, tagId); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql"); return executeQuery(sql, TagsEntity.class); } /** * キーで1件取得 */ public TagsEntity selectOnKey(Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql"); return executeQueryOnKey(sql, TagsEntity.class, tagId); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity physicalInsert(TagsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "tagId"); Object key = executeInsert(sql, type, entity.getTagId() @@ -86,7 +86,7 @@ public TagsEntity physicalInsert(TagsEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity insert(Integer user, TagsEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -98,7 +98,7 @@ public TagsEntity insert(Integer user, TagsEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity insert(TagsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -107,9 +107,9 @@ public TagsEntity insert(TagsEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity physicalUpdate(TagsEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_update.sql"); executeUpdate(sql, entity.getTagName() , entity.getInsertUser() @@ -124,7 +124,7 @@ public TagsEntity physicalUpdate(TagsEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity update(Integer user, TagsEntity entity) { TagsEntity db = selectOnKey(entity.getTagId()); entity.setInsertUser(db.getInsertUser()); @@ -137,7 +137,7 @@ public TagsEntity update(Integer user, TagsEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity update(TagsEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -146,7 +146,7 @@ public TagsEntity update(TagsEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity save(Integer user, TagsEntity entity) { TagsEntity db = selectOnKey(entity.getTagId()); if (db == null) { @@ -158,7 +158,7 @@ public TagsEntity save(Integer user, TagsEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public TagsEntity save(TagsEntity entity) { TagsEntity db = selectOnKey(entity.getTagId()); if (db == null) { @@ -170,15 +170,15 @@ public TagsEntity save(TagsEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Integer tagId) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/TagsDao/TagsDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_delete.sql"); executeUpdate(sql, tagId); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(TagsEntity entity) { physicalDelete(entity.getTagId()); @@ -186,7 +186,7 @@ public void physicalDelete(TagsEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Integer tagId) { TagsEntity db = selectOnKey(tagId); db.setDeleteFlag(1); @@ -197,7 +197,7 @@ public void delete(Integer user, Integer tagId) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer tagId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -206,7 +206,7 @@ public void delete(Integer tagId) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, TagsEntity entity) { delete(user, entity.getTagId()); @@ -214,7 +214,7 @@ public void delete(Integer user, TagsEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(TagsEntity entity) { delete(entity.getTagId()); @@ -222,7 +222,7 @@ public void delete(TagsEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Integer tagId) { TagsEntity db = physicalSelectOnKey(tagId); db.setDeleteFlag(0); @@ -233,7 +233,7 @@ public void activation(Integer user, Integer tagId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer tagId) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -242,7 +242,7 @@ public void activation(Integer tagId) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, TagsEntity entity) { activation(user, entity.getTagId()); @@ -250,7 +250,7 @@ public void activation(Integer user, TagsEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(TagsEntity entity) { activation(entity.getTagId()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenViewHistoriesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenViewHistoriesDao.java similarity index 67% rename from src/main/java/redcomet/knowledge/dao/gen/GenViewHistoriesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenViewHistoriesDao.java index 90bdabb48..65d3eca94 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenViewHistoriesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenViewHistoriesDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.ViewHistoriesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.ViewHistoriesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * ナレッジの参照履歴 @@ -40,36 +40,36 @@ public static GenViewHistoriesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql"); return executeQuery(sql, ViewHistoriesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public ViewHistoriesEntity physicalSelectOnKey(Long historyNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, ViewHistoriesEntity.class, historyNo); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql"); return executeQuery(sql, ViewHistoriesEntity.class); } /** * キーで1件取得 */ public ViewHistoriesEntity selectOnKey(Long historyNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql"); return executeQueryOnKey(sql, ViewHistoriesEntity.class, historyNo); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity physicalInsert(ViewHistoriesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "historyNo"); Object key = executeInsert(sql, type, entity.getHistoryNo() @@ -87,7 +87,7 @@ public ViewHistoriesEntity physicalInsert(ViewHistoriesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity insert(Integer user, ViewHistoriesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -99,7 +99,7 @@ public ViewHistoriesEntity insert(Integer user, ViewHistoriesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity insert(ViewHistoriesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -108,9 +108,9 @@ public ViewHistoriesEntity insert(ViewHistoriesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity physicalUpdate(ViewHistoriesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getViewDateTime() @@ -126,7 +126,7 @@ public ViewHistoriesEntity physicalUpdate(ViewHistoriesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity update(Integer user, ViewHistoriesEntity entity) { ViewHistoriesEntity db = selectOnKey(entity.getHistoryNo()); entity.setInsertUser(db.getInsertUser()); @@ -139,7 +139,7 @@ public ViewHistoriesEntity update(Integer user, ViewHistoriesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity update(ViewHistoriesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -148,7 +148,7 @@ public ViewHistoriesEntity update(ViewHistoriesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity save(Integer user, ViewHistoriesEntity entity) { ViewHistoriesEntity db = selectOnKey(entity.getHistoryNo()); if (db == null) { @@ -160,7 +160,7 @@ public ViewHistoriesEntity save(Integer user, ViewHistoriesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public ViewHistoriesEntity save(ViewHistoriesEntity entity) { ViewHistoriesEntity db = selectOnKey(entity.getHistoryNo()); if (db == null) { @@ -172,15 +172,15 @@ public ViewHistoriesEntity save(ViewHistoriesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long historyNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql"); executeUpdate(sql, historyNo); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(ViewHistoriesEntity entity) { physicalDelete(entity.getHistoryNo()); @@ -188,7 +188,7 @@ public void physicalDelete(ViewHistoriesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long historyNo) { ViewHistoriesEntity db = selectOnKey(historyNo); db.setDeleteFlag(1); @@ -199,7 +199,7 @@ public void delete(Integer user, Long historyNo) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long historyNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -208,7 +208,7 @@ public void delete(Long historyNo) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, ViewHistoriesEntity entity) { delete(user, entity.getHistoryNo()); @@ -216,7 +216,7 @@ public void delete(Integer user, ViewHistoriesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(ViewHistoriesEntity entity) { delete(entity.getHistoryNo()); @@ -224,7 +224,7 @@ public void delete(ViewHistoriesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long historyNo) { ViewHistoriesEntity db = physicalSelectOnKey(historyNo); db.setDeleteFlag(0); @@ -235,7 +235,7 @@ public void activation(Integer user, Long historyNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long historyNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -244,7 +244,7 @@ public void activation(Long historyNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, ViewHistoriesEntity entity) { activation(user, entity.getHistoryNo()); @@ -252,7 +252,7 @@ public void activation(Integer user, ViewHistoriesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(ViewHistoriesEntity entity) { activation(entity.getHistoryNo()); diff --git a/src/main/java/redcomet/knowledge/dao/gen/GenVotesDao.java b/src/main/java/org/support/project/knowledge/dao/gen/GenVotesDao.java similarity index 66% rename from src/main/java/redcomet/knowledge/dao/gen/GenVotesDao.java rename to src/main/java/org/support/project/knowledge/dao/gen/GenVotesDao.java index 227a49b2d..3d714f9dd 100644 --- a/src/main/java/redcomet/knowledge/dao/gen/GenVotesDao.java +++ b/src/main/java/org/support/project/knowledge/dao/gen/GenVotesDao.java @@ -1,22 +1,22 @@ -package redcomet.knowledge.dao.gen; +package org.support.project.knowledge.dao.gen; import java.util.List; import java.sql.Timestamp; -import redcomet.knowledge.entity.VotesEntity; -import redcomet.ormapping.dao.AbstractDao; -import redcomet.ormapping.exception.ORMappingException; -import redcomet.ormapping.common.SQLManager; -import redcomet.ormapping.common.DBUserPool; -import redcomet.ormapping.common.IDGen; -import redcomet.common.util.PropertyUtil; +import org.support.project.knowledge.entity.VotesEntity; +import org.support.project.ormapping.dao.AbstractDao; +import org.support.project.ormapping.exception.ORMappingException; +import org.support.project.ormapping.common.SQLManager; +import org.support.project.ormapping.common.DBUserPool; +import org.support.project.ormapping.common.IDGen; +import org.support.project.common.util.PropertyUtil; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.aop.Aspect; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.aop.Aspect; /** * 投票 @@ -40,36 +40,36 @@ public static GenVotesDao get() { * 全て取得(削除フラグを無視して取得) */ public List physicalSelectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql"); return executeQuery(sql, VotesEntity.class); } /** * キーで1件取得(削除フラグを無視して取得) */ public VotesEntity physicalSelectOnKey(Long voteNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql"); return executeQueryOnKey(sql, VotesEntity.class, voteNo); } /** * 全て取得 */ public List selectAll() { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql"); return executeQuery(sql, VotesEntity.class); } /** * キーで1件取得 */ public VotesEntity selectOnKey(Long voteNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql"); return executeQueryOnKey(sql, VotesEntity.class, voteNo); } /** * 登録(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity physicalInsert(VotesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_insert.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_insert.sql"); Class type = PropertyUtil.getPropertyType(entity, "voteNo"); Object key = executeInsert(sql, type, entity.getVoteNo() @@ -87,7 +87,7 @@ public VotesEntity physicalInsert(VotesEntity entity) { /** * 登録(登録ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity insert(Integer user, VotesEntity entity) { entity.setInsertUser(user); entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime())); @@ -99,7 +99,7 @@ public VotesEntity insert(Integer user, VotesEntity entity) { /** * 登録 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity insert(VotesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -108,9 +108,9 @@ public VotesEntity insert(VotesEntity entity) { /** * 更新(データを生で操作) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity physicalUpdate(VotesEntity entity) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_update.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_update.sql"); executeUpdate(sql, entity.getKnowledgeId() , entity.getVoteKind() @@ -126,7 +126,7 @@ public VotesEntity physicalUpdate(VotesEntity entity) { /** * 更新(更新ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity update(Integer user, VotesEntity entity) { VotesEntity db = selectOnKey(entity.getVoteNo()); entity.setInsertUser(db.getInsertUser()); @@ -139,7 +139,7 @@ public VotesEntity update(Integer user, VotesEntity entity) { /** * 更新 */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity update(VotesEntity entity) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer userId = (Integer) pool.getUser(); @@ -148,7 +148,7 @@ public VotesEntity update(VotesEntity entity) { /** * 保存(ユーザを指定) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity save(Integer user, VotesEntity entity) { VotesEntity db = selectOnKey(entity.getVoteNo()); if (db == null) { @@ -160,7 +160,7 @@ public VotesEntity save(Integer user, VotesEntity entity) { /** * 保存(存在しなければ登録、存在すれば更新) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public VotesEntity save(VotesEntity entity) { VotesEntity db = selectOnKey(entity.getVoteNo()); if (db == null) { @@ -172,15 +172,15 @@ public VotesEntity save(VotesEntity entity) { /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(Long voteNo) { - String sql = SQLManager.getInstance().getSql("/redcomet/knowledge/dao/sql/VotesDao/VotesDao_delete.sql"); + String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_delete.sql"); executeUpdate(sql, voteNo); } /** * 削除(データを生で操作/物理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void physicalDelete(VotesEntity entity) { physicalDelete(entity.getVoteNo()); @@ -188,7 +188,7 @@ public void physicalDelete(VotesEntity entity) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, Long voteNo) { VotesEntity db = selectOnKey(voteNo); db.setDeleteFlag(1); @@ -199,7 +199,7 @@ public void delete(Integer user, Long voteNo) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long voteNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -208,7 +208,7 @@ public void delete(Long voteNo) { /** * 削除(削除ユーザを指定/論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Integer user, VotesEntity entity) { delete(user, entity.getVoteNo()); @@ -216,7 +216,7 @@ public void delete(Integer user, VotesEntity entity) { /** * 削除(論理削除があれば論理削除) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(VotesEntity entity) { delete(entity.getVoteNo()); @@ -224,7 +224,7 @@ public void delete(VotesEntity entity) { /** 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, Long voteNo) { VotesEntity db = physicalSelectOnKey(voteNo); db.setDeleteFlag(0); @@ -235,7 +235,7 @@ public void activation(Integer user, Long voteNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Long voteNo) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); @@ -244,7 +244,7 @@ public void activation(Long voteNo) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(Integer user, VotesEntity entity) { activation(user, entity.getVoteNo()); @@ -252,7 +252,7 @@ public void activation(Integer user, VotesEntity entity) { /** * 復元(論理削除されていたものを有効化) */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void activation(VotesEntity entity) { activation(entity.getVoteNo()); diff --git a/src/main/java/redcomet/knowledge/deploy/InitDB.java b/src/main/java/org/support/project/knowledge/deploy/InitDB.java similarity index 83% rename from src/main/java/redcomet/knowledge/deploy/InitDB.java rename to src/main/java/org/support/project/knowledge/deploy/InitDB.java index cdf029be0..7eb09aff5 100644 --- a/src/main/java/redcomet/knowledge/deploy/InitDB.java +++ b/src/main/java/org/support/project/knowledge/deploy/InitDB.java @@ -1,21 +1,21 @@ -package redcomet.knowledge.deploy; +package org.support.project.knowledge.deploy; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.knowledge.deploy.v0_0_1.InitializeSystem; -import redcomet.web.dao.SystemsDao; -import redcomet.web.entity.SystemsEntity; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.knowledge.deploy.v0_0_1.InitializeSystem; +import org.support.project.web.dao.SystemsDao; +import org.support.project.web.entity.SystemsEntity; public class InitDB { /** ログ */ private static Log LOG = LogFactory.getLog(InitDB.class); - private static final String SYSTEM_NAME = redcomet.knowledge.config.AppConfig.SYSTEM_NAME; + private static final String SYSTEM_NAME = org.support.project.knowledge.config.AppConfig.SYSTEM_NAME; private static final Map MAP = new LinkedHashMap<>(); private static final Migrate INIT = InitializeSystem.get(); diff --git a/src/main/java/redcomet/knowledge/deploy/InitializationListener.java b/src/main/java/org/support/project/knowledge/deploy/InitializationListener.java similarity index 79% rename from src/main/java/redcomet/knowledge/deploy/InitializationListener.java rename to src/main/java/org/support/project/knowledge/deploy/InitializationListener.java index 2bab3b2f8..5764df5bb 100644 --- a/src/main/java/redcomet/knowledge/deploy/InitializationListener.java +++ b/src/main/java/org/support/project/knowledge/deploy/InitializationListener.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.deploy; +package org.support.project.knowledge.deploy; import java.io.File; import java.util.TimeZone; @@ -6,12 +6,12 @@ import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import redcomet.common.config.ConfigLoader; -import redcomet.common.exception.SystemException; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.knowledge.config.AppConfig; -import redcomet.ormapping.connection.ConnectionManager; +import org.support.project.common.config.ConfigLoader; +import org.support.project.common.exception.SystemException; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.ormapping.connection.ConnectionManager; public class InitializationListener implements ServletContextListener { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/deploy/Migrate.java b/src/main/java/org/support/project/knowledge/deploy/Migrate.java similarity index 77% rename from src/main/java/redcomet/knowledge/deploy/Migrate.java rename to src/main/java/org/support/project/knowledge/deploy/Migrate.java index 888b200d0..1ebc6b56f 100644 --- a/src/main/java/redcomet/knowledge/deploy/Migrate.java +++ b/src/main/java/org/support/project/knowledge/deploy/Migrate.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.deploy; +package org.support.project.knowledge.deploy; public interface Migrate { diff --git a/src/main/java/redcomet/knowledge/deploy/v0_0_1/InitializeSystem.java b/src/main/java/org/support/project/knowledge/deploy/v0_0_1/InitializeSystem.java similarity index 67% rename from src/main/java/redcomet/knowledge/deploy/v0_0_1/InitializeSystem.java rename to src/main/java/org/support/project/knowledge/deploy/v0_0_1/InitializeSystem.java index eb322b978..435e88dd5 100644 --- a/src/main/java/redcomet/knowledge/deploy/v0_0_1/InitializeSystem.java +++ b/src/main/java/org/support/project/knowledge/deploy/v0_0_1/InitializeSystem.java @@ -1,19 +1,19 @@ -package redcomet.knowledge.deploy.v0_0_1; +package org.support.project.knowledge.deploy.v0_0_1; -import redcomet.knowledge.config.SystemConfig; -import redcomet.knowledge.deploy.Migrate; -import redcomet.ormapping.tool.dao.InitializeDao; -import redcomet.web.dao.RolesDao; -import redcomet.web.dao.UserRolesDao; -import redcomet.web.dao.UsersDao; -import redcomet.web.entity.RolesEntity; -import redcomet.web.entity.UserRolesEntity; -import redcomet.web.entity.UsersEntity; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.knowledge.deploy.Migrate; +import org.support.project.ormapping.tool.dao.InitializeDao; +import org.support.project.web.dao.RolesDao; +import org.support.project.web.dao.UserRolesDao; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.RolesEntity; +import org.support.project.web.entity.UserRolesEntity; +import org.support.project.web.entity.UsersEntity; public class InitializeSystem implements Migrate { public static InitializeSystem get() { - return redcomet.di.Container.getComp(InitializeSystem.class); + return org.support.project.di.Container.getComp(InitializeSystem.class); } @Override @@ -60,8 +60,8 @@ private void createTables() { initializeDao.dropAllTable(); String[] sqlpaths = { - "/redcomet/web/database/ddl.sql", - "/redcomet/knowledge/database/ddl.sql" + "/org/support/project/web/database/ddl.sql", + "/org/support/project/knowledge/database/ddl.sql" }; initializeDao.initializeDatabase(sqlpaths); } diff --git a/src/main/java/org/support/project/knowledge/deploy/v0_1_0/Migrate_0_1_0.java b/src/main/java/org/support/project/knowledge/deploy/v0_1_0/Migrate_0_1_0.java new file mode 100644 index 000000000..1269b48b7 --- /dev/null +++ b/src/main/java/org/support/project/knowledge/deploy/v0_1_0/Migrate_0_1_0.java @@ -0,0 +1,16 @@ +package org.support.project.knowledge.deploy.v0_1_0; + +import org.support.project.knowledge.deploy.Migrate; + +public class Migrate_0_1_0 implements Migrate { + + public static Migrate_0_1_0 get() { + return org.support.project.di.Container.getComp(Migrate_0_1_0.class); + } + + @Override + public boolean doMigrate() throws Exception { + return true; + } + +} diff --git a/src/main/java/org/support/project/knowledge/deploy/v0_3_0/Migrate_0_3_0.java b/src/main/java/org/support/project/knowledge/deploy/v0_3_0/Migrate_0_3_0.java new file mode 100644 index 000000000..4b794d8b4 --- /dev/null +++ b/src/main/java/org/support/project/knowledge/deploy/v0_3_0/Migrate_0_3_0.java @@ -0,0 +1,23 @@ +package org.support.project.knowledge.deploy.v0_3_0; + +import org.support.project.knowledge.deploy.Migrate; +import org.support.project.ormapping.tool.dao.InitializeDao; + +public class Migrate_0_3_0 implements Migrate { + + public static Migrate_0_3_0 get() { + return org.support.project.di.Container.getComp(Migrate_0_3_0.class); + } + + @Override + public boolean doMigrate() throws Exception { + InitializeDao initializeDao = InitializeDao.get(); + String[] sqlpaths = { + "/org/support/project/knowledge/deploy/v0_3_0/migrate.sql", + "/org/support/project/knowledge/deploy/v0_3_0/migrate2.sql" + }; + initializeDao.initializeDatabase(sqlpaths); + return true; + } + +} diff --git a/src/main/java/org/support/project/knowledge/deploy/v0_3_1/Migrate_0_3_1.java b/src/main/java/org/support/project/knowledge/deploy/v0_3_1/Migrate_0_3_1.java new file mode 100644 index 000000000..4e3de505a --- /dev/null +++ b/src/main/java/org/support/project/knowledge/deploy/v0_3_1/Migrate_0_3_1.java @@ -0,0 +1,22 @@ +package org.support.project.knowledge.deploy.v0_3_1; + +import org.support.project.knowledge.deploy.Migrate; +import org.support.project.ormapping.tool.dao.InitializeDao; + +public class Migrate_0_3_1 implements Migrate { + + public static Migrate_0_3_1 get() { + return org.support.project.di.Container.getComp(Migrate_0_3_1.class); + } + + @Override + public boolean doMigrate() throws Exception { + InitializeDao initializeDao = InitializeDao.get(); + String[] sqlpaths = { + "/org/support/project/knowledge/deploy/v0_3_1/migrate.sql" + }; + initializeDao.initializeDatabase(sqlpaths); + return true; + } + +} diff --git a/src/main/java/redcomet/knowledge/entity/AccountImagesEntity.java b/src/main/java/org/support/project/knowledge/entity/AccountImagesEntity.java similarity index 71% rename from src/main/java/redcomet/knowledge/entity/AccountImagesEntity.java rename to src/main/java/org/support/project/knowledge/entity/AccountImagesEntity.java index 32d192965..ed23cbdb8 100644 --- a/src/main/java/redcomet/knowledge/entity/AccountImagesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/AccountImagesEntity.java @@ -1,18 +1,16 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenAccountImagesEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.io.InputStream; import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenAccountImagesEntity; + /** * アカウントの画像 diff --git a/src/main/java/redcomet/knowledge/entity/CommentsEntity.java b/src/main/java/org/support/project/knowledge/entity/CommentsEntity.java similarity index 77% rename from src/main/java/redcomet/knowledge/entity/CommentsEntity.java rename to src/main/java/org/support/project/knowledge/entity/CommentsEntity.java index cd2efef55..29b095c75 100644 --- a/src/main/java/redcomet/knowledge/entity/CommentsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/CommentsEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenCommentsEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenCommentsEntity; + /** * コメント diff --git a/src/main/java/redcomet/knowledge/entity/KnowledgeFilesEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgeFilesEntity.java similarity index 74% rename from src/main/java/redcomet/knowledge/entity/KnowledgeFilesEntity.java rename to src/main/java/org/support/project/knowledge/entity/KnowledgeFilesEntity.java index 982e3df12..491eaa269 100644 --- a/src/main/java/redcomet/knowledge/entity/KnowledgeFilesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgeFilesEntity.java @@ -1,14 +1,13 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenKnowledgeFilesEntity; - -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +package org.support.project.knowledge.entity; import java.io.InputStream; import java.sql.Timestamp; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenKnowledgeFilesEntity; + /** * 添付ファイル diff --git a/src/main/java/redcomet/knowledge/entity/KnowledgeGroupsEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgeGroupsEntity.java similarity index 73% rename from src/main/java/redcomet/knowledge/entity/KnowledgeGroupsEntity.java rename to src/main/java/org/support/project/knowledge/entity/KnowledgeGroupsEntity.java index 47710f116..f45faae91 100644 --- a/src/main/java/redcomet/knowledge/entity/KnowledgeGroupsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgeGroupsEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenKnowledgeGroupsEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenKnowledgeGroupsEntity; + /** * アクセス可能なグループ diff --git a/src/main/java/redcomet/knowledge/entity/KnowledgeTagsEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgeTagsEntity.java similarity index 75% rename from src/main/java/redcomet/knowledge/entity/KnowledgeTagsEntity.java rename to src/main/java/org/support/project/knowledge/entity/KnowledgeTagsEntity.java index 89cf019b1..589b9f2c1 100644 --- a/src/main/java/redcomet/knowledge/entity/KnowledgeTagsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgeTagsEntity.java @@ -1,13 +1,12 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenKnowledgeTagsEntity; - -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +package org.support.project.knowledge.entity; import java.sql.Timestamp; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenKnowledgeTagsEntity; + /** * ナレッジが持つタグ diff --git a/src/main/java/redcomet/knowledge/entity/KnowledgeUsersEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgeUsersEntity.java similarity index 72% rename from src/main/java/redcomet/knowledge/entity/KnowledgeUsersEntity.java rename to src/main/java/org/support/project/knowledge/entity/KnowledgeUsersEntity.java index 3397d2781..93d676ddf 100644 --- a/src/main/java/redcomet/knowledge/entity/KnowledgeUsersEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgeUsersEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenKnowledgeUsersEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenKnowledgeUsersEntity; + /** * アクセス可能なユーザ diff --git a/src/main/java/redcomet/knowledge/entity/KnowledgesEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgesEntity.java similarity index 79% rename from src/main/java/redcomet/knowledge/entity/KnowledgesEntity.java rename to src/main/java/org/support/project/knowledge/entity/KnowledgesEntity.java index 0e3a0322f..e8070fb2f 100644 --- a/src/main/java/redcomet/knowledge/entity/KnowledgesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgesEntity.java @@ -1,15 +1,14 @@ -package redcomet.knowledge.entity; +package org.support.project.knowledge.entity; import org.owasp.validator.html.PolicyException; import org.owasp.validator.html.ScanException; - -import redcomet.common.exception.SystemException; -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.entity.gen.GenKnowledgesEntity; +import org.support.project.common.exception.SystemException; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.control.Control; +import org.support.project.knowledge.entity.gen.GenKnowledgesEntity; /** @@ -60,7 +59,7 @@ public KnowledgesEntity(Long knowledgeId) { } /* (non-Javadoc) - * @see redcomet.knowledge.entity.gen.GenKnowledgesEntity#getTitle() + * @see org.support.project.knowledge.entity.gen.GenKnowledgesEntity#getTitle() */ @Override public String getTitle() { @@ -75,7 +74,7 @@ public String getTitle() { } /* (non-Javadoc) - * @see redcomet.knowledge.entity.gen.GenKnowledgesEntity#getContent() + * @see org.support.project.knowledge.entity.gen.GenKnowledgesEntity#getContent() */ @Override public String getContent() { diff --git a/src/main/java/redcomet/knowledge/entity/LikesEntity.java b/src/main/java/org/support/project/knowledge/entity/LikesEntity.java similarity index 70% rename from src/main/java/redcomet/knowledge/entity/LikesEntity.java rename to src/main/java/org/support/project/knowledge/entity/LikesEntity.java index 23422d702..c903123ed 100644 --- a/src/main/java/redcomet/knowledge/entity/LikesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/LikesEntity.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.entity; +package org.support.project.knowledge.entity; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.entity.gen.GenLikesEntity; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenLikesEntity; /** diff --git a/src/main/java/redcomet/knowledge/entity/StocksEntity.java b/src/main/java/org/support/project/knowledge/entity/StocksEntity.java similarity index 72% rename from src/main/java/redcomet/knowledge/entity/StocksEntity.java rename to src/main/java/org/support/project/knowledge/entity/StocksEntity.java index 2fdda9a12..f08e726d9 100644 --- a/src/main/java/redcomet/knowledge/entity/StocksEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/StocksEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenStocksEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenStocksEntity; + /** * ストックしたナレッジ diff --git a/src/main/java/redcomet/knowledge/entity/TagsEntity.java b/src/main/java/org/support/project/knowledge/entity/TagsEntity.java similarity index 80% rename from src/main/java/redcomet/knowledge/entity/TagsEntity.java rename to src/main/java/org/support/project/knowledge/entity/TagsEntity.java index 1ea5b148e..83b854e1b 100644 --- a/src/main/java/redcomet/knowledge/entity/TagsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/TagsEntity.java @@ -1,13 +1,12 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenTagsEntity; - -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +package org.support.project.knowledge.entity; import java.sql.Timestamp; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenTagsEntity; + /** * タグ diff --git a/src/main/java/redcomet/knowledge/entity/ViewHistoriesEntity.java b/src/main/java/org/support/project/knowledge/entity/ViewHistoriesEntity.java similarity index 70% rename from src/main/java/redcomet/knowledge/entity/ViewHistoriesEntity.java rename to src/main/java/org/support/project/knowledge/entity/ViewHistoriesEntity.java index bb748d887..ba1a2ff94 100644 --- a/src/main/java/redcomet/knowledge/entity/ViewHistoriesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/ViewHistoriesEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenViewHistoriesEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenViewHistoriesEntity; + /** * ナレッジの参照履歴 diff --git a/src/main/java/redcomet/knowledge/entity/VotesEntity.java b/src/main/java/org/support/project/knowledge/entity/VotesEntity.java similarity index 69% rename from src/main/java/redcomet/knowledge/entity/VotesEntity.java rename to src/main/java/org/support/project/knowledge/entity/VotesEntity.java index ff9cc8c14..e4981f55c 100644 --- a/src/main/java/redcomet/knowledge/entity/VotesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/VotesEntity.java @@ -1,17 +1,15 @@ -package redcomet.knowledge.entity; - -import redcomet.knowledge.entity.gen.GenVotesEntity; +package org.support.project.knowledge.entity; import java.util.List; import java.util.Map; - -import redcomet.common.bean.ValidateError; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; - import java.sql.Timestamp; +import org.support.project.common.bean.ValidateError; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.entity.gen.GenVotesEntity; + /** * 投票 diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenAccountImagesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenAccountImagesEntity.java similarity index 96% rename from src/main/java/redcomet/knowledge/entity/gen/GenAccountImagesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenAccountImagesEntity.java index ee9df5316..f29bdd288 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenAccountImagesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenAccountImagesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -10,12 +10,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * アカウントの画像 diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenCommentsEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenCommentsEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenCommentsEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenCommentsEntity.java index 24fc92fe1..8c5d7a28b 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenCommentsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenCommentsEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * コメント diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeFilesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeFilesEntity.java similarity index 96% rename from src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeFilesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeFilesEntity.java index 9e45a1938..0ee1f0d1b 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeFilesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeFilesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -10,12 +10,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * 添付ファイル diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeGroupsEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeGroupsEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeGroupsEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeGroupsEntity.java index 4fde8da0d..ac59164f4 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeGroupsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeGroupsEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * アクセス可能なグループ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeTagsEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeTagsEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeTagsEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeTagsEntity.java index 4b1eb2b00..c1eac4f70 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeTagsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeTagsEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * ナレッジが持つタグ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeUsersEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeUsersEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeUsersEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeUsersEntity.java index c83a25422..883cab62e 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgeUsersEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgeUsersEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * アクセス可能なユーザ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgesEntity.java similarity index 96% rename from src/main/java/redcomet/knowledge/entity/gen/GenKnowledgesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgesEntity.java index 040f77805..8150fefe4 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenKnowledgesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenKnowledgesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * ナレッジ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenLikesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenLikesEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenLikesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenLikesEntity.java index beba364e8..ee2b56fe5 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenLikesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenLikesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * いいね diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenStocksEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenStocksEntity.java similarity index 96% rename from src/main/java/redcomet/knowledge/entity/gen/GenStocksEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenStocksEntity.java index ba2763e5c..b7fe064a3 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenStocksEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenStocksEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * ストックしたナレッジ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenTagsEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenTagsEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenTagsEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenTagsEntity.java index 448ea339c..281a6e20c 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenTagsEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenTagsEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * タグ diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenViewHistoriesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenViewHistoriesEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenViewHistoriesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenViewHistoriesEntity.java index 85eadf6dc..afb16a0e0 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenViewHistoriesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenViewHistoriesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * ナレッジの参照履歴 diff --git a/src/main/java/redcomet/knowledge/entity/gen/GenVotesEntity.java b/src/main/java/org/support/project/knowledge/entity/gen/GenVotesEntity.java similarity index 95% rename from src/main/java/redcomet/knowledge/entity/gen/GenVotesEntity.java rename to src/main/java/org/support/project/knowledge/entity/gen/GenVotesEntity.java index c7469b00f..6490d7e84 100644 --- a/src/main/java/redcomet/knowledge/entity/gen/GenVotesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/gen/GenVotesEntity.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.entity.gen; +package org.support.project.knowledge.entity.gen; import java.io.Serializable; import java.util.List; @@ -9,12 +9,12 @@ -import redcomet.common.bean.ValidateError; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; +import org.support.project.common.bean.ValidateError; +import org.support.project.common.validate.Validator; +import org.support.project.common.validate.ValidatorFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; /** * 投票 diff --git a/src/main/java/redcomet/knowledge/indexer/Indexer.java b/src/main/java/org/support/project/knowledge/indexer/Indexer.java similarity index 74% rename from src/main/java/redcomet/knowledge/indexer/Indexer.java rename to src/main/java/org/support/project/knowledge/indexer/Indexer.java index b7454895f..fea0681c2 100644 --- a/src/main/java/redcomet/knowledge/indexer/Indexer.java +++ b/src/main/java/org/support/project/knowledge/indexer/Indexer.java @@ -1,7 +1,7 @@ -package redcomet.knowledge.indexer; +package org.support.project.knowledge.indexer; -import redcomet.di.DI; -import redcomet.knowledge.indexer.impl.LuceneIndexer; +import org.support.project.di.DI; +import org.support.project.knowledge.indexer.impl.LuceneIndexer; @DI(impl=LuceneIndexer.class) diff --git a/src/main/java/redcomet/knowledge/indexer/IndexingValue.java b/src/main/java/org/support/project/knowledge/indexer/IndexingValue.java similarity index 91% rename from src/main/java/redcomet/knowledge/indexer/IndexingValue.java rename to src/main/java/org/support/project/knowledge/indexer/IndexingValue.java index 6c84c703a..b2378346a 100644 --- a/src/main/java/redcomet/knowledge/indexer/IndexingValue.java +++ b/src/main/java/org/support/project/knowledge/indexer/IndexingValue.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.indexer; +package org.support.project.knowledge.indexer; import java.util.ArrayList; import java.util.List; -import redcomet.common.util.StringUtils; +import org.support.project.common.util.StringUtils; public class IndexingValue { diff --git a/src/main/java/redcomet/knowledge/indexer/impl/LuceneIndexer.java b/src/main/java/org/support/project/knowledge/indexer/impl/LuceneIndexer.java similarity index 90% rename from src/main/java/redcomet/knowledge/indexer/impl/LuceneIndexer.java rename to src/main/java/org/support/project/knowledge/indexer/impl/LuceneIndexer.java index 62cbab477..d0a5c55c3 100644 --- a/src/main/java/redcomet/knowledge/indexer/impl/LuceneIndexer.java +++ b/src/main/java/org/support/project/knowledge/indexer/impl/LuceneIndexer.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.indexer.impl; +package org.support.project.knowledge.indexer.impl; import java.io.File; @@ -17,14 +17,13 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.util.Version; - -import redcomet.common.config.ConfigLoader; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.StringUtils; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.indexer.Indexer; -import redcomet.knowledge.indexer.IndexingValue; +import org.support.project.common.config.ConfigLoader; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.StringUtils; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.indexer.Indexer; +import org.support.project.knowledge.indexer.IndexingValue; public class LuceneIndexer implements Indexer { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/listener/CronListener.java b/src/main/java/org/support/project/knowledge/listener/CronListener.java similarity index 65% rename from src/main/java/redcomet/knowledge/listener/CronListener.java rename to src/main/java/org/support/project/knowledge/listener/CronListener.java index 0bd312dd8..08b0223da 100644 --- a/src/main/java/redcomet/knowledge/listener/CronListener.java +++ b/src/main/java/org/support/project/knowledge/listener/CronListener.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.listener; +package org.support.project.knowledge.listener; import java.io.File; import java.util.concurrent.ScheduledFuture; @@ -8,12 +8,13 @@ import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import redcomet.common.bat.JavaJob; -import redcomet.common.bat.JobResult; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.knowledge.bat.FileParseBat; -import redcomet.knowledge.bat.KnowledgeFileClearBat; +import org.support.project.common.bat.JavaJob; +import org.support.project.common.bat.JobResult; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.knowledge.bat.FileParseBat; +import org.support.project.knowledge.bat.KnowledgeFileClearBat; +import org.support.project.knowledge.bat.MailSendBat; public class CronListener implements ServletContextListener { @@ -22,6 +23,7 @@ public class CronListener implements ServletContextListener { private ScheduledThreadPoolExecutor service; private ScheduledFuture fileClearfuture; private ScheduledFuture parsefuture; + private ScheduledFuture mailfuture; @Override public void contextInitialized(final ServletContextEvent sce) { @@ -71,7 +73,30 @@ public void run() { LOG.error("添付ファイルのパースに失敗しました", e); } } - }, 60, 30, TimeUnit.SECONDS); // 10分後に実行、3分毎に実行 + }, 120, 30, TimeUnit.SECONDS); // 30秒毎に実行 + + mailfuture = service.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + LOG.trace("called."); + // Java を別のVMで実行(添付ファイルの中身を抽出し検索可能にする) + JavaJob job = new JavaJob(); + job.addjarDir(new File(sce.getServletContext().getRealPath("/WEB-INF/lib"))); + job.addClassPathDir(new File(sce.getServletContext().getRealPath("/WEB-INF/classes"))); + job.setMainClass(MailSendBat.class.getName()); + try { + JobResult result = job.execute(); + if (LOG.isDebugEnabled()) { + LOG.debug("finish MailSendBat [result]" + result.getResultCode()); + } + if (LOG.isTraceEnabled()) { + LOG.trace(result.getStdout()); + } + } catch (Exception e) { + LOG.error("メールの送信に失敗しました", e); + } + } + }, 120, 10, TimeUnit.SECONDS); // 10秒毎に実行 } @Override diff --git a/src/main/java/redcomet/knowledge/logic/AccountLogic.java b/src/main/java/org/support/project/knowledge/logic/AccountLogic.java similarity index 83% rename from src/main/java/redcomet/knowledge/logic/AccountLogic.java rename to src/main/java/org/support/project/knowledge/logic/AccountLogic.java index d9cfb3bd5..2eae04722 100644 --- a/src/main/java/redcomet/knowledge/logic/AccountLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/AccountLogic.java @@ -1,18 +1,17 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.io.IOException; import java.util.Date; import org.apache.commons.fileupload.FileItem; - -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.knowledge.dao.AccountImagesDao; -import redcomet.knowledge.entity.AccountImagesEntity; -import redcomet.knowledge.vo.UploadFile; -import redcomet.web.bean.LoginedUser; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.knowledge.dao.AccountImagesDao; +import org.support.project.knowledge.entity.AccountImagesEntity; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.web.bean.LoginedUser; public class AccountLogic { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/logic/IndexLogic.java b/src/main/java/org/support/project/knowledge/logic/IndexLogic.java similarity index 76% rename from src/main/java/redcomet/knowledge/logic/IndexLogic.java rename to src/main/java/org/support/project/knowledge/logic/IndexLogic.java index 6e1925b67..d9c80a7fa 100644 --- a/src/main/java/redcomet/knowledge/logic/IndexLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/IndexLogic.java @@ -1,16 +1,17 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.util.List; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.indexer.Indexer; +import org.support.project.knowledge.indexer.IndexingValue; +import org.support.project.knowledge.searcher.SearchResultValue; +import org.support.project.knowledge.searcher.Searcher; +import org.support.project.knowledge.searcher.SearchingValue; + import net.arnx.jsonic.JSON; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.knowledge.indexer.Indexer; -import redcomet.knowledge.indexer.IndexingValue; -import redcomet.knowledge.searcher.SearchResultValue; -import redcomet.knowledge.searcher.Searcher; -import redcomet.knowledge.searcher.SearchingValue; /** * 全文検索インデックスを使った処理 diff --git a/src/main/java/redcomet/knowledge/logic/KnowledgeLogic.java b/src/main/java/org/support/project/knowledge/logic/KnowledgeLogic.java similarity index 90% rename from src/main/java/redcomet/knowledge/logic/KnowledgeLogic.java rename to src/main/java/org/support/project/knowledge/logic/KnowledgeLogic.java index 80a48effc..9e5e211f0 100644 --- a/src/main/java/redcomet/knowledge/logic/KnowledgeLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/KnowledgeLogic.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.sql.Timestamp; import java.util.ArrayList; @@ -7,33 +7,33 @@ import java.util.List; import java.util.Map; -import redcomet.aop.Aspect; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.PropertyUtil; -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.knowledge.bat.FileParseBat; -import redcomet.knowledge.config.IndexType; -import redcomet.knowledge.dao.KnowledgeFilesDao; -import redcomet.knowledge.dao.KnowledgeTagsDao; -import redcomet.knowledge.dao.KnowledgeUsersDao; -import redcomet.knowledge.dao.KnowledgesDao; -import redcomet.knowledge.dao.LikesDao; -import redcomet.knowledge.dao.TagsDao; -import redcomet.knowledge.dao.ViewHistoriesDao; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.entity.KnowledgeTagsEntity; -import redcomet.knowledge.entity.KnowledgeUsersEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.knowledge.entity.LikesEntity; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.knowledge.entity.ViewHistoriesEntity; -import redcomet.knowledge.indexer.IndexingValue; -import redcomet.knowledge.searcher.SearchResultValue; -import redcomet.knowledge.searcher.SearchingValue; -import redcomet.knowledge.searcher.impl.LuceneSearcher; -import redcomet.web.bean.LoginedUser; +import org.support.project.aop.Aspect; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.PropertyUtil; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.knowledge.bat.FileParseBat; +import org.support.project.knowledge.config.IndexType; +import org.support.project.knowledge.dao.KnowledgeFilesDao; +import org.support.project.knowledge.dao.KnowledgeTagsDao; +import org.support.project.knowledge.dao.KnowledgeUsersDao; +import org.support.project.knowledge.dao.KnowledgesDao; +import org.support.project.knowledge.dao.LikesDao; +import org.support.project.knowledge.dao.TagsDao; +import org.support.project.knowledge.dao.ViewHistoriesDao; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.entity.KnowledgeTagsEntity; +import org.support.project.knowledge.entity.KnowledgeUsersEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.knowledge.entity.LikesEntity; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.knowledge.entity.ViewHistoriesEntity; +import org.support.project.knowledge.indexer.IndexingValue; +import org.support.project.knowledge.searcher.SearchResultValue; +import org.support.project.knowledge.searcher.SearchingValue; +import org.support.project.knowledge.searcher.impl.LuceneSearcher; +import org.support.project.web.bean.LoginedUser; public class KnowledgeLogic { /** ログ */ @@ -64,7 +64,7 @@ public static KnowledgeLogic get() { * @param tags * @return */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public List manegeTags(String tags) { List tagList = new ArrayList<>(); if (StringUtils.isEmpty(tags)) { @@ -100,7 +100,7 @@ public List manegeTags(String tags) { * @return * @throws Exception */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity insert(KnowledgesEntity entity, List tags, List fileNos, LoginedUser loginedUser) throws Exception { // ナレッジを登録 entity = knowledgesDao.insert(entity); @@ -125,7 +125,7 @@ public KnowledgesEntity insert(KnowledgesEntity entity, List tags, L * @return * @throws Exception */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public KnowledgesEntity update(KnowledgesEntity entity, List tags, List fileNos, LoginedUser loginedUser) throws Exception { // ナレッッジを更新 entity = knowledgesDao.update(entity); @@ -468,7 +468,7 @@ public List getKnowledges(List ids, LoginedUser logine * @param loginedUser * @throws Exception */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void delete(Long knowledgeId, LoginedUser loginedUser) throws Exception { //ナレッジ削除(通常のdeleteは、論理削除になる → 管理者は見える) knowledgesDao.delete(knowledgeId); diff --git a/src/main/java/org/support/project/knowledge/logic/MailLogic.java b/src/main/java/org/support/project/knowledge/logic/MailLogic.java new file mode 100644 index 000000000..c222e812d --- /dev/null +++ b/src/main/java/org/support/project/knowledge/logic/MailLogic.java @@ -0,0 +1,170 @@ +package org.support.project.knowledge.logic; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +import org.support.project.common.config.ConfigLoader; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.bat.MailSendBat; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.MailConfig; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.web.dao.MailsDao; +import org.support.project.web.dao.SystemConfigsDao; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.MailsEntity; +import org.support.project.web.entity.ProvisionalRegistrationsEntity; +import org.support.project.web.entity.SystemConfigsEntity; +import org.support.project.web.entity.UsersEntity; + +public class MailLogic { + /** ログ */ + private static Log LOG = LogFactory.getLog(MailLogic.class); + + private DateFormat DAY_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss"); + + public static MailLogic get() { + return Container.getComp(MailLogic.class); + } + + /** + * ユーザが仮登録されたので、そのユーザに招待のメールを送信するために、 + * メール送信テーブルに登録する + * (メールの送信処理は、非同期にバッチで実行される) + * @param entity + * @param url + */ + public void sendInvitation(ProvisionalRegistrationsEntity entity, String url) { + MailsDao mailsDao = MailsDao.get(); + MailsEntity mailsEntity = new MailsEntity(); + String mailId = idGenu("Invitation"); + mailsEntity.setMailId(mailId); + mailsEntity.setStatus(MailSendBat.MAIL_STATUS_UNSENT); + mailsEntity.setToAddress(entity.getUserKey()); + mailsEntity.setToName(entity.getUserName()); + + MailConfig mailConfig = ConfigLoader.load("/org/support/project/knowledge/mail/invitation.xml", MailConfig.class); + + mailsEntity.setTitle(mailConfig.getTitle()); + + String contents = mailConfig.getContents(); + contents = contents.replace("{UserName}", entity.getUserName()); + StringBuilder path = new StringBuilder(); + path.append(url); + path.append("/open.signup/activate/"); + path.append(entity.getId()); + contents = contents.replace("{URL}", path.toString()); + mailsEntity.setContent(contents); + + mailsDao.insert(mailsEntity); + } + + /** + * ユーザ登録が承認されたことをユーザに通知 + * @param entity + * @param url + */ + public void sendAcceptedAddRequest(ProvisionalRegistrationsEntity entity, String url) { + MailsDao mailsDao = MailsDao.get(); + MailsEntity mailsEntity = new MailsEntity(); + String mailId = idGenu("Accept"); + mailsEntity.setMailId(mailId); + mailsEntity.setStatus(MailSendBat.MAIL_STATUS_UNSENT); + mailsEntity.setToAddress(entity.getUserKey()); + mailsEntity.setToName(entity.getUserName()); + + MailConfig mailConfig = ConfigLoader.load("/org/support/project/knowledge/mail/accept_user.xml", MailConfig.class); + + mailsEntity.setTitle(mailConfig.getTitle()); + + String contents = mailConfig.getContents(); + contents = contents.replace("{UserName}", entity.getUserName()); + StringBuilder path = new StringBuilder(); + path.append(url); + contents = contents.replace("{URL}", path.toString()); + mailsEntity.setContent(contents); + + mailsDao.insert(mailsEntity); + } + + + /** + * メール送信のIDを生成 + * @param string + * @return + */ + private String idGenu(String label) { + StringBuilder builder = new StringBuilder(); + builder.append(label); + builder.append("-"); + builder.append(DAY_FORMAT.format(new Date())); + builder.append("-"); + builder.append(UUID.randomUUID().toString()); + return builder.toString(); + } + + + /** + * 管理者へ通知 + * @param title + * @param contents + */ + private void sendNotify(String title, String contents) { + SystemConfigsDao configsDao = SystemConfigsDao.get(); + SystemConfigsEntity configsEntity = configsDao.selectOnKey(SystemConfig.USER_ADD_NOTIFY, AppConfig.SYSTEM_NAME); + if (configsEntity != null && SystemConfig.USER_ADD_NOTIFY_ON.equals(configsEntity.getConfigValue())) { + // 管理者へのメール通知がONなので、メールを送信する + UsersDao usersDao = UsersDao.get(); + List users = usersDao.selectOnRoleKey(SystemConfig.ROLE_ADMIN); + for (UsersEntity entity : users) { + MailsDao mailsDao = MailsDao.get(); + MailsEntity mailsEntity = new MailsEntity(); + String mailId = idGenu("Notify"); + mailsEntity.setMailId(mailId); + mailsEntity.setStatus(MailSendBat.MAIL_STATUS_UNSENT); + mailsEntity.setToAddress(entity.getUserKey()); + mailsEntity.setToName(entity.getUserName()); + mailsEntity.setTitle(title); + mailsEntity.setContent(contents); + mailsDao.insert(mailsEntity); + } + } + } + + /** + * ユーザ登録通知 + * @param user + */ + public void sendNotifyAddUser(UsersEntity user) { + MailConfig mailConfig = ConfigLoader.load("/org/support/project/knowledge/mail/notify_add_user.xml", MailConfig.class); + String contents = mailConfig.getContents(); + contents = contents.replace("{UserId}", String.valueOf(user.getUserId())); + String title = mailConfig.getTitle(); + + sendNotify(title, contents); + } + + + /** + * ユーザの仮登録通知 + * @param entity + */ + public void sendNotifyAcceptUser(ProvisionalRegistrationsEntity entity) { + MailConfig mailConfig = ConfigLoader.load("/org/support/project/knowledge/mail/notify_accept_user.xml", MailConfig.class); + String contents = mailConfig.getContents(); + String title = mailConfig.getTitle(); + + sendNotify(title, contents); + } + + + + + + +} diff --git a/src/main/java/redcomet/knowledge/logic/SystemConfigLogic.java b/src/main/java/org/support/project/knowledge/logic/SystemConfigLogic.java similarity index 64% rename from src/main/java/redcomet/knowledge/logic/SystemConfigLogic.java rename to src/main/java/org/support/project/knowledge/logic/SystemConfigLogic.java index 493181718..e00e9519e 100644 --- a/src/main/java/redcomet/knowledge/logic/SystemConfigLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/SystemConfigLogic.java @@ -1,12 +1,12 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.config.SystemConfig; -import redcomet.web.dao.SystemConfigsDao; -import redcomet.web.entity.SystemConfigsEntity; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.web.dao.SystemConfigsDao; +import org.support.project.web.entity.SystemConfigsEntity; public class SystemConfigLogic { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/logic/TagLogic.java b/src/main/java/org/support/project/knowledge/logic/TagLogic.java similarity index 69% rename from src/main/java/redcomet/knowledge/logic/TagLogic.java rename to src/main/java/org/support/project/knowledge/logic/TagLogic.java index 2a4b0ce16..0f20b7915 100644 --- a/src/main/java/redcomet/knowledge/logic/TagLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/TagLogic.java @@ -1,13 +1,13 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.util.List; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.knowledge.dao.TagsDao; -import redcomet.knowledge.entity.TagsEntity; -import redcomet.web.bean.LoginedUser; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.dao.TagsDao; +import org.support.project.knowledge.entity.TagsEntity; +import org.support.project.web.bean.LoginedUser; public class TagLogic { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/logic/UploadedFileLogic.java b/src/main/java/org/support/project/knowledge/logic/UploadedFileLogic.java similarity index 91% rename from src/main/java/redcomet/knowledge/logic/UploadedFileLogic.java rename to src/main/java/org/support/project/knowledge/logic/UploadedFileLogic.java index ba89f24de..ea893f409 100644 --- a/src/main/java/redcomet/knowledge/logic/UploadedFileLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/UploadedFileLogic.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.io.IOException; import java.util.ArrayList; @@ -8,16 +8,15 @@ import java.util.Map; import org.apache.commons.fileupload.FileItem; - -import redcomet.aop.Aspect; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.knowledge.dao.KnowledgeFilesDao; -import redcomet.knowledge.entity.KnowledgeFilesEntity; -import redcomet.knowledge.entity.KnowledgesEntity; -import redcomet.knowledge.vo.UploadFile; -import redcomet.web.bean.LoginedUser; +import org.support.project.aop.Aspect; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.knowledge.dao.KnowledgeFilesDao; +import org.support.project.knowledge.entity.KnowledgeFilesEntity; +import org.support.project.knowledge.entity.KnowledgesEntity; +import org.support.project.knowledge.vo.UploadFile; +import org.support.project.web.bean.LoginedUser; public class UploadedFileLogic { /** ログ */ @@ -37,7 +36,7 @@ public static UploadedFileLogic get() { * @return * @throws IOException */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public UploadFile saveFile(FileItem fileItem, LoginedUser loginedUser, String context) throws IOException { LOG.trace("saveFile()"); KnowledgeFilesEntity entity = new KnowledgeFilesEntity(); @@ -90,7 +89,7 @@ private UploadFile convUploadFile(String context, KnowledgeFilesEntity entity) { * @param fileNos * @param loginedUser */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void setKnowledgeFiles(KnowledgesEntity knowledgesEntity, List fileNos, LoginedUser loginedUser) { // 現在、すでに紐づいている添付ファイルを取得 List filesEntities = filesDao.selectOnKnowledgeId(knowledgesEntity.getKnowledgeId()); diff --git a/src/main/java/redcomet/knowledge/logic/UserLogic.java b/src/main/java/org/support/project/knowledge/logic/UserLogic.java similarity index 52% rename from src/main/java/redcomet/knowledge/logic/UserLogic.java rename to src/main/java/org/support/project/knowledge/logic/UserLogic.java index 72da50c4f..848d4bbb7 100644 --- a/src/main/java/redcomet/knowledge/logic/UserLogic.java +++ b/src/main/java/org/support/project/knowledge/logic/UserLogic.java @@ -1,22 +1,25 @@ -package redcomet.knowledge.logic; +package org.support.project.knowledge.logic; import java.util.HashMap; import java.util.List; import java.util.Map; -import redcomet.aop.Aspect; -import redcomet.common.config.INT_FLAG; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.RandomUtil; -import redcomet.di.Container; -import redcomet.web.bean.LoginedUser; -import redcomet.web.dao.RolesDao; -import redcomet.web.dao.UserRolesDao; -import redcomet.web.dao.UsersDao; -import redcomet.web.entity.RolesEntity; -import redcomet.web.entity.UserRolesEntity; -import redcomet.web.entity.UsersEntity; +import org.support.project.aop.Aspect; +import org.support.project.common.config.INT_FLAG; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.RandomUtil; +import org.support.project.di.Container; +import org.support.project.knowledge.config.SystemConfig; +import org.support.project.web.bean.LoginedUser; +import org.support.project.web.dao.ProvisionalRegistrationsDao; +import org.support.project.web.dao.RolesDao; +import org.support.project.web.dao.UserRolesDao; +import org.support.project.web.dao.UsersDao; +import org.support.project.web.entity.ProvisionalRegistrationsEntity; +import org.support.project.web.entity.RolesEntity; +import org.support.project.web.entity.UserRolesEntity; +import org.support.project.web.entity.UsersEntity; public class UserLogic { /** ログ */ @@ -37,7 +40,7 @@ public static UserLogic get() { * @param loginedUser * @return */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public UsersEntity insert(UsersEntity user, String[] roles, LoginedUser loginedUser) { LOG.trace("insert"); @@ -46,7 +49,47 @@ public UsersEntity insert(UsersEntity user, String[] roles, LoginedUser loginedU user.setPassword(""); // ロールをセット - insertRoles(user, roles, loginedUser); + insertRoles(user, roles); + + return user; + } + + + /** + * 仮登録から、本登録 + * @param user + * @param roles + * @param loginedUser + * @return + */ + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) + public UsersEntity activate(ProvisionalRegistrationsEntity entity) { + LOG.trace("activate"); + + if (usersDao.selectOnUserKey(entity.getUserKey()) != null) { + // 仮登録のユーザが既に存在している + ProvisionalRegistrationsDao provisionalRegistrationsDao = ProvisionalRegistrationsDao.get(); + provisionalRegistrationsDao.deleteOnUserKey(entity.getUserKey()); + return null; + } + + UsersEntity user = new UsersEntity(); + user.setUserKey(entity.getUserKey()); + user.setUserName(entity.getUserName()); + user.setPassword(entity.getPassword()); + user.setSalt(entity.getSalt()); + user.setEncrypted(true); + String[] roles = {SystemConfig.ROLE_USER}; + + user = usersDao.insert(user); + user.setPassword(""); + + // ロールをセット + insertRoles(user, roles); + + // 仮登録の削除 + ProvisionalRegistrationsDao provisionalRegistrationsDao = ProvisionalRegistrationsDao.get(); + provisionalRegistrationsDao.deleteOnUserKey(entity.getUserKey()); return user; } @@ -58,7 +101,7 @@ public UsersEntity insert(UsersEntity user, String[] roles, LoginedUser loginedU * @param loginedUser * @return */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public UsersEntity update(UsersEntity user, String[] roles, LoginedUser loginedUser) { LOG.trace("update"); @@ -66,7 +109,7 @@ public UsersEntity update(UsersEntity user, String[] roles, LoginedUser loginedU user.setPassword(""); // ロールをセット - insertRoles(user, roles, loginedUser); + insertRoles(user, roles); return user; } @@ -78,7 +121,7 @@ public UsersEntity update(UsersEntity user, String[] roles, LoginedUser loginedU * @param roles 設定されているID * @param loginedUser */ - private void insertRoles(UsersEntity user, String[] roles, LoginedUser loginedUser) { + private void insertRoles(UsersEntity user, String[] roles) { LOG.info(roles); @@ -111,7 +154,7 @@ private void insertRoles(UsersEntity user, String[] roles, LoginedUser loginedUs * @param knowledgeRemove * @throws Exception */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) + @Aspect(advice=org.support.project.ormapping.transaction.Transaction.class) public void withdrawal(Integer loginUserId, boolean knowledgeRemove) throws Exception { // アカウント削除 UsersDao usersDao = UsersDao.get(); diff --git a/src/main/java/redcomet/knowledge/parser/Parser.java b/src/main/java/org/support/project/knowledge/parser/Parser.java similarity index 65% rename from src/main/java/redcomet/knowledge/parser/Parser.java rename to src/main/java/org/support/project/knowledge/parser/Parser.java index 8c6e40ae0..458cc2db7 100755 --- a/src/main/java/redcomet/knowledge/parser/Parser.java +++ b/src/main/java/org/support/project/knowledge/parser/Parser.java @@ -1,8 +1,8 @@ -package redcomet.knowledge.parser; +package org.support.project.knowledge.parser; import java.io.File; -import redcomet.knowledge.vo.ParseResult; +import org.support.project.knowledge.vo.ParseResult; public interface Parser { diff --git a/src/main/java/redcomet/knowledge/parser/ParserFactory.java b/src/main/java/org/support/project/knowledge/parser/ParserFactory.java similarity index 83% rename from src/main/java/redcomet/knowledge/parser/ParserFactory.java rename to src/main/java/org/support/project/knowledge/parser/ParserFactory.java index 51c579204..849141c25 100755 --- a/src/main/java/redcomet/knowledge/parser/ParserFactory.java +++ b/src/main/java/org/support/project/knowledge/parser/ParserFactory.java @@ -1,11 +1,11 @@ -package redcomet.knowledge.parser; +package org.support.project.knowledge.parser; import java.io.IOException; -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.knowledge.config.FileType; -import redcomet.knowledge.parser.impl.TikaParser; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.knowledge.config.FileType; +import org.support.project.knowledge.parser.impl.TikaParser; public final class ParserFactory { diff --git a/src/main/java/redcomet/knowledge/parser/impl/TextParser.java b/src/main/java/org/support/project/knowledge/parser/impl/TextParser.java similarity index 85% rename from src/main/java/redcomet/knowledge/parser/impl/TextParser.java rename to src/main/java/org/support/project/knowledge/parser/impl/TextParser.java index 8d4388c57..2d913e85a 100755 --- a/src/main/java/redcomet/knowledge/parser/impl/TextParser.java +++ b/src/main/java/org/support/project/knowledge/parser/impl/TextParser.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.parser.impl; +package org.support.project.knowledge.parser.impl; import java.io.BufferedReader; import java.io.File; @@ -11,14 +11,13 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.mozilla.universalchardet.UniversalDetector; - -import redcomet.common.util.StringUtils; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.parser.Parser; -import redcomet.knowledge.vo.ParseResult; -import redcomet.knowledge.vo.Sentence; +import org.support.project.common.util.StringUtils; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.parser.Parser; +import org.support.project.knowledge.vo.ParseResult; +import org.support.project.knowledge.vo.Sentence; /** * テキストファイル用のクローラー diff --git a/src/main/java/redcomet/knowledge/parser/impl/TikaParser.java b/src/main/java/org/support/project/knowledge/parser/impl/TikaParser.java similarity index 82% rename from src/main/java/redcomet/knowledge/parser/impl/TikaParser.java rename to src/main/java/org/support/project/knowledge/parser/impl/TikaParser.java index 2c8a9c163..00c2da3f6 100755 --- a/src/main/java/redcomet/knowledge/parser/impl/TikaParser.java +++ b/src/main/java/org/support/project/knowledge/parser/impl/TikaParser.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.parser.impl; +package org.support.project.knowledge.parser.impl; import java.io.BufferedReader; import java.io.File; @@ -10,14 +10,13 @@ import org.apache.tika.parser.AutoDetectParser; import org.apache.tika.parser.ParseContext; import org.apache.tika.parser.ParsingReader; - -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.parser.Parser; -import redcomet.knowledge.vo.ParseResult; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.di.Container; +import org.support.project.di.DI; +import org.support.project.di.Instance; +import org.support.project.knowledge.parser.Parser; +import org.support.project.knowledge.vo.ParseResult; @DI(instance=Instance.Prototype) public class TikaParser implements Parser { diff --git a/src/main/java/redcomet/knowledge/searcher/SearchResultValue.java b/src/main/java/org/support/project/knowledge/searcher/SearchResultValue.java similarity index 92% rename from src/main/java/redcomet/knowledge/searcher/SearchResultValue.java rename to src/main/java/org/support/project/knowledge/searcher/SearchResultValue.java index 274e370a8..de7b69d68 100644 --- a/src/main/java/redcomet/knowledge/searcher/SearchResultValue.java +++ b/src/main/java/org/support/project/knowledge/searcher/SearchResultValue.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.searcher; +package org.support.project.knowledge.searcher; public class SearchResultValue { diff --git a/src/main/java/redcomet/knowledge/searcher/Searcher.java b/src/main/java/org/support/project/knowledge/searcher/Searcher.java similarity index 58% rename from src/main/java/redcomet/knowledge/searcher/Searcher.java rename to src/main/java/org/support/project/knowledge/searcher/Searcher.java index f6673fbde..b3111b348 100644 --- a/src/main/java/redcomet/knowledge/searcher/Searcher.java +++ b/src/main/java/org/support/project/knowledge/searcher/Searcher.java @@ -1,9 +1,9 @@ -package redcomet.knowledge.searcher; +package org.support.project.knowledge.searcher; import java.util.List; -import redcomet.di.DI; -import redcomet.knowledge.searcher.impl.LuceneSearcher; +import org.support.project.di.DI; +import org.support.project.knowledge.searcher.impl.LuceneSearcher; @DI(impl=LuceneSearcher.class) public interface Searcher { diff --git a/src/main/java/redcomet/knowledge/searcher/SearchingValue.java b/src/main/java/org/support/project/knowledge/searcher/SearchingValue.java similarity index 87% rename from src/main/java/redcomet/knowledge/searcher/SearchingValue.java rename to src/main/java/org/support/project/knowledge/searcher/SearchingValue.java index 5a386a712..d0685007a 100644 --- a/src/main/java/redcomet/knowledge/searcher/SearchingValue.java +++ b/src/main/java/org/support/project/knowledge/searcher/SearchingValue.java @@ -1,11 +1,11 @@ -package redcomet.knowledge.searcher; +package org.support.project.knowledge.searcher; import java.util.ArrayList; import java.util.List; -import redcomet.common.util.StringUtils; -import redcomet.knowledge.control.open.KnowledgeControl; -import redcomet.knowledge.indexer.IndexingValue; +import org.support.project.common.util.StringUtils; +import org.support.project.knowledge.control.open.KnowledgeControl; +import org.support.project.knowledge.indexer.IndexingValue; public class SearchingValue { public static final int ID_ZEROPADDING_DIGIT = IndexingValue.ID_ZEROPADDING_DIGIT; diff --git a/src/main/java/redcomet/knowledge/searcher/impl/LuceneSearcher.java b/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java similarity index 91% rename from src/main/java/redcomet/knowledge/searcher/impl/LuceneSearcher.java rename to src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java index ac6313614..8e2d4fa3f 100644 --- a/src/main/java/redcomet/knowledge/searcher/impl/LuceneSearcher.java +++ b/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.searcher.impl; +package org.support.project.knowledge.searcher.impl; import java.io.File; import java.io.IOException; @@ -33,17 +33,16 @@ import org.apache.lucene.search.highlight.SimpleSpanFragmenter; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.util.Version; - -import redcomet.common.config.ConfigLoader; -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.common.util.StringUtils; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.config.IndexType; -import redcomet.knowledge.indexer.impl.LuceneIndexer; -import redcomet.knowledge.searcher.SearchResultValue; -import redcomet.knowledge.searcher.Searcher; -import redcomet.knowledge.searcher.SearchingValue; +import org.support.project.common.config.ConfigLoader; +import org.support.project.common.log.Log; +import org.support.project.common.log.LogFactory; +import org.support.project.common.util.StringUtils; +import org.support.project.knowledge.config.AppConfig; +import org.support.project.knowledge.config.IndexType; +import org.support.project.knowledge.indexer.impl.LuceneIndexer; +import org.support.project.knowledge.searcher.SearchResultValue; +import org.support.project.knowledge.searcher.Searcher; +import org.support.project.knowledge.searcher.SearchingValue; public class LuceneSearcher implements Searcher { /** ログ */ diff --git a/src/main/java/redcomet/knowledge/vo/LikeCount.java b/src/main/java/org/support/project/knowledge/vo/LikeCount.java similarity index 92% rename from src/main/java/redcomet/knowledge/vo/LikeCount.java rename to src/main/java/org/support/project/knowledge/vo/LikeCount.java index 7d158be40..de0750241 100644 --- a/src/main/java/redcomet/knowledge/vo/LikeCount.java +++ b/src/main/java/org/support/project/knowledge/vo/LikeCount.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; public class LikeCount { private Long knowledgeId; diff --git a/src/main/java/redcomet/knowledge/vo/ParseResult.java b/src/main/java/org/support/project/knowledge/vo/ParseResult.java similarity index 89% rename from src/main/java/redcomet/knowledge/vo/ParseResult.java rename to src/main/java/org/support/project/knowledge/vo/ParseResult.java index 6b64b55bf..c7fde8c4d 100644 --- a/src/main/java/redcomet/knowledge/vo/ParseResult.java +++ b/src/main/java/org/support/project/knowledge/vo/ParseResult.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; import java.util.List; diff --git a/src/main/java/redcomet/knowledge/vo/Roles.java b/src/main/java/org/support/project/knowledge/vo/Roles.java similarity index 76% rename from src/main/java/redcomet/knowledge/vo/Roles.java rename to src/main/java/org/support/project/knowledge/vo/Roles.java index 9d503a977..c99d2683c 100644 --- a/src/main/java/redcomet/knowledge/vo/Roles.java +++ b/src/main/java/org/support/project/knowledge/vo/Roles.java @@ -1,6 +1,6 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; -import redcomet.web.entity.RolesEntity; +import org.support.project.web.entity.RolesEntity; public class Roles extends RolesEntity { /** シリアルバージョン */ diff --git a/src/main/java/redcomet/knowledge/vo/Sentence.java b/src/main/java/org/support/project/knowledge/vo/Sentence.java similarity index 90% rename from src/main/java/redcomet/knowledge/vo/Sentence.java rename to src/main/java/org/support/project/knowledge/vo/Sentence.java index d08a8c213..932afb5b0 100644 --- a/src/main/java/redcomet/knowledge/vo/Sentence.java +++ b/src/main/java/org/support/project/knowledge/vo/Sentence.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; public class Sentence { /** 書かれている場所 */ diff --git a/src/main/java/redcomet/knowledge/vo/UploadFile.java b/src/main/java/org/support/project/knowledge/vo/UploadFile.java similarity index 98% rename from src/main/java/redcomet/knowledge/vo/UploadFile.java rename to src/main/java/org/support/project/knowledge/vo/UploadFile.java index e48b872c4..fda34cb1e 100644 --- a/src/main/java/redcomet/knowledge/vo/UploadFile.java +++ b/src/main/java/org/support/project/knowledge/vo/UploadFile.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; public class UploadFile { diff --git a/src/main/java/redcomet/knowledge/vo/UploadResults.java b/src/main/java/org/support/project/knowledge/vo/UploadResults.java similarity index 87% rename from src/main/java/redcomet/knowledge/vo/UploadResults.java rename to src/main/java/org/support/project/knowledge/vo/UploadResults.java index 2cad1d3b6..1d1e85205 100644 --- a/src/main/java/redcomet/knowledge/vo/UploadResults.java +++ b/src/main/java/org/support/project/knowledge/vo/UploadResults.java @@ -1,4 +1,4 @@ -package redcomet.knowledge.vo; +package org.support.project.knowledge.vo; import java.util.List; diff --git a/src/main/java/redcomet/knowledge/bat/MailSendBat.java b/src/main/java/redcomet/knowledge/bat/MailSendBat.java deleted file mode 100644 index 84bd7bfac..000000000 --- a/src/main/java/redcomet/knowledge/bat/MailSendBat.java +++ /dev/null @@ -1,11 +0,0 @@ -package redcomet.knowledge.bat; - -/** - * メールの送信処理は、時間がかかるため、バッチ処理の中で処理する - * - * @author Koda - * - */ -public class MailSendBat { - -} diff --git a/src/main/java/redcomet/knowledge/control/IndexControl.java b/src/main/java/redcomet/knowledge/control/IndexControl.java deleted file mode 100644 index dcba8f025..000000000 --- a/src/main/java/redcomet/knowledge/control/IndexControl.java +++ /dev/null @@ -1,23 +0,0 @@ -package redcomet.knowledge.control; - -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.web.bean.MessageResult; -import redcomet.web.boundary.Boundary; -import redcomet.web.config.MessageStatus; - -@DI(instance=Instance.Prototype) -public class IndexControl extends Control { - /** ログ */ - private static Log log = LogFactory.getLog(IndexControl.class); - - public Boundary msg() { - MessageResult result = new MessageResult(); - result.setStatus(MessageStatus.Success.getValue()); - result.setMessage("OK"); - return send(result); - } - -} diff --git a/src/main/java/redcomet/knowledge/control/open/LicenseControl.java b/src/main/java/redcomet/knowledge/control/open/LicenseControl.java deleted file mode 100644 index 5ee77e7aa..000000000 --- a/src/main/java/redcomet/knowledge/control/open/LicenseControl.java +++ /dev/null @@ -1,10 +0,0 @@ -package redcomet.knowledge.control.open; - -import redcomet.di.DI; -import redcomet.di.Instance; -import redcomet.knowledge.control.Control; - -@DI(instance=Instance.Prototype) -public class LicenseControl extends Control { - -} diff --git a/src/main/java/redcomet/knowledge/control/open/SignupControl.java b/src/main/java/redcomet/knowledge/control/open/SignupControl.java deleted file mode 100644 index 79bc0db20..000000000 --- a/src/main/java/redcomet/knowledge/control/open/SignupControl.java +++ /dev/null @@ -1,146 +0,0 @@ -package redcomet.knowledge.control.open; - -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import redcomet.aop.Aspect; -import redcomet.common.bean.ValidateError; -import redcomet.common.util.StringUtils; -import redcomet.common.validate.Validator; -import redcomet.common.validate.ValidatorFactory; -import redcomet.di.Container; -import redcomet.knowledge.config.AppConfig; -import redcomet.knowledge.config.SystemConfig; -import redcomet.knowledge.control.Control; -import redcomet.knowledge.logic.MailLogic; -import redcomet.knowledge.logic.UserLogic; -import redcomet.web.boundary.Boundary; -import redcomet.web.common.HttpStatus; -import redcomet.web.dao.ProvisionalRegistrationsDao; -import redcomet.web.dao.SystemConfigsDao; -import redcomet.web.dao.UsersDao; -import redcomet.web.entity.ProvisionalRegistrationsEntity; -import redcomet.web.entity.SystemConfigsEntity; -import redcomet.web.entity.UsersEntity; -import redcomet.web.logic.AuthenticationLogic; -import redcomet.web.logic.impl.DefaultAuthenticationLogicImpl; - -public class SignupControl extends Control { - - /** - * ユーザのサインアップ画面を表示 - * @return - */ - public Boundary view() { - return forward("signup.jsp"); - } - - /** - * 新規登録処理を保存 - * @return - */ - public Boundary save() { - SystemConfigsDao systemConfigsDao = SystemConfigsDao.get(); - SystemConfigsEntity userAddType = systemConfigsDao.selectOnKey(SystemConfig.USER_ADD_TYPE, AppConfig.SYSTEM_NAME); - if (userAddType == null) { - // ユーザによるデータの追加は認められていない - return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); - } - if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_ADMIN)) { - // ユーザによるデータの追加は認められていない - return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); - } - - List errors = validate(); - if (!errors.isEmpty()) { - setResult(null, errors); - return forward("signup.jsp"); - } - - if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_USER)) { - // ユーザが自分で登録 - addUser(); - addMsgInfo("ユーザ登録しました"); - return redirect(getRequest().getContextPath()); - } else if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_MAIL) - || userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_APPROVE)) { - // ユーザは仮登録を行う - ProvisionalRegistrationsEntity entity = addProvisionalRegistration(); - if (userAddType.getConfigValue().equals(SystemConfig.USER_ADD_TYPE_VALUE_MAIL)) { - // 招待のメールを送信 - MailLogic mailLogic = MailLogic.get(); - mailLogic.sendInvitation(entity); - return forward("mail_sended.jsp"); - } else { - // 管理者へメール通知 - return forward("provisional_registration.jsp"); - } - } - return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND"); - } - - - - /** - * 仮登録 - * @return - */ - @Aspect(advice=redcomet.ormapping.transaction.Transaction.class) - private ProvisionalRegistrationsEntity addProvisionalRegistration() { - ProvisionalRegistrationsEntity entity = super.getParams(ProvisionalRegistrationsEntity.class); - String id = UUID.randomUUID().toString() + "-" + new Date().getTime() + "-" + UUID.randomUUID().toString(); - entity.setId(id); - ProvisionalRegistrationsDao dao = ProvisionalRegistrationsDao.get(); - //既に仮登録が行われたユーザ(メールアドレス)でも、再度仮登録できる - //ただし、以前の登録は無効にする - dao.deleteOnUserKey(entity.getUserKey()); - //データ登録 - entity = dao.insert(entity); - return entity; - } - - /** - * ユーザ追加 - */ - private void addUser() { - // エラーが無い場合のみ登録 - UsersEntity user = super.getParams(UsersEntity.class); - String[] roles = {SystemConfig.ROLE_USER}; - user = UserLogic.get().insert(user, roles, getLoginedUser()); - setAttributeOnProperty(user); - - // ログイン処理 - AuthenticationLogic logic = Container.getComp(DefaultAuthenticationLogicImpl.class); - logic.setSession(user.getUserKey(), getRequest()); - } - - /** - * 入力チェック - * @return - */ - private List validate() { - List errors = UsersEntity.get().validate(getParams()); - if (!StringUtils.isEmpty(getParam("password"))) { - if (!getParam("password").equals(getParam("confirm_password", String.class))) { - ValidateError error = new ValidateError("PasswordとConfirm Passwordが違っています"); - errors.add(error); - } - } - UsersDao dao = UsersDao.get(); - UsersEntity user = dao.selectOnUserKey(getParam("userKey")); - if (user != null) { - ValidateError error = new ValidateError("既に登録されているEmail Addressです"); - errors.add(error); - } - - Validator validator = ValidatorFactory.getInstance(Validator.MAIL); - ValidateError error = validator.validate(getParam("userKey"), "Email Address"); - if (error != null) { - errors.add(error); - } - return errors; - } - - -} diff --git a/src/main/java/redcomet/knowledge/deploy/v0_1_0/Migrate_0_1_0.java b/src/main/java/redcomet/knowledge/deploy/v0_1_0/Migrate_0_1_0.java deleted file mode 100644 index 6e3ba2c17..000000000 --- a/src/main/java/redcomet/knowledge/deploy/v0_1_0/Migrate_0_1_0.java +++ /dev/null @@ -1,16 +0,0 @@ -package redcomet.knowledge.deploy.v0_1_0; - -import redcomet.knowledge.deploy.Migrate; - -public class Migrate_0_1_0 implements Migrate { - - public static Migrate_0_1_0 get() { - return redcomet.di.Container.getComp(Migrate_0_1_0.class); - } - - @Override - public boolean doMigrate() throws Exception { - return true; - } - -} diff --git a/src/main/java/redcomet/knowledge/deploy/v0_3_0/Migrate_0_3_0.java b/src/main/java/redcomet/knowledge/deploy/v0_3_0/Migrate_0_3_0.java deleted file mode 100644 index 352bf4069..000000000 --- a/src/main/java/redcomet/knowledge/deploy/v0_3_0/Migrate_0_3_0.java +++ /dev/null @@ -1,23 +0,0 @@ -package redcomet.knowledge.deploy.v0_3_0; - -import redcomet.knowledge.deploy.Migrate; -import redcomet.ormapping.tool.dao.InitializeDao; - -public class Migrate_0_3_0 implements Migrate { - - public static Migrate_0_3_0 get() { - return redcomet.di.Container.getComp(Migrate_0_3_0.class); - } - - @Override - public boolean doMigrate() throws Exception { - InitializeDao initializeDao = InitializeDao.get(); - String[] sqlpaths = { - "/redcomet/knowledge/deploy/v0_3_0/migrate.sql", - "/redcomet/knowledge/deploy/v0_3_0/migrate2.sql" - }; - initializeDao.initializeDatabase(sqlpaths); - return true; - } - -} diff --git a/src/main/java/redcomet/knowledge/deploy/v0_3_1/Migrate_0_3_1.java b/src/main/java/redcomet/knowledge/deploy/v0_3_1/Migrate_0_3_1.java deleted file mode 100644 index 4b90697ed..000000000 --- a/src/main/java/redcomet/knowledge/deploy/v0_3_1/Migrate_0_3_1.java +++ /dev/null @@ -1,22 +0,0 @@ -package redcomet.knowledge.deploy.v0_3_1; - -import redcomet.knowledge.deploy.Migrate; -import redcomet.ormapping.tool.dao.InitializeDao; - -public class Migrate_0_3_1 implements Migrate { - - public static Migrate_0_3_1 get() { - return redcomet.di.Container.getComp(Migrate_0_3_1.class); - } - - @Override - public boolean doMigrate() throws Exception { - InitializeDao initializeDao = InitializeDao.get(); - String[] sqlpaths = { - "/redcomet/knowledge/deploy/v0_3_1/migrate.sql" - }; - initializeDao.initializeDatabase(sqlpaths); - return true; - } - -} diff --git a/src/main/java/redcomet/knowledge/logic/MailLogic.java b/src/main/java/redcomet/knowledge/logic/MailLogic.java deleted file mode 100644 index e1ff932c2..000000000 --- a/src/main/java/redcomet/knowledge/logic/MailLogic.java +++ /dev/null @@ -1,24 +0,0 @@ -package redcomet.knowledge.logic; - -import redcomet.common.log.Log; -import redcomet.common.log.LogFactory; -import redcomet.di.Container; -import redcomet.web.entity.ProvisionalRegistrationsEntity; - -public class MailLogic { - /** ログ */ - private static Log LOG = LogFactory.getLog(MailLogic.class); - - public static MailLogic get() { - return Container.getComp(MailLogic.class); - } - - public void sendInvitation(ProvisionalRegistrationsEntity entity) { - // TODO Auto-generated method stub - - } - - - - -} diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index 832615604..869d0699f 100644 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -26,49 +26,30 @@ - + - + - + - + - + - - - - - - @@ -78,23 +59,3 @@ - - - diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/AccountImagesDao/AccountImagesDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/CommentsDao/CommentsDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_file_no.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_file_no.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_file_no.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_file_no.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_physical_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_file_no.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_file_no.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_file_no.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_file_no.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeFilesDao/KnowledgeFilesDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_group_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_physical_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_group_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeGroupsDao/KnowledgeGroupsDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_physical_select_on_tag_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_select_on_tag_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeTagsDao/KnowledgeTagsDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_physical_select_on_user_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_select_on_user_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgeUsersDao/KnowledgeUsersDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_selectOnKeyWithUserName.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/KnowledgesDao/KnowledgesDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/LikesDao/LikesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_physical_select_on_user_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_knowledge_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_select_on_user_id.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/StocksDao/StocksDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/StocksDao/StocksDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectOnKnowledgeId.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCount.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_selectTagsWithCountOnUser.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/TagsDao/TagsDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/TagsDao/TagsDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/ViewHistoriesDao/ViewHistoriesDao_update.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_delete.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_delete.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_delete.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_delete.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_insert.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_insert.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_insert.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_insert.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_physical_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_all.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_select_on_key.sql diff --git a/src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_update.sql b/src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_update.sql similarity index 100% rename from src/main/java/redcomet/knowledge/dao/sql/VotesDao/VotesDao_update.sql rename to src/main/resources/org/support/project/knowledge/dao/sql/VotesDao/VotesDao_update.sql diff --git a/src/main/resources/redcomet/knowledge/database/ddl.sql b/src/main/resources/org/support/project/knowledge/database/ddl.sql similarity index 100% rename from src/main/resources/redcomet/knowledge/database/ddl.sql rename to src/main/resources/org/support/project/knowledge/database/ddl.sql diff --git a/src/main/java/redcomet/knowledge/deploy/v0_3_0/migrate.sql b/src/main/resources/org/support/project/knowledge/deploy/v0_3_0/migrate.sql similarity index 100% rename from src/main/java/redcomet/knowledge/deploy/v0_3_0/migrate.sql rename to src/main/resources/org/support/project/knowledge/deploy/v0_3_0/migrate.sql diff --git a/src/main/java/redcomet/knowledge/deploy/v0_3_0/migrate2.sql b/src/main/resources/org/support/project/knowledge/deploy/v0_3_0/migrate2.sql similarity index 100% rename from src/main/java/redcomet/knowledge/deploy/v0_3_0/migrate2.sql rename to src/main/resources/org/support/project/knowledge/deploy/v0_3_0/migrate2.sql diff --git a/src/main/java/redcomet/knowledge/deploy/v0_3_1/migrate.sql b/src/main/resources/org/support/project/knowledge/deploy/v0_3_1/migrate.sql similarity index 100% rename from src/main/java/redcomet/knowledge/deploy/v0_3_1/migrate.sql rename to src/main/resources/org/support/project/knowledge/deploy/v0_3_1/migrate.sql diff --git a/src/main/resources/org/support/project/knowledge/mail/accept_user.xml b/src/main/resources/org/support/project/knowledge/mail/accept_user.xml new file mode 100644 index 000000000..6b5e48905 --- /dev/null +++ b/src/main/resources/org/support/project/knowledge/mail/accept_user.xml @@ -0,0 +1,24 @@ + + + 情報共有のサービス[Knowledge]へのご招待 + +{UserName} 様 + +Knowledgeに登録いただき、ありがとうございます。 +管理者による登録確認が完了し、サインイン出来るように +なりましたのでご連絡いたします。 + +{URL} + +サインインすると、新たにナレッジを追加や、ナレッジへの +コメントの追加が出来るようになります。 + +------------------------------------------ +※本メールはシステムより自動で送信されています。 + このメールに対する返信は出来ませんので御了承ください。 + + + + + + diff --git a/src/main/resources/org/support/project/knowledge/mail/invitation.xml b/src/main/resources/org/support/project/knowledge/mail/invitation.xml new file mode 100644 index 000000000..bab3423f2 --- /dev/null +++ b/src/main/resources/org/support/project/knowledge/mail/invitation.xml @@ -0,0 +1,22 @@ + + + 情報共有のサービス[Knowledge]へのご招待 + +{UserName} 様 + +Knowledgeに登録いただき、ありがとうございます。 +以下のURLにアクセスすることで登録が完了します。 +お手数ですが、以下のリンクからアクセス願います。 + +{URL} + +------------------------------------------ +※本メールはシステムより自動で送信されています。 + このメールに対する返信は出来ませんので御了承ください。 +※60分以内に登録いただけない場合、登録は無効となります。 + + + + + + diff --git a/src/main/resources/org/support/project/knowledge/mail/notify_accept_user.xml b/src/main/resources/org/support/project/knowledge/mail/notify_accept_user.xml new file mode 100644 index 000000000..c3115ef21 --- /dev/null +++ b/src/main/resources/org/support/project/knowledge/mail/notify_accept_user.xml @@ -0,0 +1,16 @@ + + + [Knowledge] 承認待ちのユーザ追加(通知) + +ユーザの登録リクエストがありました。 +管理者のページにて、確認をお願いします。 + +------------------------------------------ +※本メールはシステムより自動で送信されています。 + このメールに対する返信は出来ませんので御了承ください。 + + + + + + diff --git a/src/main/resources/org/support/project/knowledge/mail/notify_add_user.xml b/src/main/resources/org/support/project/knowledge/mail/notify_add_user.xml new file mode 100644 index 000000000..d0b941f82 --- /dev/null +++ b/src/main/resources/org/support/project/knowledge/mail/notify_add_user.xml @@ -0,0 +1,17 @@ + + + [Knowledge] ユーザ追加(通知) + +ユーザを追加しました。念のため確認してください。 + +ユーザ番号: {UserId} + +------------------------------------------ +※本メールはシステムより自動で送信されています。 + このメールに対する返信は出来ませんので御了承ください。 + + + + + + diff --git a/src/main/webapp/WEB-INF/views/admin/config/config.jsp b/src/main/webapp/WEB-INF/views/admin/config/config.jsp index 3008d5c2d..98d54ff75 100644 --- a/src/main/webapp/WEB-INF/views/admin/config/config.jsp +++ b/src/main/webapp/WEB-INF/views/admin/config/config.jsp @@ -1,7 +1,7 @@ -<%@page import="redcomet.knowledge.config.SystemConfig"%> -<%@page import="redcomet.common.config.INT_FLAG"%> -<%@page import="redcomet.knowledge.vo.Roles"%> -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.knowledge.config.SystemConfig"%> +<%@page import="org.support.project.common.config.INT_FLAG"%> +<%@page import="org.support.project.knowledge.vo.Roles"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> @@ -37,7 +37,6 @@  管理者が登録する
- <%--
- --%> - <%--

- --%> diff --git a/src/main/webapp/WEB-INF/views/admin/mail/config.jsp b/src/main/webapp/WEB-INF/views/admin/mail/config.jsp index 1e28e236e..66af0c6f8 100644 --- a/src/main/webapp/WEB-INF/views/admin/mail/config.jsp +++ b/src/main/webapp/WEB-INF/views/admin/mail/config.jsp @@ -1,6 +1,6 @@ -<%@page import="redcomet.common.config.INT_FLAG"%> -<%@page import="redcomet.knowledge.vo.Roles"%> -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.common.config.INT_FLAG"%> +<%@page import="org.support.project.knowledge.vo.Roles"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> diff --git a/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp b/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp new file mode 100644 index 000000000..98fc6ad7a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp @@ -0,0 +1,45 @@ +<%@page import="org.support.project.web.util.JspUtil"%> +<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + +<% JspUtil jspUtil = new JspUtil(request, pageContext); %> + + + + + + + + + + + +
+ +承認待ちのユーザはいません + + + +
+ +  承認 + +

${entry.userName} (${entry.userKey})

+

+ 登録日時 +  <%= jspUtil.date("user.insertDatetime")%> / +

+
+ +
+
+ + + + +
+ +
+ diff --git a/src/main/webapp/WEB-INF/views/admin/users/list.jsp b/src/main/webapp/WEB-INF/views/admin/users/list.jsp index db1fae32e..cbb518cf9 100644 --- a/src/main/webapp/WEB-INF/views/admin/users/list.jsp +++ b/src/main/webapp/WEB-INF/views/admin/users/list.jsp @@ -1,4 +1,4 @@ -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> @@ -32,7 +32,7 @@
-empty +条件に該当するデータは存在しません。条件(ページ番号)を切り替えてください。 diff --git a/src/main/webapp/WEB-INF/views/admin/users/view_add.jsp b/src/main/webapp/WEB-INF/views/admin/users/view_add.jsp index 84c2a2b20..40821cbf5 100644 --- a/src/main/webapp/WEB-INF/views/admin/users/view_add.jsp +++ b/src/main/webapp/WEB-INF/views/admin/users/view_add.jsp @@ -1,5 +1,5 @@ -<%@page import="redcomet.knowledge.vo.Roles"%> -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.knowledge.vo.Roles"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> diff --git a/src/main/webapp/WEB-INF/views/admin/users/view_edit.jsp b/src/main/webapp/WEB-INF/views/admin/users/view_edit.jsp index 656e7ad04..7130c9037 100644 --- a/src/main/webapp/WEB-INF/views/admin/users/view_edit.jsp +++ b/src/main/webapp/WEB-INF/views/admin/users/view_edit.jsp @@ -1,5 +1,5 @@ -<%@page import="redcomet.knowledge.vo.Roles"%> -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.knowledge.vo.Roles"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> diff --git a/src/main/webapp/WEB-INF/views/auth/form.jsp b/src/main/webapp/WEB-INF/views/auth/form.jsp index c69719d96..4aa2c6c78 100644 --- a/src/main/webapp/WEB-INF/views/auth/form.jsp +++ b/src/main/webapp/WEB-INF/views/auth/form.jsp @@ -1,5 +1,5 @@ -<%@page import="redcomet.knowledge.logic.SystemConfigLogic"%> -<%@page import="redcomet.common.util.StringUtils"%> +<%@page import="org.support.project.knowledge.logic.SystemConfigLogic"%> +<%@page import="org.support.project.common.util.StringUtils"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> diff --git a/src/main/webapp/WEB-INF/views/commons/layout/commonNavbar.jsp b/src/main/webapp/WEB-INF/views/commons/layout/commonNavbar.jsp index deed86131..c78ee2fd9 100644 --- a/src/main/webapp/WEB-INF/views/commons/layout/commonNavbar.jsp +++ b/src/main/webapp/WEB-INF/views/commons/layout/commonNavbar.jsp @@ -1,4 +1,4 @@ -<%@page import="redcomet.web.util.JspUtil"%> +<%@page import="org.support.project.web.util.JspUtil"%> <%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> @@ -21,22 +21,6 @@