Commit 82465240 by Nilu

Rename TestAnalysis to TestInput

parent 9189c55a
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">it_does_not_matter</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="xxxx" type="BLOB" nullable="false"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
-- DROP TABLE it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
xxxx image NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- DROP TABLE it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
xxxx blob NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- @AutoRun
-- drop table it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
xxxx bytea NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT pk_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
...@@ -12,7 +12,7 @@ import oneit.servlets.portability.FileDownloader; ...@@ -12,7 +12,7 @@ import oneit.servlets.portability.FileDownloader;
import oneit.servlets.process.*; import oneit.servlets.process.*;
import oneit.utils.*; import oneit.utils.*;
import oneit.utils.table.*; import oneit.utils.table.*;
import performa.orm.TestAnalysis; import performa.orm.TestInput;
/** /**
* *
...@@ -25,14 +25,14 @@ public class TestAnalysisFP extends ORMProcessFormProcessor ...@@ -25,14 +25,14 @@ public class TestAnalysisFP extends ORMProcessFormProcessor
@Override @Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{ {
TestAnalysis testAnalysis = (TestAnalysis) process.getAttribute("TestAnalysis"); TestInput testInput = (TestInput) process.getAttribute("TestAnalysis");
ByteArrayOutputStream bos = new ByteArrayOutputStream (); ByteArrayOutputStream bos = new ByteArrayOutputStream ();
byte[] bytes ; byte[] bytes;
//TO-DO -> "filecontent" processing //TO-DO -> "filecontent" processing
try try
{ {
ExcelExporter.ExportAppender excelRenderer = getExportAppender(testAnalysis.getCSV()); ExcelExporter.ExportAppender excelRenderer = getExportAppender(testInput.getCSV());
excelRenderer.export(bos); excelRenderer.export(bos);
bytes = bos.toByteArray(); bytes = bos.toByteArray();
} }
...@@ -79,13 +79,13 @@ public class TestAnalysisFP extends ORMProcessFormProcessor ...@@ -79,13 +79,13 @@ public class TestAnalysisFP extends ORMProcessFormProcessor
{ {
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
TestAnalysis testAnalysis = (TestAnalysis) process.getAttribute("TestAnalysis"); TestInput testAnalysis = (TestInput) process.getAttribute("TestAnalysis");
Debug.assertion(testAnalysis != null, "Test Analysis is null while Processing CSV File."); Debug.assertion(testAnalysis != null, "Test Analysis is null while Processing CSV File.");
if(testAnalysis.getCSV() != null) if(testAnalysis.getCSV() != null)
{ {
BusinessObjectParser.assertFieldCondition(SUPPORTED_TYPES.contains(testAnalysis.getCSV().getContentType()), testAnalysis, TestAnalysis.FIELD_CSV, "invalid", exceptions, true, submission.getRequest()); BusinessObjectParser.assertFieldCondition(SUPPORTED_TYPES.contains(testAnalysis.getCSV().getContentType()), testAnalysis, TestInput.FIELD_CSV, "invalid", exceptions, true, submission.getRequest());
} }
} }
} }
package performa.orm; package performa.orm;
public class TestAnalysis extends BaseTestAnalysis public class TestInput extends BaseTestInput
{ {
private static final long serialVersionUID = 0L; private static final long serialVersionUID = 0L;
// This constructor should not be called // This constructor should not be called
public TestAnalysis () public TestInput ()
{ {
// Do not add any code to this, always put it in initialiseNewObject // Do not add any code to this, always put it in initialiseNewObject
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ROOT> <ROOT>
<BUSINESSCLASS name="TestAnalysis" package="performa.orm" superclass="NonPersistentBO"> <BUSINESSCLASS name="TestInput" package="performa.orm" superclass="NonPersistentBO">
<IMPORT value="oneit.servlets.orm.*"/> <IMPORT value="oneit.servlets.orm.*"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment