untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 OZ User Data Store Manual... 6 UDS... 6 JDBC UDS Connection UDS Connection UDS DataAction DataAction DataAction HttpRequest ResultSet... 83

2 OZ User Data Store Manual,,,,, DataAction,, Http Request.. jar jar lib. // lib servlet.jar UDSTestPackage.jar lib. // config launch.cfg servlet.jar UDSTestPackage.jar. 2 FORCS Co., LTD

3 A Leader of Enterprise e-business Solution ;.\lib\udstestpackage.jar;.\lib\servlet.jar ODBC AppExample.mdb ODBC. (:) UDS. WEB-INF/classes uds_test TestUDS_RDBPoolRef.class, TestUDS_RDBPoolRefEX.class, WEB-INF/classes oz/uds FORCS Co., LTD 3

4 OZ User Data Store Manual OZUDSSample.class, OZUDSSampleResultSet.class. WEB-INF web.xml. <?xml version="1.0" encoding="iso "?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" " <web-app> <servlet> <servlet-name>httpserver</servlet-name> <servlet-class>oz.server.ozservlet</servlet-class> </servlet> <servlet> <servlet-name>ozhello</servlet-name> <servlet-class>helloworld</servlet-class> </servlet> <servlet> <servlet-name>uds_test.testuds_rdbpoolref</servlet-name> <servlet-class>uds_test.testuds_rdbpoolref</servlet-class> </servlet> <servlet> <servlet-name>uds_test.testuds_rdbpoolrefex</servlet-name> <servlet-class>uds_test.testuds_rdbpoolrefex</servlet-class> </servlet> <servlet> <servlet-name>oz.uds.ozudssample</servlet-name> <servlet-class>oz.uds.ozudssample</servlet-class> </servlet> <servlet> <servlet-name>oz.uds.ozudssampleresultset</servlet-name> <servlet-class>oz.uds.ozudssampleresultset</servlet-class> </servlet> <servlet-mapping> <servlet-name>httpserver</servlet-name> <url-pattern>/server</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>httpserver</servlet-name> <url-pattern>/server/*</url-pattern> 4 FORCS Co., LTD

5 A Leader of Enterprise e-business Solution </servlet-mapping> <servlet-mapping> <servlet-name>ozhello</servlet-name> <url-pattern>/hello</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>uds_test.testuds_rdbpoolref</servlet-name> <url-pattern>/uds_test.testuds_rdbpoolref</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>uds_test.testuds_rdbpoolrefex</servlet-name> <url-pattern>/uds_test.testuds_rdbpoolrefex</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>oz.uds.ozudssample</servlet-name> <url-pattern>/oz.uds.ozudssample</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>oz.uds.ozudssampleresultset</servlet-name> <url-pattern>/oz.uds.ozudssampleresultset</url-pattern> </servlet-mapping> </web-app> ODBC conf db.properties ODBC. AppExample.vendor=odbc AppExample.dsn=AppExample AppExample.user= AppExample.password= AppExample.maxconns=5 AppExample.initconns=2 AppExample.timeout=5 Member.vendor=odbc Member.dsn=AppExample Member.user= Member.password= Member.maxconns=5 Member.initconns=2 Member.timeout=5 FORCS Co., LTD 5

6 OZ User Data Store Manual UDS UDS DefaultUserDataStore OZUserDataStore RawDataSource Log. UDS DefaultUserDataStore. interface OZUserDataStore interface RawDataSource abstract class DefaultUserDataStore oz.uds.userdatastore package oz.uds; import java.sql.*; public interface OZUserDataStore public void init() throws OZUserDataStoreException; public ResultSet getresultset(string argument) throws OZUserDataStoreException; public void freeresultset(resultset rst); public void close(); init Prototype Definition public void init() throws OZUserDataStoreException. UDS. getresultset Prototype public ResultSet getresultset(string argument) throws OZUserDataStoreException 6 FORCS Co., LTD

7 A Leader of Enterprise e-business Solution Definition ResultSet. Argument argument ResultSet freeresultset Prototype Definition public void freeresultset(resultset rst) ResultSet. getresultset ResultSet freeresultset ResultSet. Argument rst ResultSet close Prototype Definition public void close(). UDS. oz.uds.basic.rawdatasource package oz.uds.basic; import oz.uds.*; public interface RawDataSource Object getrawdata(string command) throws OZUserDataStoreException; getrawdata Prototype Definition Object getrawdata(string command) throws OZUserDataStoreException unformat int, String. Argument command DefaultUserDataStore UDS Example - TestUDS.java package uds_test; import oz.uds.*; import oz.uds.basic.defaultuserdatastore; import java.sql.*; FORCS Co., LTD 7

8 OZ User Data Store Manual public class TestUDS extends DefaultUserDataStore static log = true; public TestUDS() System.out.println("create TestUDS..."); public synchronized void init() public synchronized ResultSet getresultset(string command) // ResultSet ResultSet if(command.equals("null")) return null; else return new TestUDSResultSet(command); public synchronized Object getrawdata(string command) throws OZUserDataStoreException return null; oz.uds.rs.defaultresult ResultSet TestUDSResultSet - TestUDSResultSet.java package uds_test; import oz.uds.rs.*; import java.sql.resultsetmetadata; import java.sql.sqlexception; //oz.uds.rs.defaultresultset. //implements java.sql.resultset, getstring().. // DefaultResultSet // ResultSet public class TestUDSResultSet extends DefaultResultSet private int cursor = 0, num_rows = 10; private String command = new String("tempResult"); TestUDSResultSet(String _command) super(); if (_command!= null) command = _command; 8 FORCS Co., LTD

9 A Leader of Enterprise e-business Solution public boolean next() throws SQLException // ResultSet. // 10 next cursor++; if (cursor < num_rows) return true; else return false; public String getstring(string columnname) throws SQLException return command + Integer.toString(cursor); public ResultSetMetaData getmetadata() throws SQLException // jdbc ReusltSetMetaData, //. return new TestUDSResultSetMeta("field1"); oz.uds.rs.defaultresultmeta ResultSet TestUDSResultSet - TestUDSResultSetMeta.java package uds_test; import oz.uds.rs.*; import java.sql.sqlexception; import java.sql.types; //oz.uds.rs.defaultresultsetmeta ResultSetMeta //DefaultResultSetMeta java.sql.resultsetmeta interface // public class TestUDSResultSetMeta extends DefaultResultSetMeta private String columnname = new String("tempField"); public TestUDSResultSetMeta(String _columnname) columnname = _columnname; public int getcolumncount() throws SQLException return 1; public String getcolumnname(int column) throws SQLException return columnname; FORCS Co., LTD 9

10 OZ User Data Store Manual public String getcolumnlabelname(int column) throws SQLException return columnname; public int getcolumntype(int column) throws SQLException return Types.VARCHAR; public String getcolumnlabel(int int0) throws SQLException return columnname; UDS. ODI TestUDS.class. []. 10 FORCS Co., LTD

11 A Leader of Enterprise e-business Solution ( ),. ODI. "class1_1.odi". "class1_1.odi". "ODI " "class1_1", "" "SET_1". "SET_1" "field1" &. FORCS Co., LTD 11

12 OZ User Data Store Manual. JDBC UDS JDBC UDS JDBCBasedUDS DefaultUserDataStore getjdbcname(), getjdbcurl(). 12 FORCS Co., LTD

13 A Leader of Enterprise e-business Solution interface OZUserDataStore interface RawDataSource abstract class DefaultUserDataStore abstract class JDBCBasedUDS JDBCBasedUDS UDS Example - TestJDBCUDS.java getjdbcname() getjdbcurl() init() URL Connection. package uds_test; import oz.uds.*; import oz.uds.basic.*; import java.sql.*; public class TestJDBCUDS extends JDBCBasedUDS public void init() throws OZUserDataStoreException super.init(); DefaultUserDataStore.log = true; public String getjdbcname() return "sun.jdbc.odbc.jdbcodbcdriver"; public String getjdbcurl() return "jdbc:odbc:appexample"; // JDBCBasedUDS public ResultSet getresultset(string command) throws OZUserDataStoreException if(log)log("############### getresultset ##################"); try command = processcommand(command); ResultSet rst = stmt.executequery(command); return rst; catch (SQLException e) if(log)e.printstacktrace(ps); throw new OZUserDataStoreException(e.getMessage()); FORCS Co., LTD 13

14 OZ User Data Store Manual // JDBCBasedUDS public Object getrawdata(string command) throws OZUserDataStoreException return null; // JDBCBasedUDS public void close() super.close(); try if(stmt!= null)stmt.close(); stmt = null; if(conn!= null)conn.close(); conn = null; catch (SQLException e) if(log)e.printstacktrace(ps); JDBC UDS. ODI TestJDBCUDS.class.. 14 FORCS Co., LTD

15 A Leader of Enterprise e-business Solution ( ). ODI. "class1_2.odi". "class1_2.odi". "ODI " "class1_2", "" "SET_1". &, []. FORCS Co., LTD 15

16 OZ User Data Store Manual. 16 FORCS Co., LTD

17 A Leader of Enterprise e-business Solution Connection UDS UDS DB Connection Pool Connection oz.uds.ozrdbpoolref.java implements. oz.uds.ozrdbpoolref package oz.uds; /** * RDB UDS ConnectionPool * interface implements. * implements UDS close() * connection close(). */ public interface OZRDBPoolRef /** * UDS DB Alias *, db.properties. alias name */ public String getdbalias(); /** * ConnectionPool Connection * UDS Connection. * obj[0] - java.sql.connection : Connection * obj[1] - java.lang.string : Session ID of Connection obj Connection Info. */ public void setdbconnection(object[] obj); getdbalias Prototype Definition public String getdbalias() UDS DB Pool Alias.. setdbconnection Prototype public void setdbconnection(object[] obj) FORCS Co., LTD 17

18 OZ User Data Store Manual Definition UDS Connection DB Pool.. Argument obj Alias Connection DB Pool Connection obj[0] : Connection obj[1] : Session ID : getdbalias( Connection DB Pool ) setdbconnection( Connection UDS ) init() OZRDBPoolRef Connection ODI RDB Store, Store Auto Commit. OZRDBPoolRef implements Connection Pool close() Connection Close. OZRDBPoolRef implements init(), close(). init Connection UDS OZRDBPoolRef implements UDS Connection setdbconnections(). UDS setdbconnection() init(). OZRDBPoolRef UDS Example - TestUDS_RDBPoolRef.java package uds_test; import java.sql.*; import oz.uds.*; import oz.uds.basic.defaultuserdatastore; import oz.uds.rs.*; public class TestUDS_RDBPoolRef extends DefaultUserDataStore implements OZRDBPoolRef 18 FORCS Co., LTD

19 A Leader of Enterprise e-business Solution private Connection conn; private Statement stmt; /** * init DB alias. * Connection db.properties. alias name */ public String getdbalias() return "AppExample"; /** * ConnectionPool Connection * UDS Connection. * obj[0] - java.sql.connection : Connection * obj[1] - java.lang.string : Session ID of Connection obj Connection Info. */ public void setdbconnection(object[] obj) try conn = (Connection)obj[0]; catch(exception e) e.printstacktrace(); public void init() throws OZUserDataStoreException try stmt = conn.createstatement(); catch(exception e) e.printstacktrace(); throw new OZUserDataStoreException(e.getMessage()); public void close() try if(stmt!= null) try stmt.close(); FORCS Co., LTD 19

20 OZ User Data Store Manual stmt = null; catch(exception e) catch(exception e) e.printstacktrace(); public Object getrawdata(string string) throws OZUserDataStoreException return null; public ResultSet getresultset(string command) throws OZUserDataStoreException try System.out.println("COMMAND :" + command); return stmt.executequery(command); catch(exception e) e.printstacktrace(); throw new OZUserDataStoreException(e.toString()); public void freeresultset(resultset rst) if(rst!= null) try rst.close(); catch(exception e) Connection UDS. ODI 20 FORCS Co., LTD

21 A Leader of Enterprise e-business Solution TestUDS_RDBPoolRef.class... ODI. "class1_3.odi". "class1_3.odi". FORCS Co., LTD 21

22 OZ User Data Store Manual "ODI " "class1_3", "" "SET_1".. [] [] FORCS Co., LTD

23 A Leader of Enterprise e-business Solution Connection UDS UDS DB Connection Pool Connection oz.uds.ozrdbpoolrefex.java implements. oz.uds.ozrdbpoolrefex package oz.uds; import java.util.hashmap; /** * Description: RDB UDS ConnectionPool * Connection interface implements. * implements UDS close() * connection close(). */ public interface OZRDBPoolRefEX /** * UDS DB Alias *, db.properties. alias name FORCS Co., LTD 23

24 OZ User Data Store Manual */ public String[] getdbaliasarray(); /** * ConnectionPool Connection * UDS Connection. * map - KEY:alias, VALUE:Object[2] * obj[0] - java.sql.connection : Connection * obj[1] - java.lang.string : Session ID of Connection */ public void setdbconnections(hashmap map); getdbaliasarray Prototype Definition public String getdbaliasarray() UDS DB Pool alias. alias.. setdbconnections Prototype Definition public void setdbconnections(hashmap map) UDS Connection DB Pool HashMap. alias Connection null. Argument map key : alias name value : Object[2] [0] : Connection [1] : Session ID : getdbaliasarray( Connection DB Pool ) setdbconnections( Connection UDS ) init() OZRDBPoolRefEX Connection ODI RDB Store, Store Auto Commit. OZRDBPoolRefEX implements Connection Pool close() Connection 24 FORCS Co., LTD

25 A Leader of Enterprise e-business Solution Close. OZRDBPoolRefEX implements init(), close(). init Connection UDS OZRDBPoolRef implements UDS Connection setdbconnections(). UDS setdbconnections() init(). OZRDBPoolRefEX UDS Example - TestUDS_RDBPoolRefEX.java package uds_test; import java.sql.*; import java.util.*; import oz.uds.*; import oz.uds.basic.defaultuserdatastore; import oz.uds.rs.*; public class TestUDS_RDBPoolRef extends DefaultUserDataStore implements OZRDBPoolRefEX private Connection conn1; private Connection conn2; private Connection conn3; private Statement stmt1; private Statement stmt2; private Statement stmt3; String[] aliases = "AppExample", "Member", "Unknown" ; /** * UDS DB Alias. *, db.properties. alias name */ public String[] getdbaliasarray() return aliases; /** * ConnectionPool Connection FORCS Co., LTD 25

26 OZ User Data Store Manual * UDS Connection. * map [KEY:alias, VALUE:Object[2] * obj[0] - java.sql.connection : Connection * obj[1] - java.lang.string : Session ID of Connection obj Connection Info. */ public void setdbconnections(hashmap map) try Object[] obj = null; obj = (Object[])map.get(aliases[0]); if(obj!= null) conn1 = (Connection)obj[0]; obj = (Object[])map.get(aliases[1]); if(obj!= null) conn2 = (Connection)obj[0]; obj = (Object[])map.get(aliases[2]); if(obj!= null) conn3 = (Connection)obj[0]; catch(exception e) e.printstacktrace(); public void init() throws OZUserDataStoreException try stmt1 = conn1.createstatement(); stmt2 = conn2.createstatement(); stmt3 = conn3.createstatement(); catch(exception e) e.printstacktrace(); throw new OZUserDataStoreException(e.getMessage()); public void close() try if (stmt1!= null) stmt1.close(); if (stmt2!= null) stmt2.close(); if (stmt3!= null) stmt3.close(); catch(exception e) e.printstacktrace(); 26 FORCS Co., LTD

27 A Leader of Enterprise e-business Solution public Object getrawdata(string string) throws OZUserDataStoreException return null; public ResultSet getresultset(string command) throws OZUserDataStoreException try /** * stmt1,2,3 command. * stmt1. */ System.out.println("COMMAND :" + command); return stmt1.executequery(command); catch(exception e) e.printstacktrace(); throw new OZUserDataStoreException(e.toString()); public void freeresultset(resultset rst) if(rst!= null) try rst.close(); catch(exception e) Connection UDS. ODI TestUDS_RDBPoolRefEX.class. FORCS Co., LTD 27

28 OZ User Data Store Manual. ( ). ODI. "class1_4.odi". "class1_4.odi". "ODI " "class1_4", "" "SET_1".. 28 FORCS Co., LTD

29 A Leader of Enterprise e-business Solution [] []... FORCS Co., LTD 29

30 OZ User Data Store Manual 30 FORCS Co., LTD

31 A Leader of Enterprise e-business Solution DataAction UDS DataAction oz.uds.ozframeworkdatastore. oz.uds.ozframeworkdatastore package oz.uds; import java.sql.*; public interface OZFrameworkUserDataStore extends OZUserDataStore /** * insert a row. * * it can be implemented as following SQL like logic. * * INSERT INTO 'table' (src_fields[0], field_namses[1],...) * VALUES(src_values[0], src_value[1],...) * * extra arugment can be used to convert spacial types (TO_DATE etc) or * modify data. * src_fields * field name array. * it's size varies from 0 to the number of fields in the table. src_values * the target row's field data array faired with 'src_fields'. * it's size can be 0 to the number of fields in the table. ext * extra argument if needs. * number of inserted rows. (always 1 if normal) OZUserDataStoreException 3.0 */ public abstract int insertrow(string cmd, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException; FORCS Co., LTD 31

32 OZ User Data Store Manual /** * delete row(s). * * it can be implemented as following SQL like logic. * * DELETE FROM 'table' WHERE dst_fields[0] = dst_values[0] * AND dst_fields[1] = dst_values[1] * AND... * AND extra condition * dst_fields * field name array. * it's size varies from 0 to the number of fields in the table. dst_values * the target row's field data array faired with 'field_names'. * it's size can be 0 to the number of fields in the table. * the type of value is one of following. * * [Java types] [SQL types] * java.io.inputstream BINARY VARBINARY LONGVARBINARY BLOB * java.lang.string CHAR LONGVARCHAR VARCHAR CLOB * java.sql.date DATE * java.sql.time TIME * java.sql.timestamp TIMESTAMP * java.lang.integer SMALLINT TUNYINT INTEGER * java.lang.double BIGINT FLOAT DOUBLE REAL NUMERIC DECIMAL * java.lang.boolean BIT * ext * extra condition if needs. * number of deleted rows. OZUserDataStoreException 3.0 */ public abstract int deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext) throws OZUserDataStoreException; /** * update row(s). * * it can be implemented as following SQL like logic. * * UPDATE 'table' SET src_fields[0] = src_values[0], * src_field[1] = src_values[1], 32 FORCS Co., LTD

33 A Leader of Enterprise e-business Solution *... * WHERE dst_fields[0] = dst_values[0] * AND dst_fields[1] = dst_values[1] * AND... * AND ext * * extra arugment can be used to convert spacial types (TO_DATE etc) or * modify data. * dst_fields * destination row's field name array. * it's size varies from 0 to the number of fields in the table. dst_values * destination row's field data array faired with 'dst_fields'. * it's size can be 0 to the number of fields in the table. src_fields * the source field name array to update. * it's size varies from 0 to the number of fields in the table. src_values * the source field data array aligned with 'dst_fields' to update. * it's size can be 0 to the number of fields in the table. argument * extra argument if needs. * number of updated rows. OZUserDataStoreException 3.0 */ public abstract int updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException; /** * commit all data actions * * called after all data action transactions are successfully completed. * 3.0 */ public abstract void commit() throws OZUserDataStoreException; /** * FORCS Co., LTD 33

34 OZ User Data Store Manual * rollback all data actions * * called if exception occured while doing data actions. * 3.0 */ public abstract void rollback()throws OZUserDataStoreException; insertrow Prototype Definition public abstract int insertrow(string cmd, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException. Argument cmd src_fields src_values ext Array Array deleterow Prototype Definition public abstract int deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext) throws OZUserDataStoreException. Argument cmd dst_fields dst_values ext Array Array updaterow Prototype Definition public abstract int updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException. Argument cmd dst_fields Array 34 FORCS Co., LTD

35 A Leader of Enterprise e-business Solution dst_values src_fields src_values ext Array Array Array commit Prototype Definition public abstract void commit() throws OZUserDataStoreException DataAction Commit(). rollback Prototype Definition public abstract void rollback() throws OZUserDataStoreException Commit rollback. OZFrameworkUserDataStore UDS Example - DefaultOZFrameworkUDS.java package oz.uds.appexample; import oz.uds.*; import oz.uds.basic.*; public class DefaultOZFrameworkUDS extends JDBCBasedUDS implements OZFrameworkUserDataStore public void init() throws OZUserDataStoreException super.init(); DefaultUserDataStore.log = true; public String getjdbcname() return "sun.jdbc.odbc.jdbcodbcdriver"; public String getjdbcurl() return "jdbc:odbc:appexample"; public int insertrow(string cmd, FORCS Co., LTD 35

36 OZ User Data Store Manual \n"); \n"); String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : insertrow info.append("cmd :" + cmd + "\n"); for(int i=0; i<src_fields.length; i++) info.append("sf"+i+"["+src_fields[i]+"] :" + src_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); info.append(" System.out.println(info.toString()); try return stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) throw new OZUserDataStoreException(sqlexception.getMessage()); public int deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : deleterow \n"); info.append("cmd :" + cmd + "\n"); for(int i=0; i<dst_fields.length; i++) info.append("df"+i+"["+dst_fields[i]+"] :" + dst_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); info.append(" \n"); System.out.println(info.toString()); try return stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) 36 FORCS Co., LTD

37 A Leader of Enterprise e-business Solution if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public int updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : updaterow \n"); info.append("cmd :" + cmd + "\n"); for(int i=0; i<src_fields.length; i++) info.append("sf"+i+"["+src_fields[i]+"] :" + src_values[i] + "\n"); for(int i=0; i<dst_fields.length; i++) info.append("df"+i+"["+dst_fields[i]+"] :" + dst_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); info.append(" \n"); System.out.println(info.toString()); try return stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public boolean isinsertrowavailable() return true; public String insertcommand(string cmd, FORCS Co., LTD 37

38 OZ User Data Store Manual String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer result = new StringBuffer("INSERT INTO " + ext + "("); for( int i = 0; i < src_fields.length; i++) if (i == (src_fields.length-1)) result.append(src_fields[i]); else result.append(src_fields[i]).append(", "); result.append(") VALUES ( "); for( int i = 0; i < src_values.length; i++) if (i == (src_values.length-1)) result.append(src_values[i]); else result.append(src_values[i]).append(", "); return result.append(")").tostring(); public boolean isdeleterowavailable() return true; public String deletecommand(string cmd, String[] dst_fields, Object[] dst_values, String ext) throws OZUserDataStoreException StringBuffer result = new StringBuffer("DELETE FROM " + ext + " WHERE "); for( int i = 0; i < dst_fields.length; i++) if (i == 0) result.append(dst_fields[i]).append(" = ").append(dst_values[i]); 38 FORCS Co., LTD

39 A Leader of Enterprise e-business Solution else result.append(" AND ").append(dst_fields[i]).append(" = ").append(dst_values[i]); return result.tostring(); public boolean isupdaterowavailable() return true; public String updatecommand(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer result = new StringBuffer("UPDATE " + ext + " SET "); for( int i = 0; i < src_fields.length; i++) if (i == (src_fields.length-1)) result.append(src_fields[i]).append(" = ").append(src_values[i]); else result.append(src_fields[i]).append(" = ").append(src_values[i]).append(", "); result.append(" WHERE "); for( int i = 0; i < dst_fields.length; i++) if (i == 0) result.append(dst_fields[i]).append(" = ").append(dst_values[i]); else result.append(" AND ").append(dst_fields[i]).append(" = ").append(dst_values[i]); FORCS Co., LTD 39

40 OZ User Data Store Manual return result.tostring(); /** * commit all data actions * * called after all data action transactions are successfully completed. * 3.0 */ public void commit() throws OZUserDataStoreException if(defaultuserdatastore.log) log("############### commit ##################"); try conn.commit(); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public boolean iscommitavailable() throws OZUserDataStoreException return true; /** * * rollback all data actions * * called if exception occured while doing data actions. * 3.0 */ public void rollback() throws OZUserDataStoreException 40 FORCS Co., LTD

41 A Leader of Enterprise e-business Solution if(defaultuserdatastore.log) log("############### rollback ##################"); try conn.rollback(); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public boolean isrollbackavailable() throws OZUserDataStoreException return true;,,. ODI DefaultOZFrameworkUDS.class.. FORCS Co., LTD 41

42 OZ User Data Store Manual ( ).,,. insert into CarSales (#@ARG_SF1#,#@ARG_SF2#,#@ARG_SF3#,#@ARG_SF4#,#@ARG_SF5#,#@ARG_SF6#) values ('#@ARG_SV1#','#@ARG_SV2#','#@ARG_SV3#','#@ARG_SV4#','#@ARG_SV5#','#@AR G_SV6#') DELETE FROM CarSales WHERE #@ARG_DF1# = '#@ARG_DV1#' UPDATE CarSales SET #@ARG_SF1# = '#@ARG_SV1#', #@ARG_SF2# = '#@ARG_SV2#', #@ARG_SF3# = '#@ARG_SV3#', #@ARG_SF4# = '#@ARG_SV4#', #@ARG_SF5# = '#@ARG_SV5#', #@ARG_SF6# = '#@ARG_SV6#' WHERE #@ARG_DF1# = '#@ARG_DV1#' ODI. "class2_1.odi". 42 FORCS Co., LTD

43 A Leader of Enterprise e-business Solution "class2_1.odi". Board "AllowInsert", "AllowDelete", "AllowUpdate" "True", "CellSelectionMode" "Single", "ODIKey" "class2_1", "DataSet" "SET_1". "#OZDeleteFlag#" "ColumnEditable" "True". FORCS Co., LTD 43

44 OZ User Data Store Manual Board OnClick DataAction. Table1.CommitQueuedActions(); Table1.GetDataSet().RefreshDataSet();,. DataAction. 44 FORCS Co., LTD

45 A Leader of Enterprise e-business Solution. Delete,. [Commit DataAction] DataAction. FORCS Co., LTD 45

46 OZ User Data Store Manual - DataAction UDS DataAction oz.uds.ozframeworkdatastore. oz.uds.ozframeworkdatastore. UDS OZUDSDataActionRef. OZFrameworkDataStore insert/delete/update/commit int OZUDSDataActionRef insert/delete/update/commit String OZUDSDataActionRef. oz.uds.ozudsdataactionref package oz.uds; import java.util.hashtable; public interface OZUDSDataActionRef extends OZUserDataStore 46 FORCS Co., LTD

47 A Leader of Enterprise e-business Solution /** * insert a row. * * it can be implemented as following SQL like logic. * * INSERT INTO 'table' (src_fields[0], field_namses[1],...) * VALUES(src_values[0], src_value[1],...) * * extra arugment can be used to convert spacial types (TO_DATE etc) or * modify data. * src_fields * field name array. * it's size varies from 0 to the number of fields in the table. src_values * the target row's field data array faired with 'src_fields'. * it's size can be 0 to the number of fields in the table. ext * extra argument if needs. param * Field name and value of Parameter and MasterSet * number of inserted rows. (always 1 if normal) OZUserDataStoreException 3.0 */ public abstract String insertrow(string cmd, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException; /** * delete row(s). * * it can be implemented as following SQL like logic. * * DELETE FROM 'table' WHERE dst_fields[0] = dst_values[0] * AND dst_fields[1] = dst_values[1] * AND... * AND extra condition * dst_fields * field name array. * it's size varies from 0 to the number of fields in the table. FORCS Co., LTD 47

48 OZ User Data Store Manual dst_values * the target row's field data array faired with 'field_names'. * it's size can be 0 to the number of fields in the table. * the type of value is one of following. * * [Java types] [SQL types] * java.io.inputstream BINARY VARBINARY LONGVARBINARY BLOB * java.lang.string CHAR LONGVARCHAR VARCHAR CLOB * java.sql.date DATE * java.sql.time TIME * java.sql.timestamp TIMESTAMP * java.lang.integer SMALLINT TUNYINT INTEGER * java.lang.double BIGINT FLOAT DOUBLE REAL NUMERIC DECIMAL * java.lang.boolean BIT * ext * extra condition if needs. param * Field name and value of Parameter and MasterSet * number of deleted rows. OZUserDataStoreException 3.0 */ public abstract String deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext, Hashtable param) throws OZUserDataStoreException; /** * update row(s). * * it can be implemented as following SQL like logic. * * UPDATE 'table' SET src_fields[0] = src_values[0], * src_field[1] = src_values[1], *... * WHERE dst_fields[0] = dst_values[0] * AND dst_fields[1] = dst_values[1] * AND... * AND ext * * extra arugment can be used to convert spacial types (TO_DATE etc) or * modify data. 48 FORCS Co., LTD

49 A Leader of Enterprise e-business Solution * dst_fields * destination row's field name array. * it's size varies from 0 to the number of fields in the table. dst_values * destination row's field data array faired with 'dst_fields'. * it's size can be 0 to the number of fields in the table. src_fields * the source field name array to update. * it's size varies from 0 to the number of fields in the table. src_values * the source field data array aligned with 'dst_fields' to update. * it's size can be 0 to the number of fields in the table. argument * extra argument if needs. param * Field name and value of Parameter and MasterSet * number of updated rows. OZUserDataStoreException 3.0 */ public abstract String updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException; /** * commit all data actions * * called after all data action transactions are successfully completed. * 3.0 */ public abstract String commit() throws OZUserDataStoreException; /** * rollback all data actions * * called if exception occured while doing data actions. * 3.0 FORCS Co., LTD 49

50 OZ User Data Store Manual */ public abstract void rollback() throws OZUserDataStoreException; insertrow Prototype Definition public abstract String insertrow(string cmd, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException. Argument cmd src_fields src_values ext param Array Array (OZMap ) deleterow Prototype Definition public abstract String deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext, Hashtable param) throws OZUserDataStoreException. Argument cmd dst_fields dst_values ext param Array Array (OZMap ) updaterow Prototype Definition public abstract String updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException. Argument cmd 50 FORCS Co., LTD

51 A Leader of Enterprise e-business Solution dst_fields dst_values src_fields src_values ext param Array Array Array Array (OZMap ) commit Prototype Definition public abstract String commit() throws OZUserDataStoreException DataAction Commit(). rollback Prototype Definition public abstract void rollback() throws OZUserDataStoreException Commit rollback. OZMap insertrow, deleterow, updaterow Hashtable param OZMap. OZMap. Key[String] : Set, Value[OZMap] : Set (FieldName, FieldValue) OZMap Map Key. OZMap. clear Prototype Definition public synchronized void clear() Map. containskey Prototype public synchronized boolean containskey(object key) FORCS Co., LTD 51

52 OZ User Data Store Manual Definition Map Key. Key true. Argument key Key containsvalue Prototype Definition public boolean containsvalue(object value) Map. true. Argument value elements Prototype Definition public Iterator elements() Map Value Iterator. get Prototype Definition public Object get(object key) Key. Key null. Argument key Key isempty Prototype Definition public boolean isempty() Map, true. keys Prototype Definition public Iterator keys() Map Key Iterator. put Prototype Definition public synchronized void put(object key, Object value) throws IllegalArgumentException Map Key. Argument key Map Key 52 FORCS Co., LTD

53 A Leader of Enterprise e-business Solution value Key remove Prototype public synchronized Object remove(object key) Map Key, Key Definition. Argument key Key size Prototype Definition public int size() Map Key Set. tostring Prototype Definition public String tostring() Key String. OZUDSDataActionRef UDS Example - UDSDataActionMARef.java.java package oz.uds.appexample; import java.util.*; import oz.uds.*; import oz.uds.basic.*; import oz.util.ozmap; /** * <p>title: </p> * <p>description: </p> * <p>copyright: Copyright (c) 2003</p> * <p>company: </p> not attributable 1.0 */ public class UDSDataActionMARef extends JDBCBasedUDS implements OZUDSDataActionRef public void init() FORCS Co., LTD 53

54 OZ User Data Store Manual throws OZUserDataStoreException super.init(); DefaultUserDataStore.log = true; public String getjdbcname() return "sun.jdbc.odbc.jdbcodbcdriver"; public String getjdbcurl() return "jdbc:odbc:appexample"; public String insertrow(string cmd, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : insertrow \n"); info.append("cmd :" + cmd + "\n"); for(int i=0; i<src_fields.length; i++) info.append("sf"+i+"["+src_fields[i]+"] :" + src_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); Enumeration sets = param.keys(); String key = null; while(sets.hasmoreelements()) key = (String)sets.nextElement(); OZMap map = (OZMap)param.get(key); Iterator iterk = map.keys(); Iterator iterv = map.elements(); while(iterk.hasnext() && iterv.hasnext()) info.append("[" + key + "] "+iterk.next()+":" +iterv.next()+"\n"); info.append(" \n"); System.out.println(info.toString()); try //insert Action 54 FORCS Co., LTD

55 A Leader of Enterprise e-business Solution return "insert:"+stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) throw new OZUserDataStoreException(sqlexception.getMessage()); public String deleterow(string cmd, String[] dst_fields, Object[] dst_values, String ext, Hashtable param) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : deleterow \n"); info.append("cmd :" + cmd + "\n"); for(int i=0; i<dst_fields.length; i++) info.append("df"+i+"["+dst_fields[i]+"] :" + dst_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); Enumeration sets = param.keys(); String key = null; while(sets.hasmoreelements()) key = (String)sets.nextElement(); OZMap map = (OZMap)param.get(key); Iterator iterk = map.keys(); Iterator iterv = map.elements(); while(iterk.hasnext() && iterv.hasnext()) info.append("[" + key + "] "+iterk.next()+":" +iterv.next()+"\n"); info.append(" \n"); System.out.println(info.toString()); try //delete Action return "delete:"+stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); FORCS Co., LTD 55

56 OZ User Data Store Manual public String updaterow(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext, Hashtable param) throws OZUserDataStoreException StringBuffer info = new StringBuffer(); info.append("test_dac_uds : updaterow \n"); info.append("cmd :" + cmd + "\n"); for(int i=0; i<src_fields.length; i++) info.append("sf"+i+"["+src_fields[i]+"] :" + src_values[i] + "\n"); for(int i=0; i<dst_fields.length; i++) info.append("df"+i+"["+dst_fields[i]+"] :" + dst_values[i] + "\n"); info.append("ext :" + ext + "\n\n"); Enumeration sets = param.keys(); String key = null; while(sets.hasmoreelements()) key = (String)sets.nextElement(); OZMap map = (OZMap)param.get(key); Iterator iterk = map.keys(); Iterator iterv = map.elements(); while(iterk.hasnext() && iterv.hasnext()) info.append("[" + key + "] "+iterk.next()+":" +iterv.next()+"\n"); info.append(" \n"); System.out.println(info.toString()); try //update Action return "update:"+stmt.executeupdate(cmd); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); 56 FORCS Co., LTD

57 A Leader of Enterprise e-business Solution public boolean isinsertrowavailable() return true; public String insertcommand(string cmd, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer result = new StringBuffer("INSERT INTO " + ext + "("); for( int i = 0; i < src_fields.length; i++) if (i == (src_fields.length-1)) result.append(src_fields[i]); else result.append(src_fields[i]).append(", "); result.append(") VALUES ( "); for( int i = 0; i < src_values.length; i++) if (i == (src_values.length-1)) result.append(src_values[i]); else result.append(src_values[i]).append(", "); return result.append(")").tostring(); public boolean isdeleterowavailable() return true; public String deletecommand(string cmd, String[] dst_fields, Object[] dst_values, String ext) throws OZUserDataStoreException FORCS Co., LTD 57

58 OZ User Data Store Manual StringBuffer result = new StringBuffer("DELETE FROM " + ext + " WHERE "); for( int i = 0; i < dst_fields.length; i++) if (i == 0) result.append(dst_fields[i]).append(" = ").append(dst_values[i]); else result.append(" AND ").append(dst_fields[i]).append(" = ").append(dst_values[i]); return result.tostring(); public boolean isupdaterowavailable() return true; public String updatecommand(string cmd, String[] dst_fields, Object[] dst_values, String[] src_fields, Object[] src_values, String ext) throws OZUserDataStoreException StringBuffer result = new StringBuffer("UPDATE " + ext + " SET "); for( int i = 0; i < src_fields.length; i++) if (i == (src_fields.length-1)) result.append(src_fields[i]).append(" = ").append(src_values[i]); else result.append(src_fields[i]).append(" = ").append(src_values[i]).append(", "); result.append(" WHERE "); for( int i = 0; i < dst_fields.length; i++) if (i == 0) result.append(dst_fields[i]).append(" = ").append(dst_values[i]); 58 FORCS Co., LTD

59 A Leader of Enterprise e-business Solution else result.append(" AND ").append(dst_fields[i]).append(" = ").append(dst_values[i]); return result.tostring(); /** * commit all data actions * * called after all data action transactions are successfully completed. * 3.0 */ public String commit() throws OZUserDataStoreException if(defaultuserdatastore.log) log("############### commit ##################"); try conn.commit(); return "commit"; catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public boolean iscommitavailable() throws OZUserDataStoreException return true; /** * * rollback all data actions FORCS Co., LTD 59

60 OZ User Data Store Manual * * called if exception occured while doing data actions. * 3.0 */ public void rollback() throws OZUserDataStoreException if(defaultuserdatastore.log) log("############### rollback ##################"); try conn.rollback(); catch(java.sql.sqlexception sqlexception) if(defaultuserdatastore.log) sqlexception.printstacktrace(defaultuserdatastore.ps); throw new OZUserDataStoreException(sqlexception.getMessage()); public boolean isrollbackavailable() throws OZUserDataStoreException return true;,,. ODI UDSDataActionMARef.class. 60 FORCS Co., LTD

61 A Leader of Enterprise e-business Solution. ( )... FORCS Co., LTD 61

62 OZ User Data Store Manual (. ) []. MASTER DETAIL - 62 FORCS Co., LTD

63 A Leader of Enterprise e-business Solution DETAIL "" "MASTER". DETAIL,,. INSERT INTO ECustomer ( #@ARG_SF1#, #@ARG_SF2#, #@ARG_SF3#, #@ARG_SF4#, #@ARG_SF5#, #@ARG_SF6#, #@ARG_SF7#, country ) VALUES ( #@ARG_SV1#, '#@ARG_SV2#', '#@ARG_SV3#', '#@ARG_SV4#', '#@ARG_SV5#', '#@ARG_SV6#', '#@ARG_SV7#', '#MASTER.country#' ) DELETE FROM ECustomer WHERE #@ARG_DF1# = #@ARG_DV1# and country = '#MASTER.country#' UPDATE ECustomer SET #@ARG_SF2# = '#@ARG_SV2#', #@ARG_SF3# = '#@ARG_SV3#', #@ARG_SF4# = '#@ARG_SV4#', #@ARG_SF5# = '#@ARG_SV5#', #@ARG_SF6# = '#@ARG_SV6#', #@ARG_SF7# = '#@ARG_SV7#' WHERE #@ARG_DF1# = #@ARG_DV1# and country = '#MASTER.country#' ODI. "class2_2.odi" FORCS Co., LTD 63

64 OZ User Data Store Manual. "class2_2.odi". Board "ODIKey" "class2_2", "DataSet" "MASTER", "Field" "country", "FireRowCursorChange" "True". Board "AllowInsert", "AllowDelete", "AllowUpdate" "True", "CellSelectionMode" "Single", "ODIKey" "class2_2", "DataSet" "DETAIL". "#OZDeleteFlag#" "ColumnEditable" "True". 64 FORCS Co., LTD

65 A Leader of Enterprise e-business Solution Board OnClick DataAction. var Result = Table1.CommitQueuedActions(); _MessageBox(Result); Table1.GetDataSet().RefreshDataSet();,,. DataAction. FORCS Co., LTD 65

66 OZ User Data Store Manual. Delete,. [Commit DataAction] DataAction DataAction. 66 FORCS Co., LTD

67 A Leader of Enterprise e-business Solution FORCS Co., LTD 67

68 OZ User Data Store Manual UDS. oz.uds.ozudsparameterref. oz.uds.ozudsparameterref getparamters(), setparameters(), java.util.hashtable. oz.uds.ozudsparameterref package oz.uds; import java.util.hashtable; /** * Description: UDS DataModule * Parameter UDS interface */ public interface OZUDSParameterRef /** * Hashtable. parameter hashtable */ public Hashtable getparameters(); /** *. parameters Hashtable */ public void setparameters(hashtable parameters); getparameters Prototype Definition public Hashtable getparameters() Hashtable. setparameters Prototype Definition public void setparameters(hashtable parameters) Hashtable. 68 FORCS Co., LTD

69 A Leader of Enterprise e-business Solution Argument parameters Hashtable OZUDSParameterRef UDSParamStore Example - UDSParamStore.java package uds; import java.sql.resultset; import java.util.enumeration; import java.util.hashtable; import oz.uds.*; import oz.uds.basic.*; public class UDSParamStore extends DefaultUserDataStore implements OZUDSParameterRef private Hashtable m_parameters; static log = true; public UDSParamStore() m_parameters = new Hashtable(); public synchronized void init() public ResultSet getresultset(string argument) throws OZUserDataStoreException try m_parameters.put("command", argument); return new UDSParamResultSet(m_parameters); catch(exception ex) ex.printstacktrace(); throw new OZUserDataStoreException(ex.getMessage()); public void freeresultset(resultset resultset) FORCS Co., LTD 69

70 OZ User Data Store Manual public void close() m_parameters.clear(); public Hashtable getparameters() return m_parameters; public void setparameters(hashtable parameters) m_parameters = new Hashtable(); String key = ""; Enumeration keys = parameters.keys(); while(keys.hasmoreelements()) key = (String) keys.nextelement(); m_parameters.put(key, parameters.get(key)); public synchronized Object getrawdata(string command) throws OZUserDataStoreException return null; DefaultResultSet UDSParamResultSet Example - UDSParamResultSet.java package uds; import java.sql.resultsetmetadata; import java.sql.sqlexception; import java.util.*; import oz.uds.resultsetmetaskeleton; import oz.uds.rs.defaultresultset; public class UDSParamResultSet extends DefaultResultSet private Vector field1; private Vector field2; private int rowno; 70 FORCS Co., LTD

71 A Leader of Enterprise e-business Solution public UDSParamResultSet(Hashtable param) field1 = new Vector(); field2 = new Vector(); String f1 = ""; Object f2 = new Object(); for(enumeration enum = param.keys(); enum.hasmoreelements(); field2.add(f2!= null? f2 : "")) f1 = (String)enum.nextElement(); f2 = param.get(f1); System.out.println("[KEY:" + f1 + ", VALUE:" + f2 + "]"); field1.add(f1); rowno = -1; public boolean next() return ++rowno < field1.size(); public ResultSetMetaData getmetadata() throws SQLException return new ResultSetMetaSkeleton(new String[] "KEY", "VALUE", new String[] "VARCHAR", "VARCHAR" ); public String getstring(int col) switch(col) case 1: // '\001' return (String)field1.elementAt(rowNo); case 2: // '\002' return (String)field2.elementAt(rowNo); return "NO DATA"; FORCS Co., LTD 71

72 OZ User Data Store Manual public String getstring(string field) if(field == null) return "NO DATA"; if(field.equalsignorecase("key")) return getstring(1); if(field.equalsignorecase("value")) return getstring(2); else return "NO DATA"; UDSParamStore. ODI [ ]. "Parameter_City" "Parameter_Gender", "Canada" "F". 72 FORCS Co., LTD

73 A Leader of Enterprise e-business Solution UDSParamStore.class.. select * from ECustomer where city = "#OZParam.Parameter_City#" and gender = "#OZParam.Parameter_Gender#",. FORCS Co., LTD 73

74 OZ User Data Store Manual ODI. "class3_1.odi". "class3_1.odi". "ODI " "class3_1", "" "SET_1". "SET_1" "KEY" "VALUE" &. 74 FORCS Co., LTD

75 A Leader of Enterprise e-business Solution, (command). FORCS Co., LTD 75

76 OZ User Data Store Manual WAS Request UDS HttpRequest oz.uds.ozudsservletref. oz.uds.ozudsservletref oz.uds.ozuserdatastore init() setservlet() sethttprequest(). oz.uds.ozudsservletref package oz.uds; import javax.servlet.*; import javax.servlet.http.*; public interface OZUDSServletRef public void setservlet(httpservlet http_servlet); public void sethttprequest(httpservletrequest http_request); setservlet Prototype Definition public void setservlet(httpservlet http_servlet) UDS HttpServlet. Argument http_servlet http_servlet sethttprequest Prototype Definition public void sethttprequest(httpservletrequest http_request) UDS HttpRequest. Argument http_request http_request OZUDSServletRef UDSSample Example - OZUDSSample.java package oz.uds; import java.sql.*; import javax.servlet.*; 76 FORCS Co., LTD

77 A Leader of Enterprise e-business Solution import javax.servlet.http.*; import java.util.hashtable; import java.util.*; public class OZUDSSample implements OZUserDataStore, OZUDSServletRef, OZUDSParameterRef HttpServlet http_servlet = null; HttpServletRequest http_request = null; // methods from OZUDSServletRef public void setservlet(httpservlet http_servlet) System.out.println("http_servlet=="+http_servlet.toString()); this.http_servlet = http_servlet; public void sethttprequest(httpservletrequest http_request) System.out.println("http_request=="+http_request.toString()); this.http_request = http_request; public void setparameters(hashtable args) public Hashtable getparameters() return null; // methods from OZUserDataStore public void init() throws OZUserDataStoreException // user my_servlet & my_request public ResultSet getresultset(string argument) throws OZUserDataStoreException // return a data Vector field1 = new Vector(); Vector field2 = new Vector(); // request record add. if (http_request!= null) Enumeration enum = http_request.getparameternames(); while (enum.hasmoreelements()) String temp = (String) enum.nextelement(); System.out.println("name=" + temp + " value=" + FORCS Co., LTD 77

78 OZ User Data Store Manual http_request.getparameter(temp)); field1.add(temp); field2.add(http_request.getparameter(temp)); else System.out.println("http_request is null."); return new OZUDSSampleResultSet(field1, field2); public void freeresultset(resultset rst) // release resource for specific ResultSet public void close() // release all resource Servelt OZUDSSampleResultSet Example - OZUDSSampleResultSet.java package oz.uds; import java.sql.resultsetmetadata; import java.sql.sqlexception; import java.util.*; import oz.uds.resultsetmetaskeleton; import oz.uds.rs.defaultresultset; import javax.servlet.*; import javax.servlet.http.*; public class OZUDSSampleResultSet extends DefaultResultSet private Vector field1; private Vector field2; private int rowno; public OZUDSSampleResultSet(Vector value, Vector value2) field1 = value; field2 = value2; rowno = -1;//field1.size()-2; 78 FORCS Co., LTD

79 A Leader of Enterprise e-business Solution public boolean next() return ++rowno < field1.size(); public ResultSetMetaData getmetadata() throws SQLException return new ResultSetMetaSkeleton(new String[] "KEY", "VALUE", new String[] "VARCHAR", "VARCHAR" ); public String getstring(int col) switch(col) case 1: // '\001' return (String)field1.elementAt(rowNo); case 2: // '\002' return (String)field2.elementAt(rowNo); return "NO DATA"; public String getstring(string field) if(field == null) return "NO DATA"; if(field.equalsignorecase("key")) return getstring(1); if(field.equalsignorecase("value")) return getstring(2); else return "NO DATA"; Connection UDS FORCS Co., LTD 79

80 OZ User Data Store Manual. ODI OZUDSSample.class.. ( ). ODI. "class4_1.odi". "class4_1.odi". "ODI " "class4_1", "" "SET_1". 80 FORCS Co., LTD

untitled

untitled OZ User Data Store Manual OZ User Data Store Manual,,,,, DataAction,, Http Request.. DLL DLL lib launch.cfg. // lib OZUDSSample_Csharp.dll, OZUDSSample_VBNET.dll lib. // config assembly.properties OZUDSSample_Csharp.dll,

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

untitled

untitled OZ Framework Manual OZ Framework... 2 POST... 3 DataModule POST... 3 FXDataModule POST Custom... 5 Servlet API (for OZ Java Server)... 12 DataModuleFactory... 12 DataModule... 13 FXDataModule... 19 Servlet

More information

untitled

untitled OZ Framework Manual OZ Framework... 2 POST... 3 DataModule POST... 3 FXDataModule POST Custom... 5 Servlet API (for OZ Java Server)... 12 DataModuleFactory... 12 DataModule... 13 FXDataModule... 19...

More information

10.ppt

10.ppt : SQL. SQL Plus. JDBC. SQL >> SQL create table : CREATE TABLE ( ( ), ( ),.. ) SQL >> SQL create table : id username dept birth email id username dept birth email CREATE TABLE member ( id NUMBER NOT NULL

More information

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r Jakarta is a Project of the Apache

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

歯JavaExceptionHandling.PDF

歯JavaExceptionHandling.PDF (2001 3 ) from Yongwoo s Park Java Exception Handling Programming from Yongwoo s Park 1 Java Exception Handling Programming from Yongwoo s Park 2 1 4 11 4 4 try/catch 5 try/catch/finally 9 11 12 13 13

More information

14-Servlet

14-Servlet JAVA Programming Language Servlet (GenericServlet) HTTP (HttpServlet) 2 (1)? CGI 3 (2) http://jakarta.apache.org JSDK(Java Servlet Development Kit) 4 (3) CGI CGI(Common Gateway Interface) /,,, Client Server

More information

교육2 ? 그림

교육2 ? 그림 Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting Started 'OZ

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started (ver 5.1) 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

FileMaker ODBC 및 JDBC 가이드

FileMaker ODBC 및 JDBC 가이드 FileMaker ODBC JDBC 2004-2019 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker, FileMaker Cloud, FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker,

More information

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

NoSQL

NoSQL MongoDB Daum Communications NoSQL Using Java Java VM, GC Low Scalability Using C Write speed Auto Sharding High Scalability Using Erlang Read/Update MapReduce R/U MR Cassandra Good Very Good MongoDB Good

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

@OneToOne(cascade = = addr_id) private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a 1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1

More information

Chap12

Chap12 12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)

More information

J2EE Concepts

J2EE Concepts ! Introduction to J2EE (1) - J2EE Servlet/JSP/JDBC iseminar.. 1544-3355 ( ) iseminar Chat. 1 Who Are We? Business Solutions Consultant Oracle Application Server 10g Business Solutions Consultant Oracle10g

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

개발문서 Oracle - Clob

개발문서 Oracle - Clob 개발문서 ORACLE CLOB 2008.6.9 ( 주 ) 아이캔매니지먼트 개발팀황순규 0. clob개요 1. lob과 long의비교와 clob와 blob 2. 테이블생성쿼리 ( 차이점-추가사항 ) 3. select 쿼리 4. insert 쿼리및 jdbc프로그래밍 5. update 쿼리및 jdbc프로그래밍 (4, 5). putclobdata() 클래스 6. select

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

歯Writing_Enterprise_Applications_2_JunoYoon.PDF

歯Writing_Enterprise_Applications_2_JunoYoon.PDF Writing Enterprise Applications with Java 2 Platform, Enterprise Edition - part2 JSTORM http//wwwjstormpekr Revision Document Information Document title Writing Enterprise Applications

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 00앞부속 IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information

09-interface.key

09-interface.key 9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

Java XPath API (한글)

Java XPath API (한글) XML : Elliotte Rusty Harold, Adjunct Professor, Polytechnic University 2006 9 04 2006 10 17 문서옵션 제안및의견 XPath Document Object Model (DOM). XML XPath. Java 5 XPath XML - javax.xml.xpath.,? "?"? ".... 4.

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

chapter6.doc

chapter6.doc Chapter 6. http..? ID. ID....... ecrm(ebusiness )., ecrm.. Cookie.....,. 20, 300 4. JSP. Cookie API javax.servlet.http. 3. 1. 2. 3. API. Cookie(String name, String value). name value. setxxx. getxxx. public

More information

KYO_SCCD.PDF

KYO_SCCD.PDF 1. Servlets. 5 1 Servlet Model. 5 1.1 Http Method : HttpServlet abstract class. 5 1.2 Http Method. 5 1.3 Parameter, Header. 5 1.4 Response 6 1.5 Redirect 6 1.6 Three Web Scopes : Request, Session, Context

More information

자바GUI실전프로그래밍2_장대원.PDF

자바GUI실전프로그래밍2_장대원.PDF JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

Modern Javascript

Modern Javascript ES6 - Arrow Function Class Template String Destructuring Default, Rest, Spread let, const for..of Promises Module System Map, Set * Generator * Symbol * * https://babeljs.io/ Babel is a JavaScript compiler.

More information

교육자료

교육자료 THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

Analyze Connection Failover Options.ppt

Analyze Connection Failover Options.ppt Analyze Connection Failover options 1 TAF 를구현하기위한 Application 고려사항 1. Application FailOver 방법결정 2. Application의사용형태, 종류, 중요도에따라 TAF적용여부결정 3. Language별, 사용형태별 TAF사용여부및방법결정 4. Transaction에따른장애시점별 TAF 사용여부및방법결정

More information

Spring Data JPA Many To Many 양방향 관계 예제

Spring Data JPA Many To Many 양방향 관계 예제 Spring Data JPA Many To Many 양방향관계예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) 엔티티매핑 (Entity Mapping) M : N 연관관계 사원 (Sawon), 취미 (Hobby) 는다 : 다관계이다. 사원은여러취미를가질수있고, 하나의취미역시여러사원에할당될수있기때문이다. 보통관계형 DB 에서는다 : 다관계는 1

More information

IBM blue-and-white template

IBM blue-and-white template IBM Software Group 웹기반의 DB2 개발환경구축및 DB2 Information Integrator 를이용한정보통합데모 한국 IBM 소프트웨어사업부 정진영대리 (jyjeong@kr.ibm.com) Agenda Preparation JAVA ENV JAVA CONNECTION PHP ENV PHP CONNECTION Preparation Installation

More information

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공 메신저의새로운혁신 채팅로봇 챗봇 (Chatbot) 입문하기 소 이 메 속 : 시엠아이코리아 름 : 임채문 일 : soulgx@naver.com 1 목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper

More information

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사) Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while

More information

JavaGeneralProgramming.PDF

JavaGeneralProgramming.PDF , Java General Programming from Yongwoo s Park 1 , Java General Programming from Yongwoo s Park 2 , Java General Programming from Yongwoo s Park 3 < 1> (Java) ( 95/98/NT,, ) API , Java General Programming

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

Chap7.PDF

Chap7.PDF Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

- 다음은 Statement 객체를사용해서삽입 (insert) 작업의예 String sql = "insert into member(code, name, id, pwd, age) values ("; int id = 10; sql = sql + id +, ;// 항목사이에

- 다음은 Statement 객체를사용해서삽입 (insert) 작업의예 String sql = insert into member(code, name, id, pwd, age) values (; int id = 10; sql = sql + id +, ;// 항목사이에 Statement 객체와 PreparedStatement 객체 Connection 객체 - Connection 객체가생성되면데이터베이스에접근이가능해진다. - Connection 객체는자바와데이터베이스의접속된상태의객체를말한다. 데이터베이스에 DML작업을위해서는반드시접속을먼저해야한다. 그리고, 작업후에는반드시접속을해제한다. - Connection 객체를생성할때두개의문자열이필요하다.

More information

Microsoft PowerPoint - 18-DataSource.ppt

Microsoft PowerPoint - 18-DataSource.ppt 18 장 : JDBC DataSource DataSource JDBC 2.0의 javax.sql 패키지에포함되어도입됨 DataSource 인터페이스는데이터베이스커넥션을만들거나사용하는데좀더유연한아키텍처를제공하기위해도입됨 DataSource를이용할경우, 클라이언트코드는한줄도바꾸지않고서도다른데이터베이스에접속할수있도록해줌 즉 DataSource 는커넥션상세사항들을캡슐화

More information

untitled

untitled PowerBuilder 連 Microsoft SQL Server database PB10.0 PB9.0 若 Microsoft SQL Server 料 database Profile MSS 料 (Microsoft SQL Server database interface) 行了 PB10.0 了 Sybase 不 Microsoft 料 了 SQL Server 料 PB10.0

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O Orange for ORACLE V4.0 Installation Guide ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE...1 1....2 1.1...2 1.2...2 1.2.1...2 1.2.2 (Online Upgrade)...11 1.3 ORANGE CONFIGURATION ADMIN...12 1.3.1 Orange Configuration

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

04장

04장 20..29 1: PM ` 199 ntech4 C9600 2400DPI 175LPI T CHAPTER 4 20..29 1: PM ` 200 ntech4 C9600 2400DPI 175LPI T CHAPTER 4.1 JSP (Comment) HTML JSP 3 home index jsp HTML JSP 15 16 17 18 19 20

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

초보자를 위한 자바 2 21일 완성 - 최신개정판

초보자를 위한 자바 2 21일 완성 - 최신개정판 .,,.,. 7. Sun Microsystems.,,. Sun Bill Joy.. 15... ( ), ( )... 4600. .,,,,,., 5 Java 2 1.4. C++, Perl, Visual Basic, Delphi, Microsoft C#. WebGain Visual Cafe, Borland JBuilder, Sun ONE Studio., Sun Java

More information

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에 개념정리및샘플예제 EJB stateful sample 문서 2016. 01. 14 목차 JEUS EJB Session Bean가이드... 3 1. stateful session bean... 3 1.1 stateful sample 가이드... 3 1.1.1 sample source... 3 1.1.2 결과확인... 6 1.2 http session에서사용하기...

More information

chapter1,2.doc

chapter1,2.doc JavaServer Pages Version 08-alpha copyright2001 B l u e N o t e all rights reserved http://jspboolpaecom vesion08-alpha, UML (?) part1part2 Part1 part2 part1 JSP Chapter2 ( ) Part 1 chapter 1 JavaServer

More information

자바 프로그래밍

자바 프로그래밍 5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159

More information

자바-11장N'1-502

자바-11장N'1-502 C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일 Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 Introduce Me!!! Job Jeju National University Student Ubuntu Korean Jeju Community Owner E-Mail: ned3y2k@hanmail.net Blog: http://ned3y2k.wo.tc Facebook: http://www.facebook.com/gyeongdae

More information

8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 )

8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 ) 8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 ) - DDL(Data Definition Language) : show, create, drop

More information

Java

Java Java http://cafedaumnet/pway Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength();

More information

Microsoft Word - [Unioneinc] 특정컬럼의 통계정보 갱신_ _ldh.doc

Microsoft Word - [Unioneinc] 특정컬럼의 통계정보 갱신_ _ldh.doc 특정 Column 통계정보갱신가이드 유니원아이앤씨 DB 사업부이대혁 2015 년 03 월 02 일 문서정보프로젝트명서브시스템명 버전 1.0 문서명 특정 Column 통계정보갱신가이드 작성일 2015-03-02 작성자 DB사업부이대혁사원 최종수정일 2015-03-02 문서번호 UNIONE-201503021500-LDH 재개정이력 일자내용수정인버전 문서배포이력

More information

1

1 A Leader of Enterprise e-business Solution FORCS Co., LTD 1 WAS WebSphere SilverStream Apache Jserv Tomcat Resin Inprise Application Server BES Oracel OC4J(ORION) HPAS(Bluestone)8 JRun EAServer JEUS 3.0

More information

ch09

ch09 9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced

More information

Microsoft PowerPoint - GUI _DB연동.ppt [호환 모드]

Microsoft PowerPoint - GUI _DB연동.ppt [호환 모드] GUI 설계 6 주차 DB 연동김문정 tops@yd.ac.kr 강의순서강의전환경 JDK 설치및환경설정톰캣설치및환경설정이클립스 (JEE) 설치및환경설정 MySQL( 드라이버 ) 설치및커넥터드라이브연결 DB 생성 - 계정생성이클립스에서 DB에연결서버생성 - 프로젝트생성 DB연결테이블생성및등록 2 MySQL 설치확인 mysql - u root -p MySQL 에데이터베이스추가

More information

mytalk

mytalk 한국정보보호학회소프트웨어보안연구회 총괄책임자 취약점분석팀 안준선 ( 항공대 ) 도경구 ( 한양대 ) 도구개발팀도경구 ( 한양대 ) 시큐어코딩팀 오세만 ( 동국대 ) 전체적인 그림 IL Rules Flowgraph Generator Flowgraph Analyzer 흐름그래프 생성기 흐름그래프 분석기 O parser 중간언어 O 파서 RDL

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 ALTIBASE HDB 6.5.1.5.10 Patch Notes 목차 BUG-46183 DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG-46249 [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 BUG-46266 [sm]

More information

Microsoft PowerPoint - lec2.ppt

Microsoft PowerPoint - lec2.ppt 2008 학년도 1 학기 상지대학교컴퓨터정보공학부 고광만 강의내용 어휘구조 토큰 주석 자료형기본자료형 참조형배열, 열거형 2 어휘 (lexicon) 어휘구조와자료형 프로그램을구성하는최소기본단위토큰 (token) 이라부름문법적으로의미있는최소의단위컴파일과정의어휘분석단계에서처리 자료형 자료객체가갖는형 구조, 개념, 값, 연산자를정의 3 토큰 (token) 정의문법적으로의미있는최소의단위예,

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

13ÀåÃß°¡ºÐ

13ÀåÃß°¡ºÐ 13 CHAPTER 13 CHAPTER 2 3 4 5 6 7 06 android:background="#ffffffff"> 07

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

TITLE

TITLE CSED421 Database Systems Lab MySQL Basic Syntax SQL DML & DDL Data Manipulation Language SELECT UPDATE DELETE INSERT INTO Data Definition Language CREATE DATABASE ALTER DATABASE CREATE TABLE ALTER TABLE

More information

ETL_project_best_practice1.ppt

ETL_project_best_practice1.ppt ETL ETL Data,., Data Warehouse DataData Warehouse ETL tool/system: ETL, ETL Process Data Warehouse Platform Database, Access Method Data Source Data Operational Data Near Real-Time Data Modeling Refresh/Replication

More information

5장.key

5장.key JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!

More information

03-JAVA Syntax(2).PDF

03-JAVA Syntax(2).PDF JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute

More information

DocsPin_Korean.pages

DocsPin_Korean.pages Unity Localize Script Service, Page 1 Unity Localize Script Service Introduction Application Game. Unity. Google Drive Unity.. Application Game. -? ( ) -? -?.. 준비사항 Google Drive. Google Drive.,.. - Google

More information

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT 3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT NOT NULL, FOREIGN KEY (parent_id) REFERENCES Comments(comment_id)

More information