01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.platforms.stores.base;
09:
10: //base classes
11: import java.math.BigDecimal;
12: import java.sql.Connection;
13: import java.sql.PreparedStatement;
14: import java.sql.ResultSet;
15: import java.sql.SQLException;
16:
17: //project specific classes
18:
19: //other classes
20:
21: public abstract class SystemStatement {
22:
23: //
24: public final static Integer DECIMAL = new Integer(0);
25: public final static Integer SHORT_STRING = new Integer(1);
26: public final static Integer LONG_STRING = new Integer(2);
27: public final static Integer BOOLEAN = new Integer(3);
28: public final static Integer BINARY_OBJECT = new Integer(4);
29: //public final static Integer BINARY_STREAM = new Integer(5);
30:
31: //
32: public final static Integer NORMAL_COLUMN = new Integer(0);
33: public final static Integer ID_COLUMN = new Integer(1);
34: public final static Integer SERIES_SEQUENCE_COLUMN = new Integer(2);
35:
36: //
37: public final static Integer MAX_COLUMN = new Integer(0);
38:
39: //private WorkflowStore ws = null;
40:
41: protected SystemStatement() {
42: //this.ws = inWs;
43: }
44:
45: //protected WorkflowStore getWorkflowStore() {
46: // return this.ws;
47: //}
48:
49: //public abstract WorkflowResultSet execute(Connection inConn)
50: // throws SQLException;
51:
52: public final static SystemResultSet newResultSet(int inColumns) {
53:
54: return new SystemResultSet(inColumns);
55: }
56:
57: public final static CreateStatement newCreateStatement(String inName) {
58:
59: return new CreateStatement(inName);
60: }
61:
62: public final static SequenceStatement newSequenceStatement(
63: String inName) {
64:
65: return new SequenceStatement(inName);
66: }
67:
68: public final static DropStatement newDropStatement(
69: CreateStatement inWcs) {
70:
71: return new DropStatement(inWcs);
72: }
73:
74: public final static InsertStatement newInsertStatement(
75: CreateStatement inWcs) {
76:
77: return new InsertStatement(inWcs);
78: }
79:
80: public final static UpdateStatement newUpdateStatement(
81: CreateStatement inWcs) {
82:
83: return new UpdateStatement(inWcs);
84: }
85:
86: public final static DeleteStatement newDeleteStatement(
87: CreateStatement inWcs) {
88:
89: return new DeleteStatement(inWcs);
90: }
91: }
|