commit
251eb5e778
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/Judger/src/main/Process.java" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/client/src/client/test/Test1.java" charset="GBK" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="1546620889958090490">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/client/file/20190105/1546620889958090490.zip!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<component name="libraryTable">
|
||||
<library name="AcmLib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/dom4j-1.6.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/jta.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/cglib-2.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/jdom-2.0.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/mysql-connector-java-5.1.6-bin.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/jdom.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/asm.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/antlr-2.7.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/hibernate3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/commons-collections-2.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/AcmLib/commons-logging-1.0.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Common">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Common/dist/Common.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="JuderUI">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/JuderUI.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Judger">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/Judger.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/msv-core-2011.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/slf4j-jdk14-1.7.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xml-resolver-1.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/Judger.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/neethi-3.0.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xsdlib-2010.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-web-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/commons-collections-3.2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/ehcache-core-2.5.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-xjc-boolean-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/stax2-api-3.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xmlsec-1.5.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/javax.ws.rs-api-2.0-m10.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/rsyntaxtextarea.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-services-ws-discovery-api-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-util-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-asm-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/mina-core-2.0.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/geronimo-javamail_1.4_spec-1.7.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-core-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-jms-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/geronimo-jms_1.1_spec-1.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/commons-logging-1.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/joda-time-1.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-expression-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/commons-lang-2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/js-1.7R2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/httpcore-nio-4.2.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-services-wsn-api-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xmltooling-1.3.2-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/FastInfoset-1.2.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xmlbeans-2.6.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/activemq-openwire-legacy-5.8.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/poi-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/DJNativeSwing-SWT.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jna-platform-4.4.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-continuation-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/opensaml-2.5.1-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-beans-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-server-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-tx-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jettison-1.3.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/velocity-1.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/geronimo-jaxws_2.2_spec-1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/httpclient-4.2.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/poi-scratchpad-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-xjc-bug671-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/commons-codec-1.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/wss4j-1.6.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/registry.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/swt.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/relaxngDatatype-20020414.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/httpcore-4.2.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-aop-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/oauth-provider-20100527.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/poi-contrib-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-services-ws-discovery-service-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-security-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/Common.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-http-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-xjc-ts-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jna.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/junit-4.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/activemq-client-5.8.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/antlr-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/DJNativeSwing.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jaxb-impl-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-services-wsn-core-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/isorelax-20030108.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/oauth-20100527.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/wsdl4j-1.6.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/hawtbuf-1.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/httpasyncclient-4.0-beta3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jaxb-xjc-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/java-diff-1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/spring-context-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/geronimo-servlet_3.0_spec-1.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-manifest.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/asm-3.3.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jetty-io-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/aopalliance-1.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/woodstox-core-asl-4.2.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/openws-1.4.2-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-xjc-runtime-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/slf4j-api-1.7.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-xjc-dv-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/jaxb-api-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/cxf-services-sts-core-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/xmlschema-core-2.0.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/client/lib/activemq-broker-5.8.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="client">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/client/client.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="clientUpdater">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/dist/clientUpdater.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="clientUpdater1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/clientUpdater.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<component name="libraryTable">
|
||||
<library name="lib1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/commons-logging-1.0.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/cglib-nodep-2.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/asm-all-2.2.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/hibernate3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/dom4j-1.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/jdom2-2.0.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/registry.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/commons-collections-2.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/mysql-connector-java-5.1.6-bin.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/Judger.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/antlr_2.7.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/jdom.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/jta.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/oscache-2.4.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/JuderUI/dist/lib/Common.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<component name="libraryTable">
|
||||
<library name="lib2">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/hibernate3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/cglib-nodep-2.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/commons-collections-2.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/jta.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/commons-logging-1.0.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/jdom2-2.0.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/registry.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/Common.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/jdom.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/mysql-connector-java-5.1.6-bin.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/asm-all-2.2.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/antlr_2.7.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/jna-platform-4.4.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/jna.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/Judger/dist/lib/dom4j-1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
<component name="libraryTable">
|
||||
<library name="lib3">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-jaxws_2.2_spec-1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-xjc-dv-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/swt.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-continuation-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/DJNativeSwing-SWT.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jdom.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-web-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/httpcore-nio-4.2.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-codec-1.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-2.5.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-manifest.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/joda-time-1.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/poi-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xmlschema-core-2.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/dom4j-1.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/asm-all-4.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-xjc-bug671-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-http-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xmlbeans-2.6.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/httpclient-4.2.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xml-resolver-1.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-xjc-boolean-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/isorelax-20030108.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-collections-2.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/wstx-asl-3.2.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/oauth-provider-20100527.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xmltooling-1.3.2-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/ehcache-core-2.5.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-services-wsn-api-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/neethi-3.0.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/opensaml-2.5.1-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/msv-core-2011.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/wsdl4j-1.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/asm-all-2.2.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-collections-3.2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xmlsec-1.5.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cglib-2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jaxb-xjc-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/Common.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/asm-2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-lang-2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cglib-2.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/antlr_2.7.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-security-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-services-wsn-core-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-services-ws-discovery-api-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/relaxngDatatype-20020414.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/velocity-1.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/asm.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/hibernate3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-xjc-runtime-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/Distributor.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-jms_1.1_spec-1.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-javamail_1.4_spec-1.7.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jaxb-api-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/openws-1.4.2-1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jaxb-impl-2.2.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cglib-nodep-2.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/DJNativeSwing.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jaxb-impl-2.2.6.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/httpcore-4.2.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/activemq-openwire-legacy-5.8.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jettison-1.3.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/mysql-connector-java-5.1.6-bin.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-annotation-1.0_spec-1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xmlschema-core-2.0.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/client.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/aopalliance-1.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/antlr-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-stax-api_1.0_spec-1.0.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-services-ws-discovery-service-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/activemq-client-5.8.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/httpasyncclient-4.0-beta3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-asm-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jta.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/oauth-20100527.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/javax.ws.rs-api-2.0-m10.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/Judger.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-io-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-context-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/wss4j-1.6.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/FastInfoset-1.2.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/poi-scratchpad-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-services-sts-core-2.7.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/java-diff-1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-logging-1.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/rsyntaxtextarea.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/commons-logging-1.0.4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/registry.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-2.5.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/stax2-api-3.1.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jaxb-api-2.2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/cxf-xjc-ts-2.6.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/wsdl4j-1.6.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/slf4j-jdk14-1.7.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-tx-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/asm-3.3.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jdom2-2.0.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-expression-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/xsdlib-2010.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/hawtbuf-1.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-util-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/js-1.7R2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/JuderUI.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-aop-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/mina-core-2.0.7.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-ws-metadata_2.0_spec-1.1.3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/poi-contrib-3.2-FINAL.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/slf4j-api-1.7.5.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/geronimo-servlet_3.0_spec-1.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/woodstox-core-asl-4.2.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/jetty-server-8.1.12.v20130726.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-jms-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/activemq-broker-5.8.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-core-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/spring-beans-3.0.7.RELEASE.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/junit-4.12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/clientUpdater/lib/java-diff.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="registry">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Lib/registry-3.1.3/bin/registry.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="swt">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Lib/swt_64/swt.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="swt1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Lib/swt_32/swt.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="openjdk-21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Common/Common.iml" filepath="$PROJECT_DIR$/Common/Common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/JuderUI/JuderUI.iml" filepath="$PROJECT_DIR$/JuderUI/JuderUI.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Judger/Judger.iml" filepath="$PROJECT_DIR$/Judger/Judger.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Lib/Lib.iml" filepath="$PROJECT_DIR$/Lib/Lib.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/OJ.iml" filepath="$PROJECT_DIR$/.idea/OJ.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/client/client.iml" filepath="$PROJECT_DIR$/client/client.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/clientUpdater/clientUpdater.iml" filepath="$PROJECT_DIR$/clientUpdater/clientUpdater.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/client/build/generated/generated.iml" filepath="$PROJECT_DIR$/client/build/generated/generated.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/client/build/generated-sources/generated-sources.iml" filepath="$PROJECT_DIR$/client/build/generated-sources/generated-sources.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/JuderUI/build/generated-sources/generated-sources1.iml" filepath="$PROJECT_DIR$/JuderUI/build/generated-sources/generated-sources1.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/JuderUI/build/generated/generated1.iml" filepath="$PROJECT_DIR$/JuderUI/build/generated/generated1.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="svn" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="97c18e59-d3a8-4d3e-a426-2892e50cfef5" name="更改" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 6
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2aiWf7bW87V3mbwTY6CfqHLJiX4" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "D:/OJ",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"settings.editor.selected.configurable": "vcs.Subversion",
|
||||
"spring.configuration.checksum": "d41d8cd98f00b204e9800998ecf8427e",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Test1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="client.test.Test1" />
|
||||
<module name="client" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="client.test.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="应用程序.Test1" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="SvnConfiguration" cleanupOnStartRun="true">
|
||||
<configuration>C:\Users\32592\AppData\Roaming\Subversion</configuration>
|
||||
<supportedVersion>125</supportedVersion>
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="97c18e59-d3a8-4d3e-a426-2892e50cfef5" name="更改" comment="" />
|
||||
<created>1704801979303</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1704801979303</updated>
|
||||
<workItem from="1704801980316" duration="598000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="lib1" level="project" />
|
||||
<orderEntry type="library" name="AcmLib" level="project" />
|
||||
<orderEntry type="library" name="lib3" level="project" />
|
||||
<orderEntry type="library" name="lib2" level="project" />
|
||||
<orderEntry type="library" name="Lib" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="Common" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project Common.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar: JAR building
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="Common-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
log4j.properties
|
||||
### \u8bbe\u7f6e ###
|
||||
log4j.rootLogger=debug,stdout,DDD,EEE
|
||||
### \u8f93\u51fa\u4fe1\u606f\u5230\u63a7\u5236\u53f0 ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
|
||||
### \u8f93\u51faDEBUG \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=/Users/tinybye/Documents/log4j/debug.log ###
|
||||
log4j.appender.DDD=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.DDD.File=./logs/log.log4j
|
||||
log4j.appender.DDD.Append=true
|
||||
log4j.appender.DDD.Threshold=DEBUG
|
||||
log4j.appender.DDD.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.DDD.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
|
||||
### \u8f93\u51faERROR \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=/Users/tinybye/Documents/log4j/error.log ###
|
||||
log4j.appender.EEE=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.EEE.File=./logs/log.log4j
|
||||
log4j.appender.EEE.Append=true
|
||||
log4j.appender.EEE.Threshold=ERROR
|
||||
log4j.appender.EEE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.EEE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamDetailBean" table="studentexamdetail">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="userId" type="int" update="false">
|
||||
<column name="userId"/>
|
||||
</property>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="submit" type="int">
|
||||
<column name="submit"/>
|
||||
</property>
|
||||
<property name="status" type="string">
|
||||
<column name="status"/>
|
||||
</property>
|
||||
<property name="hintCases" type="string" update="false">
|
||||
<column name="hintCases"/>
|
||||
</property>
|
||||
<property name="score" type="float" update="true">
|
||||
<column name="score"/>
|
||||
</property>
|
||||
<property name="elapsedTime" type="int">
|
||||
<column name="elapsedTime"/>
|
||||
</property>
|
||||
<property name="finished" type="boolean" update="false">
|
||||
<column name="finished"/>
|
||||
</property>
|
||||
<property name="solutionId" type="int" update="false">
|
||||
<column name="solutionId"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamInfoBean" table="studentexaminfo">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="userId" type="int" update="false">
|
||||
<column name="userId"/>
|
||||
</property>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="score" type="float" update="true">
|
||||
<column name="score"/>
|
||||
</property>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamProblemsBean" table="examproblems">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="displaySequence" type="int" update="false">
|
||||
<column name="displaySequence"/>
|
||||
</property>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ProblemBean" table="problems">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="title" type="string" update="false">
|
||||
<column name="title"/>
|
||||
</property>
|
||||
<property name="description" type="string" update="false">
|
||||
<column name="description"/>
|
||||
</property>
|
||||
<property name="memory_limit" type="float" update="false">
|
||||
<column name="memory_limit"/>
|
||||
</property>
|
||||
<property name="time_limit" type="float" update="false">
|
||||
<column name="time_limit"/>
|
||||
</property>
|
||||
<property name="inputRequirement" type="string" update="false">
|
||||
<column name="inputRequirement"/>
|
||||
</property>
|
||||
<property name="outputRequirement" type="string" update="false">
|
||||
<column name="outputRequirement"/>
|
||||
</property>
|
||||
<property name="sample_input" type="string" update="false">
|
||||
<column name="sample_input"/>
|
||||
</property>
|
||||
<property name="sample_output" type="string" update="false">
|
||||
<column name="sample_ouput"/>
|
||||
</property>
|
||||
<property name="author" type="string" update="false">
|
||||
<column name="author"/>
|
||||
</property>
|
||||
<property name="difficulty" type="string" update="false">
|
||||
<column name="difficulty"/>
|
||||
</property>
|
||||
<property name="sourceCode" type="string" update="false">
|
||||
<column name="sourceCode"/>
|
||||
</property>
|
||||
<property name="srcCodeLanguage" type="string" update="false">
|
||||
<column name="srcCodeLanguage"/>
|
||||
</property>
|
||||
<property name="scoreGrade" type="string" update="false">
|
||||
<column name="scoreGrade"/>
|
||||
</property>
|
||||
<property name="chapterId" type="int" update="false">
|
||||
<column name="chapterId"/>
|
||||
</property>
|
||||
<property name="checkSimilarity" type="int" update="false">
|
||||
<column name="checkSimilarity"/>
|
||||
</property>
|
||||
<property name="similarityThreshold" type="float" update="false">
|
||||
<column name="similarityThreshold"/>
|
||||
</property>
|
||||
<property name="solved" type="int" update="false">
|
||||
<column name="solved"/>
|
||||
</property>
|
||||
<property name="submit" type="int" update="true">
|
||||
<column name="submit"/>
|
||||
</property>
|
||||
<property name="ratio" type="float" update="false">
|
||||
<column name="ratio"/>
|
||||
</property>
|
||||
<property name="teacherId" type="int" update="false">
|
||||
<column name="teacherId"/>
|
||||
</property>
|
||||
<property name="source" type="string" update="false">
|
||||
<column name="source"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ProblemTestCaseBean" table="problemtestcases">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="input" type="string" update="false">
|
||||
<column name="input"/>
|
||||
</property>
|
||||
<property name="output" type="string" update="false">
|
||||
<column name="output"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="SolutionBean" table="solution">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="userId" type="int" update="false">
|
||||
<column name="userId"/>
|
||||
</property>
|
||||
<property name="submitTime" type="java.util.Date" update="false">
|
||||
<column name="submitTime"/>
|
||||
</property>
|
||||
<property name="language" type="string" update="false">
|
||||
<column name="language"/>
|
||||
</property>
|
||||
<property name="sourceCode" type="string" update="false">
|
||||
<column name="sourceCode"/>
|
||||
</property>
|
||||
<property name="status" type="string">
|
||||
<column name="status"/>
|
||||
</property>
|
||||
<property name="correctCaseIds" type="string">
|
||||
<column name="correctCaseIds"/>
|
||||
</property>
|
||||
<property name="remark" type="string">
|
||||
<column name="remark"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="UserBean" table="users">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="studentNo" type="string" update="false">
|
||||
<column name="studentNo"/>
|
||||
</property>
|
||||
<property name="chineseName" type="string" update="false">
|
||||
<column name="chineseName"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="WrongCaseBean" table="wrongcases">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="solutionId" type="int" update="false">
|
||||
<column name="solutionId"/>
|
||||
</property>
|
||||
<property name="caseId" type="int" update="false">
|
||||
<column name="caseId"/>
|
||||
</property>
|
||||
<property name="output" type="string">
|
||||
<column name="output"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#update config.properties
|
||||
#Mon Dec 14 18:06:02 CST 2015
|
||||
relativeJavaCompilerDir=\\Java\\jdk1.8.0_40\\bin
|
||||
distributorIP=127.0.0.1
|
||||
distributorPort=5000
|
||||
relativeCCompilerDir=\\MinGW\\bin
|
||||
exeDir=D\:\\workspace\\MyAcmJudger\\test
|
||||
relativeExeDir=\\test
|
||||
cCompilerDir=C\:\\MinGW\\bin
|
||||
title=\u00E8\u00A3\u0081\u00E5\u0088\u00A4\u00E6\u009C\u00BA
|
||||
srcDir=D\:\\workspace\\MyAcmJudger\\test
|
||||
isRelative=true
|
||||
Debug=1
|
||||
relativeSrcDir=\\test
|
||||
relativeCppCompilerDir=\\MinGW\\bin
|
||||
cppCompilerDir=C\:\\MinGW\\bin
|
||||
javaCompilerDir=C\:\\Program Files\\Java\\jdk1.8.0_40\\bin
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#hibernate.dialect org.hibernate.dialect.MySQLDialect
|
||||
#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
|
||||
#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
|
||||
hibernate.connection.driver_class com.mysql.jdbc.Driver
|
||||
hibernate.connection.url jdbc:mysql://localhost/gdoj?useUnicode=true&amp;characterEncoding=UTF-8
|
||||
hibernate.connection.username root
|
||||
hibernate.connection.password 123456
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,8 @@
|
|||
build.xml.data.CRC32=e5eafc6d
|
||||
build.xml.script.CRC32=35a5ea50
|
||||
build.xml.stylesheet.CRC32=8064a381@1.79.1.48
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=e5eafc6d
|
||||
nbproject/build-impl.xml.script.CRC32=f31ce408
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
compile.on.save=true
|
||||
do.depend=false
|
||||
do.jar=true
|
||||
file.reference.registry.jar=Z:\\project\\OJ\\Lib\\registry-3.1.3\\bin\\registry.jar
|
||||
javac.debug=true
|
||||
javadoc.preview=true
|
||||
user.properties.file=C:\\Users\\Turbo\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group/>
|
||||
<group name="最新版本代码"/>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
annotation.processing.run.all.processors=true
|
||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||
application.title=Common
|
||||
application.vendor=Administrator
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
build.generated.sources.dir=${build.dir}/generated-sources
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
# Uncomment to specify the preferred debugger connection transport:
|
||||
#debug.transport=dt_socket
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# build.classes.dir \u4e2d\u5e94\u4ece\u5206\u53d1 jar \u4e2d\u6392\u9664\u7684\u6587\u4ef6
|
||||
dist.archive.excludes=
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/Common.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
file.reference.antlr-2.7.6.jar=../AcmLib/antlr-2.7.6.jar
|
||||
file.reference.asm.jar=../AcmLib/asm.jar
|
||||
file.reference.cglib-2.1.3.jar=../AcmLib/cglib-2.1.3.jar
|
||||
file.reference.commons-collections-2.1.1.jar=../AcmLib/commons-collections-2.1.1.jar
|
||||
file.reference.dom4j-1.6.1.jar=../AcmLib/dom4j-1.6.1.jar
|
||||
file.reference.hibernate3.jar=../AcmLib/hibernate3.jar
|
||||
file.reference.jdom-2.0.5.jar=../AcmLib/jdom-2.0.5.jar
|
||||
file.reference.jdom.jar=../AcmLib/jdom.jar
|
||||
file.reference.jta.jar=../AcmLib/jta.jar
|
||||
file.reference.mysql-connector-java-5.1.6-bin.jar=../AcmLib/mysql-connector-java-5.1.6-bin.jar
|
||||
file.reference.registry.jar=F:\\registry-3.1.3\\bin\\registry.jar
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${file.reference.antlr-2.7.6.jar}:\
|
||||
${file.reference.asm.jar}:\
|
||||
${file.reference.cglib-2.1.3.jar}:\
|
||||
${file.reference.commons-collections-2.1.1.jar}:\
|
||||
${file.reference.dom4j-1.6.1.jar}:\
|
||||
${file.reference.hibernate3.jar}:\
|
||||
${file.reference.jdom-2.0.5.jar}:\
|
||||
${file.reference.jdom.jar}:\
|
||||
${file.reference.jta.jar}:\
|
||||
${file.reference.mysql-connector-java-5.1.6-bin.jar}:\
|
||||
${file.reference.registry.jar}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.external.vm=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.8
|
||||
javac.target=1.8
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javac.test.processorpath=\
|
||||
${javac.test.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
main.class=common.DBConfig
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
mkdist.disabled=true
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project.
|
||||
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
||||
# To set system properties for unit tests define test-sys-prop.name=value:
|
||||
run.jvmargs=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>Common</name>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package common;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import log.Log;
|
||||
|
||||
public class Config {
|
||||
|
||||
public static int DEBUG;
|
||||
// private static boolean isCppRelative;
|
||||
// private static boolean isJavaRelative;
|
||||
public static int MinGWRelative;
|
||||
public static int JavaRelative;
|
||||
private static final Properties prop = new Properties();
|
||||
|
||||
static {
|
||||
try {
|
||||
InputStream in = new FileInputStream(FileFinder.findFile("config.properties"));
|
||||
prop.load(in);
|
||||
DEBUG = Integer.valueOf(prop.getProperty("Debug"));
|
||||
// isCppRelative = prop.getProperty("isCppRelative").equals("true") ? true : false;
|
||||
// isJavaRelative = prop.getProperty("isJavaRelative").equals("true")?true: false;
|
||||
String tmp = prop.getProperty(Const.MinGWRelative);
|
||||
if (tmp != null && !"".equals(tmp)) {
|
||||
MinGWRelative = Integer.valueOf(tmp);
|
||||
} else {
|
||||
MinGWRelative = -1;
|
||||
}
|
||||
tmp = prop.getProperty(Const.JavaRelative);
|
||||
if (tmp != null && !"".equals(tmp)) {
|
||||
JavaRelative = Integer.valueOf(tmp);
|
||||
} else {
|
||||
JavaRelative = -1;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.writeExceptionLog(e.getClass()+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void freshConfig() {
|
||||
try {
|
||||
InputStream in = new FileInputStream(FileFinder.findFile("config.properties"));
|
||||
prop.load(in);
|
||||
DEBUG = Integer.valueOf(prop.getProperty("Debug"));
|
||||
// isCppRelative = prop.getProperty("isCppRelative").equals("true") ? true : false;
|
||||
// isJavaRelative = prop.getProperty("isJavaRelative").equals("true")?true: false;
|
||||
String tmp = prop.getProperty(Const.MinGWRelative);
|
||||
|
||||
if (tmp != null && !"".equals(tmp)) {
|
||||
MinGWRelative = Integer.valueOf(tmp);
|
||||
} else {
|
||||
MinGWRelative = -1;
|
||||
}
|
||||
tmp = prop.getProperty(Const.JavaRelative);
|
||||
if (tmp != null && !"".equals(tmp)) {
|
||||
JavaRelative = Integer.valueOf(tmp);
|
||||
} else {
|
||||
JavaRelative = -1;
|
||||
}
|
||||
//initRegistryMessage();
|
||||
} catch (Exception e) {
|
||||
Log.writeExceptionLog(e.getClass()+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static Properties getProp() {
|
||||
return prop;
|
||||
}
|
||||
|
||||
public static String getValue(String key) {
|
||||
return prop.getProperty(key);
|
||||
}
|
||||
|
||||
public static void save() {
|
||||
try {
|
||||
// 文件输出流
|
||||
FileOutputStream fos = new FileOutputStream(FileFinder.findFile("config.properties"));
|
||||
// 将Properties集合保存到流中
|
||||
prop.store(fos, "update config.properties");
|
||||
fos.close();// 关闭流
|
||||
freshConfig();
|
||||
} catch (Exception e) {
|
||||
Log.writeExceptionLog(e.getClass()+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//临时代码输出路径 若要改回配置文件读取 从const里获取字段
|
||||
public static String getSourcePath() {
|
||||
return "./test"; //
|
||||
}
|
||||
//临时代码输出路径
|
||||
|
||||
public static String getTargetPath() {
|
||||
// if (isTestRelative) {
|
||||
// return System.getProperty("user.dir") + prop.getProperty("relativeExeDir");
|
||||
// } else {
|
||||
return "./test";
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public static String getCompilerDir(String language) {
|
||||
String dir = null;
|
||||
if (language.equals("c") || language.equals("cpp") || language.equals("c++")) {
|
||||
dir = prop.getProperty(Const.MinGWDir);
|
||||
} else if (language.equals("java")) {
|
||||
dir = prop.getProperty(Const.JavaCompilerDir);
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
public static String CompilerDir(String language) {
|
||||
String dir = null;
|
||||
|
||||
if (language.equals("c") || language.equals("cpp") || language.equals("c++")) //返回各种语言的编译器地址
|
||||
{
|
||||
dir = System.getProperty("user.dir") + Const.RelativeMinGWCompileDir;
|
||||
} else if (language.equals("java")) {
|
||||
dir = System.getProperty("user.dir") + Const.RelativeJavaCompileDir;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package common;
|
||||
|
||||
public class Const {
|
||||
|
||||
public static final short WAIT = 0;
|
||||
public static final short QUEUE = 1;
|
||||
public static final short AC = 2;
|
||||
public static final short PE = 3;//
|
||||
public static final short WA = 4;
|
||||
public static final short TLE = 5;
|
||||
public static final short MLE = 6;
|
||||
|
||||
public static final short RE = 7;
|
||||
public static final short CE = 8;
|
||||
public static final short OLE = 9;
|
||||
public static final short SKIP = 10;
|
||||
public static final short NF = 11;
|
||||
public static final short SE = 12;
|
||||
|
||||
public static final String[] STATUS = {"WAIT", "QUEUE", "AC","PE", "WA",
|
||||
"TLE", "MLE", "RE",
|
||||
"CE", "OLE", "SKIP","NF","SE"};
|
||||
|
||||
|
||||
//public static String lattersuffix[] = {".c", ".cpp", ".java", ".exe", ".exe", ".class"};
|
||||
|
||||
/**
|
||||
* Output File Size
|
||||
*/
|
||||
public static final long FILEMAXSIZE = 7000;
|
||||
|
||||
public static String getLatterSuffix(String language) {
|
||||
language=language.toLowerCase();
|
||||
if (language.equals("c")) {
|
||||
return ".c";
|
||||
} else if (language.equals("cpp")||language.equals("c++")) {
|
||||
return ".cpp";
|
||||
} else if (language.equals("java")) {
|
||||
return ".java";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final String cCompilerDirIdentify = "cCompilerDir";
|
||||
public static final String cppCompilerDirIdentify = "cppCompilerDir";
|
||||
public static final String javaCompilerDirIdentify = "javaCompilerDir";
|
||||
public static final String JavaCompilerDir = "JavaCompileDir";
|
||||
public static final String RelativeJavaCompileDir = "\\Java\\bin";
|
||||
public static final String JavaRelative = "JavaRelative";
|
||||
public static final String MinGWDir = "MinGWDir";
|
||||
public static final String RelativeMinGWCompileDir = "\\MinGW\\bin";
|
||||
public static final String MinGWRelative = "MinGWRelative";
|
||||
public static final String srcDirIdentify = "srcDir";
|
||||
public static final String exeDirInentify = "exeDir";
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package common;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.sql.DriverManager;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class DBConfig {
|
||||
|
||||
private static Properties dbConfig = new Properties();
|
||||
private final static String FileName="DBConfig.properties";
|
||||
static {
|
||||
try {
|
||||
InputStream in = new FileInputStream(FileFinder.findFile(FileName));
|
||||
dbConfig.load(in);
|
||||
Iterator it = dbConfig.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry) it.next();
|
||||
Object key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
System.out.println(key + ":" + value);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getIp() {
|
||||
String url = null;
|
||||
String IP = null;
|
||||
url = dbConfig.getProperty("hibernate.connection.url");
|
||||
int index1 = url.indexOf("//");
|
||||
index1 += "//".length();
|
||||
int index2 = url.indexOf("/gdoj");
|
||||
char[] chars = url.toCharArray();
|
||||
IP = String.valueOf(chars, index1, index2 - index1);
|
||||
return IP;
|
||||
}
|
||||
|
||||
public static void setIp(String ip) {
|
||||
String url = "jdbc:mysql://" + ip + "/gdoj?useUnicode=true&characterEncoding=UTF-8";
|
||||
dbConfig.setProperty("hibernate.connection.url", url);
|
||||
|
||||
}
|
||||
|
||||
public static String getUserName() {
|
||||
return dbConfig.getProperty("hibernate.connection.username");
|
||||
}
|
||||
|
||||
public static void setUserName(String UserName) {
|
||||
dbConfig.setProperty("hibernate.connection.username", UserName);
|
||||
}
|
||||
|
||||
public static String getPassword() {
|
||||
return dbConfig.getProperty("hibernate.connection.password");
|
||||
}
|
||||
|
||||
public static void setPassword(String Password) {
|
||||
dbConfig.setProperty("hibernate.connection.password", Password);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(DBConfig.getUserName());
|
||||
System.out.println(DBConfig.getPassword());
|
||||
System.out.println(DBConfig.getIp());
|
||||
}
|
||||
|
||||
public static void writeToFile(){
|
||||
try {
|
||||
// 文件输出流
|
||||
FileOutputStream fos = new FileOutputStream(FileFinder.findFile(FileName));
|
||||
// 将Properties集合保存到流中
|
||||
dbConfig.store(fos, "update dbConfig.properties");
|
||||
fos.close();// 关闭流
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static Properties getDBConfig(){
|
||||
return dbConfig;
|
||||
}
|
||||
|
||||
public static boolean connectTest() {
|
||||
boolean flag = false;
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
String url=dbConfig.getProperty("hibernate.connection.url");
|
||||
String username=getUserName();
|
||||
String password=getPassword();
|
||||
java.sql.Connection con=DriverManager.getConnection(url, username, password);
|
||||
flag=true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
flag=false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package common;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class FileFinder {
|
||||
|
||||
public static File findFile(String fileName){
|
||||
return new File("config/"+fileName);
|
||||
}
|
||||
|
||||
public static boolean isExistFile(String fileName){
|
||||
File file = new File(fileName);
|
||||
if(file.exists())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static List<String> getSubs(String dirName){
|
||||
List<String> strs = new LinkedList<>();
|
||||
File file = new File(dirName);
|
||||
if(file.exists()){
|
||||
File[] files = file.listFiles();
|
||||
for(int i = 0; i < files.length; i++){
|
||||
strs.add(files[i].getName());
|
||||
}
|
||||
}
|
||||
return strs;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package common;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public interface IDistributorServer extends Remote {
|
||||
public Integer getOneSolutionId()throws RemoteException;
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package common;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class TimeTool {
|
||||
|
||||
public static void sleep(int time) {
|
||||
try {
|
||||
Thread.sleep(time);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getDetailTime() {
|
||||
Calendar c = Calendar.getInstance();
|
||||
String hour = String.valueOf(c.get(Calendar.HOUR_OF_DAY));
|
||||
if (hour.length() < 2) {
|
||||
hour = "0" + hour;
|
||||
}
|
||||
String minute = String.valueOf(c.get(Calendar.MINUTE));
|
||||
if (minute.length() < 2) {
|
||||
minute = "0" + minute;
|
||||
}
|
||||
String second = String.valueOf(c.get(Calendar.SECOND));
|
||||
if (second.length() < 2) {
|
||||
second = "0" + second;
|
||||
}
|
||||
String logtime = hour + ":" + minute + ":" + second;
|
||||
return logtime;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
package log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class Log {
|
||||
|
||||
private static String Logdir = System.getProperty("user.dir") + File.separator + "log";
|
||||
private static String time = null; // ʱ<EFBFBD>䣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
||||
private static File exceptionLog = null; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
private static File infoLog = null; // <EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
private static RandomAccessFile excWriter = null; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD>
|
||||
private static RandomAccessFile infoWriter = null; //
|
||||
|
||||
|
||||
public static void init() {
|
||||
File dir = new File(Logdir + "\\exception");
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
dir = new File(Logdir + "\\info");
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void checkIsNewDay() {
|
||||
if (time == null || getNowTime().equals(time) == false) {
|
||||
createNewLog();
|
||||
}
|
||||
}
|
||||
|
||||
private static void createNewLog() {
|
||||
if (excWriter != null && infoWriter != null) {
|
||||
try {
|
||||
excWriter.close();
|
||||
infoWriter.close();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
time = getNowTime();
|
||||
String fileName = time + ".log";
|
||||
|
||||
//
|
||||
exceptionLog = new File(Logdir + "\\exception\\" + fileName);
|
||||
infoLog = new File(Logdir + "\\info\\" + fileName);
|
||||
//
|
||||
try {
|
||||
excWriter = new RandomAccessFile(exceptionLog, "rw");
|
||||
infoWriter = new RandomAccessFile(infoLog, "rw");
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void writeExceptionLog(String msg) {
|
||||
init();//确保路径完整
|
||||
checkIsNewDay();
|
||||
long size = exceptionLog.length();
|
||||
if (size >= 5 * 1024 * 1024 && excWriter != null) //
|
||||
{
|
||||
try {
|
||||
if (excWriter != null) {
|
||||
excWriter.close();
|
||||
excWriter = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (size < 5 * 1024 * 1024 && excWriter != null) {
|
||||
String logtime = getDetailTime();
|
||||
msg = logtime + " " + msg + "\r\n";
|
||||
try {
|
||||
excWriter.seek(size);
|
||||
excWriter.write(msg.getBytes());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeInfo(String msg) {
|
||||
init();//确保路径完整
|
||||
checkIsNewDay();
|
||||
long size = infoLog.length();
|
||||
if (size >= 5 * 1024 * 1024 && infoWriter != null) {
|
||||
try {
|
||||
if (infoWriter != null) {
|
||||
infoWriter.close();
|
||||
infoWriter = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (size < 5 * 1024 * 1024 && infoWriter != null) {
|
||||
|
||||
String logtime = getDetailTime();
|
||||
msg = logtime + " " + msg + "\r\n";
|
||||
try {
|
||||
infoWriter.seek(size);
|
||||
infoWriter.write(msg.getBytes());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
private static String getNowTime() {
|
||||
Calendar c = Calendar.getInstance();
|
||||
String year = String.valueOf(c.get(Calendar.YEAR));
|
||||
String month = String.valueOf(c.get(Calendar.MONTH) + 1);
|
||||
if (month.length() < 2) {
|
||||
month = "0" + month;
|
||||
}
|
||||
String day = String.valueOf(c.get(Calendar.DAY_OF_MONTH));
|
||||
if (day.length() < 2) {
|
||||
day = "0" + day;
|
||||
}
|
||||
String today = year + month + day;
|
||||
return today;
|
||||
|
||||
}
|
||||
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
private static String getDetailTime() {
|
||||
Calendar c = Calendar.getInstance();
|
||||
String hour = String.valueOf(c.get(Calendar.HOUR_OF_DAY));
|
||||
if (hour.length() < 2) {
|
||||
hour = "0" + hour;
|
||||
}
|
||||
String minute = String.valueOf(c.get(Calendar.MINUTE));
|
||||
if (minute.length() < 2) {
|
||||
minute = "0" + minute;
|
||||
}
|
||||
String second = String.valueOf(c.get(Calendar.SECOND));
|
||||
if (second.length() < 2) {
|
||||
second = "0" + second;
|
||||
}
|
||||
String logtime = hour + ":" + minute + ":" + second;
|
||||
return logtime;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
log4j.properties
|
||||
### \u8bbe\u7f6e ###
|
||||
log4j.rootLogger=debug,stdout,DDD,EEE
|
||||
### \u8f93\u51fa\u4fe1\u606f\u5230\u63a7\u5236\u53f0 ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
|
||||
### \u8f93\u51faDEBUG \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=/Users/tinybye/Documents/log4j/debug.log ###
|
||||
log4j.appender.DDD=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.DDD.File=./logs/log.log4j
|
||||
log4j.appender.DDD.Append=true
|
||||
log4j.appender.DDD.Threshold=DEBUG
|
||||
log4j.appender.DDD.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.DDD.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
|
||||
### \u8f93\u51faERROR \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=/Users/tinybye/Documents/log4j/error.log ###
|
||||
log4j.appender.EEE=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.EEE.File=./logs/log.log4j
|
||||
log4j.appender.EEE.Append=true
|
||||
log4j.appender.EEE.Threshold=ERROR
|
||||
log4j.appender.EEE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.EEE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class CommonDAO {
|
||||
|
||||
//增
|
||||
public static void add(Object bean) {
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.save(bean);
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
//删
|
||||
public static void delete(Class c, int id) {
|
||||
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.flush();
|
||||
Query query = session.createQuery("delete " + c.getName() + " as bean where bean.id = ?");
|
||||
query.setInteger(0, id);
|
||||
query.executeUpdate();
|
||||
tx.commit();
|
||||
session.close();
|
||||
}
|
||||
|
||||
//改,update
|
||||
public static int updateDetailByHql(String status,int userId,int problemId,int examId,int solutionId) {
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.flush();
|
||||
Query query = session.createQuery("update ExamDetailBean as d set d.status=? where d.userId=? and d.problemId=? and d.examId=? and d.solutionId=?");
|
||||
query.setString(0, status);
|
||||
query.setInteger(1, userId);
|
||||
query.setInteger(2, problemId);
|
||||
query.setInteger(3, examId);
|
||||
query.setInteger(4, solutionId);
|
||||
int count=query.executeUpdate();
|
||||
tx.commit();
|
||||
session.close();
|
||||
return count;
|
||||
}
|
||||
|
||||
public static void update(Object bean) {
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.update(bean);
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
public static void updateMore(Object[] beans) {
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
for (int i = 0; i < beans.length; i++) {
|
||||
session.update(beans[i]);
|
||||
}
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
//查,取
|
||||
public static List<Object> findBeans(Class c, int maxNum, String key1, Object value1) {
|
||||
try {
|
||||
String hql = "from " + c.getName() + " as bean where bean." + key1 + "? " + "order by id asc";
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.flush();
|
||||
Query query = session.createQuery(hql);
|
||||
|
||||
query.setParameter(0, value1);
|
||||
|
||||
query.setFirstResult(0);
|
||||
query.setMaxResults(maxNum);
|
||||
List<Object> rs = query.list();
|
||||
tx.commit();
|
||||
session.close();
|
||||
return rs;
|
||||
} catch (Exception ex) {
|
||||
return new ArrayList<Object>();
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Object> findBeans(Class c, int maxNum, String key1, Object value1, String key2, Object value2) {
|
||||
try {
|
||||
String hql = "from " + c.getName() + " as bean where bean." + key1 + "? bean." + key2 + "s?" + " order by id asc";
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.flush();
|
||||
Query query = session.createQuery(hql);
|
||||
|
||||
query.setParameter(0, value1);
|
||||
|
||||
query.setFirstResult(0);
|
||||
query.setMaxResults(maxNum);
|
||||
List<Object> rs = query.list();
|
||||
tx.commit();
|
||||
session.close();
|
||||
return rs;
|
||||
} catch (Exception e) {
|
||||
return new ArrayList<Object>();
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Object> findBeans(Class c, int maxNum, Map<String, Object> map) {
|
||||
try {
|
||||
int len = map.size();
|
||||
String[] keys = new String[len];
|
||||
|
||||
Set<String> keyss = map.keySet();
|
||||
int i = 0;
|
||||
for (String key : keyss) {
|
||||
keys[i] = key;
|
||||
i++;
|
||||
}
|
||||
|
||||
String hql = "from " + c.getName() + " as bean where ";
|
||||
for (i = 0; i < len; i++) {
|
||||
hql += "bean." + keys[i] + "? ";
|
||||
if (i != len - 1) {
|
||||
hql += " and ";
|
||||
}
|
||||
}
|
||||
hql += " order by id asc";
|
||||
|
||||
Session session = HibernateSessionFactory.getSession();
|
||||
Transaction tx = session.beginTransaction();
|
||||
session.flush();
|
||||
Query query = session.createQuery(hql);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
Object o = map.get(keys[i]);
|
||||
query.setParameter(i, o);
|
||||
}
|
||||
|
||||
query.setFirstResult(0);
|
||||
query.setMaxResults(maxNum);
|
||||
List<Object> rs = query.list();
|
||||
tx.commit();
|
||||
session.close();
|
||||
return rs;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ArrayList<Object>();
|
||||
}
|
||||
}
|
||||
|
||||
//for test
|
||||
// public static void main(String[] args) {
|
||||
//// //增
|
||||
//// ProblemBean pb=new ProblemBean();
|
||||
//// pb.setTime_limit((float)7758521.0);
|
||||
//// CommonDAO.add(pb);
|
||||
//
|
||||
//// //删
|
||||
//// CommonDAO.delete(ProblemBean.class, 292);
|
||||
// //查询
|
||||
//// List<Object> beans= CommonDAO.findBeans(ProblemBean.class, 5, "author", "卢婷");
|
||||
//// System.out.println(beans.size());
|
||||
//// List<Object> beans2= CommonDAO.findBeans(ProblemBean.class, 5, "id", 293);
|
||||
//// System.out.println(beans2.size());
|
||||
//// ProblemBean pbean=(ProblemBean)beans2.get(0);
|
||||
//// if(pbean.getSubmit()==null){
|
||||
//// System.out.println("submit:null");
|
||||
//// }else{
|
||||
//// System.out.println("submit:"+pbean.getSubmit());
|
||||
//// }
|
||||
//// HashMap<String,Object> map=new HashMap();
|
||||
//// map.put("author", "卢婷");
|
||||
//// List<Object> beans3=CommonDAO.findBeans(ProblemBean.class, 5, map);
|
||||
//// System.out.println(beans3.size());
|
||||
// HashMap<String, Object> map = new HashMap();
|
||||
// map.put(new String("userId"), 1);
|
||||
// map.put(new String("examId"), 10);
|
||||
// map.put(new String("problemId"), 37);
|
||||
// ExamDetailBean examDetailBean = (ExamDetailBean) CommonDAO.findBeans(ExamDetailBean.class, 1, map).get(0);
|
||||
//
|
||||
// //改,update
|
||||
//// pbean.setSubmit(13);
|
||||
//// CommonDAO.update(pbean);
|
||||
// }
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import java.util.Map;
|
||||
import persistence.oj_beans.ExamDetailBean;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ExamDetailDAO {
|
||||
private static final Class detailClass=ExamDetailBean.class;
|
||||
|
||||
public static ExamDetailBean findOne(Map map){
|
||||
return (ExamDetailBean)(CommonDAO.findBeans(detailClass, 1, map).get(0));
|
||||
}
|
||||
|
||||
public static void update(ExamDetailBean bean){
|
||||
CommonDAO.update(bean);
|
||||
}
|
||||
|
||||
public static void add(ExamDetailBean bean){
|
||||
CommonDAO.add(bean);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import common.DBConfig;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import persistence.oj_beans.ExamDetailBean;
|
||||
import persistence.oj_beans.ExamInfoBean;
|
||||
import persistence.oj_beans.ExamProblemsBean;
|
||||
import persistence.oj_beans.ProblemBean;
|
||||
import persistence.oj_beans.ProblemTestCaseBean;
|
||||
import persistence.oj_beans.SolutionBean;
|
||||
import persistence.oj_beans.UserBean;
|
||||
import persistence.oj_beans.WrongCaseBean;
|
||||
|
||||
public class HibernateSessionFactory {
|
||||
|
||||
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
|
||||
private static final ThreadLocal<Session> threadLocal = new ThreadLocal<Session>();
|
||||
private static Configuration configuration = new Configuration();// new Configuration().configure(FileFinder.findFile("hibernate.cfg.xml"));
|
||||
private static org.hibernate.SessionFactory sessionFactory;
|
||||
private static String configFile = CONFIG_FILE_LOCATION;
|
||||
|
||||
static {
|
||||
try {
|
||||
configuration.setProperties(DBConfig.getDBConfig());
|
||||
|
||||
configuration.addClass(SolutionBean.class);
|
||||
configuration.addClass(ProblemBean.class);
|
||||
configuration.addClass(ProblemTestCaseBean.class);
|
||||
configuration.addClass(ExamDetailBean.class);
|
||||
configuration.addClass(WrongCaseBean.class);
|
||||
configuration.addClass(ExamProblemsBean.class);
|
||||
configuration.addClass(UserBean.class);
|
||||
configuration.addClass(ExamInfoBean.class);
|
||||
sessionFactory = configuration.buildSessionFactory();
|
||||
} catch (Exception e) {
|
||||
System.err.println("%%%% Error Creating SessionFactory %%%%");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private HibernateSessionFactory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ThreadLocal Session instance. Lazy initialize the
|
||||
* <code>SessionFactory</code> if needed.
|
||||
*
|
||||
* @return Session
|
||||
* @throws HibernateException
|
||||
*/
|
||||
public static Session getSession() throws HibernateException {
|
||||
Session session = (Session) threadLocal.get();
|
||||
|
||||
if (session == null || !session.isOpen()) {
|
||||
if (sessionFactory == null) {
|
||||
rebuildSessionFactory();
|
||||
}
|
||||
session = (sessionFactory != null) ? sessionFactory.openSession()
|
||||
: null;
|
||||
threadLocal.set(session);
|
||||
}
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild hibernate session factory
|
||||
*
|
||||
*/
|
||||
public static void rebuildSessionFactory() {
|
||||
try {
|
||||
configuration.configure(configFile);
|
||||
sessionFactory = configuration.buildSessionFactory();
|
||||
} catch (Exception e) {
|
||||
System.err
|
||||
.println("%%%% Error Creating SessionFactory %%%%");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the single hibernate session instance.
|
||||
*
|
||||
* @throws HibernateException
|
||||
*/
|
||||
public static void closeSession() throws HibernateException {
|
||||
Session session = (Session) threadLocal.get();
|
||||
threadLocal.set(null);
|
||||
|
||||
if (session != null) {
|
||||
session.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* return session factory
|
||||
*
|
||||
*/
|
||||
public static org.hibernate.SessionFactory getSessionFactory() {
|
||||
return sessionFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* return session factory
|
||||
*
|
||||
* session factory will be rebuilded in the next call
|
||||
*/
|
||||
public static void setConfigFile(String configFile) {
|
||||
HibernateSessionFactory.configFile = configFile;
|
||||
sessionFactory = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* return hibernate configuration
|
||||
*
|
||||
*/
|
||||
public static Configuration getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import persistence.oj_beans.ProblemBean;
|
||||
|
||||
|
||||
public class ProblemDAO {
|
||||
|
||||
private static final Class problemClass = ProblemBean.class;
|
||||
|
||||
public static ProblemBean findOne(String key, Object problemId) {
|
||||
return (ProblemBean) (CommonDAO.findBeans(problemClass, 1, key, problemId).get(0));
|
||||
}
|
||||
|
||||
public static void update(ProblemBean pbean) {
|
||||
CommonDAO.update(pbean);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import persistence.oj_beans.SolutionBean;
|
||||
|
||||
public class SolutionDAO {
|
||||
|
||||
private static final Class solutionClass = SolutionBean.class;
|
||||
|
||||
public static List<SolutionBean> findMore(String key, Object value, int maxNum) {
|
||||
List<Object> list = CommonDAO.findBeans(solutionClass, maxNum, key, value);
|
||||
List<SolutionBean> list1 = new ArrayList();
|
||||
for (Object o : list) {
|
||||
list1.add((SolutionBean) o);
|
||||
}
|
||||
return list1;
|
||||
}
|
||||
|
||||
public static void update(SolutionBean sbean) {
|
||||
CommonDAO.update(sbean);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<SolutionBean> slists = SolutionDAO.findMore("id=", null, 1);
|
||||
System.out.println(slists);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import persistence.oj_beans.ProblemTestCaseBean;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class TestcaseDAO {
|
||||
|
||||
private static final Class testcaseClass = ProblemTestCaseBean.class;
|
||||
|
||||
public static List<ProblemTestCaseBean> findMore(String key, Object value,int maxNum) {
|
||||
List<Object> list = CommonDAO.findBeans(testcaseClass, maxNum, key, value);
|
||||
List<ProblemTestCaseBean> list1 = new ArrayList();
|
||||
for (Object o : list) {
|
||||
list1.add((ProblemTestCaseBean) o);
|
||||
}
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.ObjectRelation_interface;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import persistence.oj_beans.WrongCaseBean;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class WrongCaseDAO {
|
||||
|
||||
private static final Class wrongcaseClass = WrongCaseBean.class;
|
||||
|
||||
public static void update(WrongCaseBean wbean) {
|
||||
CommonDAO.update(wbean);
|
||||
}
|
||||
|
||||
public static void add(WrongCaseBean wbean) {
|
||||
CommonDAO.add(wbean);
|
||||
}
|
||||
|
||||
public static WrongCaseBean findOne(Map map) {
|
||||
List wrongcases = CommonDAO.findBeans(wrongcaseClass, 1, map);
|
||||
if (wrongcases.size() != 0) {
|
||||
return (WrongCaseBean) (wrongcases.get(0));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamDetailBean" table="studentexamdetail">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="userId" type="int" update="false">
|
||||
<column name="userId"/>
|
||||
</property>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="submit" type="int">
|
||||
<column name="submit"/>
|
||||
</property>
|
||||
<property name="status" type="string">
|
||||
<column name="status"/>
|
||||
</property>
|
||||
<property name="hintCases" type="string" update="false">
|
||||
<column name="hintCases"/>
|
||||
</property>
|
||||
<property name="score" type="float" update="true">
|
||||
<column name="score"/>
|
||||
</property>
|
||||
<property name="elapsedTime" type="int">
|
||||
<column name="elapsedTime"/>
|
||||
</property>
|
||||
<property name="finished" type="boolean" update="false">
|
||||
<column name="finished"/>
|
||||
</property>
|
||||
<property name="solutionId" type="int" update="false">
|
||||
<column name="solutionId"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.oj_beans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ExamDetailBean {
|
||||
|
||||
Integer id;
|
||||
Integer userId;
|
||||
Integer examId;
|
||||
Integer problemId;
|
||||
Integer submit;
|
||||
String status;
|
||||
String hintCases;
|
||||
Float score;
|
||||
|
||||
Integer elapsedTime;
|
||||
Boolean finished;
|
||||
Integer solutionId;
|
||||
|
||||
public Integer getSolutionId() {
|
||||
return solutionId;
|
||||
}
|
||||
|
||||
public void setSolutionId(Integer solutionId) {
|
||||
this.solutionId = solutionId;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
public void setExamId(Integer examId) {
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public Integer getProblemId() {
|
||||
return problemId;
|
||||
}
|
||||
|
||||
public void setProblemId(Integer problemId) {
|
||||
this.problemId = problemId;
|
||||
}
|
||||
|
||||
public Integer getSubmit() {
|
||||
return submit;
|
||||
}
|
||||
|
||||
public void setSubmit(Integer submit) {
|
||||
this.submit = submit;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getHintCases() {
|
||||
return hintCases;
|
||||
}
|
||||
|
||||
public void setHintCases(String hintCases) {
|
||||
this.hintCases = hintCases;
|
||||
}
|
||||
|
||||
public Float getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Float score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Integer getElapsedTime() {
|
||||
return elapsedTime;
|
||||
}
|
||||
|
||||
public void setElapsedTime(Integer elapsedTime) {
|
||||
this.elapsedTime = elapsedTime;
|
||||
}
|
||||
|
||||
public Boolean getFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(Boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamInfoBean" table="studentexaminfo">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="userId" type="int" update="false">
|
||||
<column name="userId"/>
|
||||
</property>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="score" type="float" update="true">
|
||||
<column name="score"/>
|
||||
</property>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.oj_beans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ExamInfoBean {
|
||||
|
||||
Integer id;
|
||||
Integer userId;
|
||||
Integer examId;
|
||||
Float score;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
public void setExamId(Integer examId) {
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public Float getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Float score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ExamProblemsBean" table="examproblems">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="examId" type="int" update="false">
|
||||
<column name="examId"/>
|
||||
</property>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="displaySequence" type="int" update="false">
|
||||
<column name="displaySequence"/>
|
||||
</property>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.oj_beans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ExamProblemsBean {
|
||||
Integer id;
|
||||
Integer examId;
|
||||
Integer problemId;
|
||||
Integer displaySequence;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
public void setExamId(Integer examId) {
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public Integer getProblemId() {
|
||||
return problemId;
|
||||
}
|
||||
|
||||
public void setProblemId(Integer problemId) {
|
||||
this.problemId = problemId;
|
||||
}
|
||||
|
||||
public Integer getDisplaySequence() {
|
||||
return displaySequence;
|
||||
}
|
||||
|
||||
public void setDisplaySequence(Integer displaySequence) {
|
||||
this.displaySequence = displaySequence;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ProblemBean" table="problems">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="title" type="string" update="false">
|
||||
<column name="title"/>
|
||||
</property>
|
||||
<property name="description" type="string" update="false">
|
||||
<column name="description"/>
|
||||
</property>
|
||||
<property name="memory_limit" type="float" update="false">
|
||||
<column name="memory_limit"/>
|
||||
</property>
|
||||
<property name="time_limit" type="float" update="false">
|
||||
<column name="time_limit"/>
|
||||
</property>
|
||||
<property name="inputRequirement" type="string" update="false">
|
||||
<column name="inputRequirement"/>
|
||||
</property>
|
||||
<property name="outputRequirement" type="string" update="false">
|
||||
<column name="outputRequirement"/>
|
||||
</property>
|
||||
<property name="sample_input" type="string" update="false">
|
||||
<column name="sample_input"/>
|
||||
</property>
|
||||
<property name="sample_output" type="string" update="false">
|
||||
<column name="sample_ouput"/>
|
||||
</property>
|
||||
<property name="author" type="string" update="false">
|
||||
<column name="author"/>
|
||||
</property>
|
||||
<property name="difficulty" type="string" update="false">
|
||||
<column name="difficulty"/>
|
||||
</property>
|
||||
<property name="sourceCode" type="string" update="false">
|
||||
<column name="sourceCode"/>
|
||||
</property>
|
||||
<property name="srcCodeLanguage" type="string" update="false">
|
||||
<column name="srcCodeLanguage"/>
|
||||
</property>
|
||||
<property name="scoreGrade" type="string" update="false">
|
||||
<column name="scoreGrade"/>
|
||||
</property>
|
||||
<property name="chapterId" type="int" update="false">
|
||||
<column name="chapterId"/>
|
||||
</property>
|
||||
<property name="checkSimilarity" type="int" update="false">
|
||||
<column name="checkSimilarity"/>
|
||||
</property>
|
||||
<property name="similarityThreshold" type="float" update="false">
|
||||
<column name="similarityThreshold"/>
|
||||
</property>
|
||||
<property name="solved" type="int" update="false">
|
||||
<column name="solved"/>
|
||||
</property>
|
||||
<property name="submit" type="int" update="true">
|
||||
<column name="submit"/>
|
||||
</property>
|
||||
<property name="ratio" type="float" update="false">
|
||||
<column name="ratio"/>
|
||||
</property>
|
||||
<property name="teacherId" type="int" update="false">
|
||||
<column name="teacherId"/>
|
||||
</property>
|
||||
<property name="source" type="string" update="false">
|
||||
<column name="source"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.oj_beans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ProblemBean {
|
||||
//key
|
||||
Integer id;
|
||||
String title;
|
||||
String description;
|
||||
Float memory_limit;
|
||||
Float time_limit;
|
||||
String inputRequirement;
|
||||
String outputRequirement;
|
||||
String sample_input;
|
||||
String sample_output;
|
||||
String author;
|
||||
String difficulty;
|
||||
String sourceCode;
|
||||
String srcCodeLanguage;
|
||||
String scoreGrade;
|
||||
//not null
|
||||
Integer chapterId=0;
|
||||
Integer checkSimilarity;
|
||||
Float similarityThreshold;
|
||||
Integer solved;
|
||||
Integer submit;
|
||||
Float ratio;
|
||||
//not null
|
||||
Integer teacherId=0;
|
||||
String source;
|
||||
|
||||
public float timer=600;//s
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Float getMemory_limit() {
|
||||
return memory_limit;
|
||||
}
|
||||
|
||||
public void setMemory_limit(Float memory_limit) {
|
||||
this.memory_limit = memory_limit;
|
||||
}
|
||||
|
||||
public Float getTime_limit() {
|
||||
return time_limit;
|
||||
}
|
||||
|
||||
public void setTime_limit(Float time_limit) {
|
||||
this.time_limit = time_limit;
|
||||
}
|
||||
|
||||
public String getInputRequirement() {
|
||||
return inputRequirement;
|
||||
}
|
||||
|
||||
public void setInputRequirement(String inputRequirement) {
|
||||
this.inputRequirement = inputRequirement;
|
||||
}
|
||||
|
||||
public String getOutputRequirement() {
|
||||
return outputRequirement;
|
||||
}
|
||||
|
||||
public void setOutputRequirement(String outputRequirement) {
|
||||
this.outputRequirement = outputRequirement;
|
||||
}
|
||||
|
||||
public String getSample_input() {
|
||||
return sample_input;
|
||||
}
|
||||
|
||||
public void setSample_input(String sample_input) {
|
||||
this.sample_input = sample_input;
|
||||
}
|
||||
|
||||
public String getSample_output() {
|
||||
return sample_output;
|
||||
}
|
||||
|
||||
public void setSample_output(String sample_output) {
|
||||
this.sample_output = sample_output;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getDifficulty() {
|
||||
return difficulty;
|
||||
}
|
||||
|
||||
public void setDifficulty(String difficulty) {
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public String getSourceCode() {
|
||||
return sourceCode;
|
||||
}
|
||||
|
||||
public void setSourceCode(String sourceCode) {
|
||||
this.sourceCode = sourceCode;
|
||||
}
|
||||
|
||||
public String getSrcCodeLanguage() {
|
||||
return srcCodeLanguage;
|
||||
}
|
||||
|
||||
public void setSrcCodeLanguage(String srcCodeLanguage) {
|
||||
this.srcCodeLanguage = srcCodeLanguage;
|
||||
}
|
||||
|
||||
public String getScoreGrade() {
|
||||
return scoreGrade;
|
||||
}
|
||||
|
||||
public void setScoreGrade(String scoreGrade) {
|
||||
this.scoreGrade = scoreGrade;
|
||||
}
|
||||
|
||||
public Integer getChapterId() {
|
||||
return chapterId;
|
||||
}
|
||||
|
||||
public void setChapterId(Integer chapterId) {
|
||||
this.chapterId = chapterId;
|
||||
}
|
||||
|
||||
public Integer getCheckSimilarity() {
|
||||
return checkSimilarity;
|
||||
}
|
||||
|
||||
public void setCheckSimilarity(Integer checkSimilarity) {
|
||||
this.checkSimilarity = checkSimilarity;
|
||||
}
|
||||
|
||||
public Float getSimilarityThreshold() {
|
||||
return similarityThreshold;
|
||||
}
|
||||
|
||||
public void setSimilarityThreshold(Float similarityThreshold) {
|
||||
this.similarityThreshold = similarityThreshold;
|
||||
}
|
||||
|
||||
public Integer getSolved() {
|
||||
return solved;
|
||||
}
|
||||
|
||||
public void setSolved(Integer solved) {
|
||||
this.solved = solved;
|
||||
}
|
||||
|
||||
public Integer getSubmit() {
|
||||
return submit;
|
||||
}
|
||||
|
||||
public void setSubmit(Integer submit) {
|
||||
this.submit = submit;
|
||||
}
|
||||
|
||||
public Float getRatio() {
|
||||
return ratio;
|
||||
}
|
||||
|
||||
public void setRatio(Float ratio) {
|
||||
this.ratio = ratio;
|
||||
}
|
||||
|
||||
public Integer getTeacherId() {
|
||||
return teacherId;
|
||||
}
|
||||
|
||||
public void setTeacherId(Integer teacherId) {
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping package="persistence.oj_beans">
|
||||
<class name="ProblemTestCaseBean" table="problemtestcases">
|
||||
<id name="id" type="int">
|
||||
<column name="id"/>
|
||||
<generator class="identity"/>
|
||||
</id>
|
||||
<property name="problemId" type="int" update="false">
|
||||
<column name="problemId"/>
|
||||
</property>
|
||||
<property name="input" type="string" update="false">
|
||||
<column name="input"/>
|
||||
</property>
|
||||
<property name="output" type="string" update="false">
|
||||
<column name="output"/>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package persistence.oj_beans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class ProblemTestCaseBean {
|
||||
Integer id;
|
||||
Integer problemId;
|
||||
String input;
|
||||
String output="";
|
||||
|
||||
// public ProblemTestCaseBean(String input, String output) {
|
||||
// this.id = 0;
|
||||
// this.problemId = 0;
|
||||
// this.input = input;
|
||||
// this.output = output;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getProblemId() {
|
||||
return problemId;
|
||||
}
|
||||
|
||||
public void setProblemId(Integer problemId) {
|
||||
this.problemId = problemId;
|
||||
}
|
||||
|
||||
public String getInput() {
|
||||
return input;
|
||||
}
|
||||
|
||||
public void setInput(String input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public String getOutput() {
|
||||
return output;
|
||||
}
|
||||
|
||||
public void setOutput(String output) {
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue