untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 OZ Framework Manual OZ Framework... 2 POST... 3 DataModule POST... 3 FXDataModule POST Custom... 5 Servlet API (for OZ Java Server) DataModuleFactory DataModule FXDataModule Servlet API (for OZ.Net Server) FXDataModule Servlet API : Application : Application - DataAction : Report : XML SDM : FXDataModule... 76

2 OZ Framework User's Guide OZR, OZA OZ Framework OZR, OZA., (Fetch Unit). ODI 3 (fetchunit=dm_per_dataset), (fetchunit=dm_per_datamodule) ODI. URL ODI, POST URL. URL,, DataAction DataAction POST URL. DataAction "ok" "success". POST "POST ". OZ Framework ODI DB (UDS) FXDataModule. 2 FORCS Co., LTD

3 A Leader of Enterprise e-business Solution,, POST POST. Post ODI DataModule POST FXDataModule FXDataModule POST. DataModule POST POST _OZ_ODIFetchType OZ_ODIITEM OZ_ODICATEGORY OZ_DATASET OZ_DEBUG_ MyParam DM_BATCH_FETCH DM_CONCURRENT_FETCH FetchUnit DM_PER_DATASET DM_CONCURRENT_FETCH. ODI ODI FetchUnit DM_PER_DATASET. Debug (true / false) : XML SDM Debug. ODI ODI DataAction POST MyParam ODI ODI FORCS Co., LTD 3

4 OZ Framework User's Guide _OZ_DAC_CNT <INDEX>.DATASET <INDEX>.TYPE <INDEX>.EXT <INDEX>.SRC_CNT <INDEX>.SF_<INDEX2> <INDEX>.SV_<INDEX2> <INDEX>.TRG_CNT <INDEX>.DF_<INDEX2> <INDEX>.DV_<INDEX2> DataAction <INDEX> DataAction DataAction CUD Insert, Delete, RowUpdate DataAction Extra DataAction Source <INDEX2> DataAction <INDEX2> SourceName DataAction <INDEX2> SourceValue DataAction Target <INDEX2> DataAction <INDEX2> TargetName DataAction <INDEX2> TargetValue : 3 ODI, DataAction 3 Commit POST parama=somevalue paramb=somevalue paramc=somevalue _OZ_DAC_CNT=3 0.DATASET=dataset1 0.TYPE=Insert 0.EXT= 0.SRC_CNT=2 0.SF_0=FieldName1 0.SV_0=a 0.SF_1=FieldName2 0.SV_1=b 1.DATASET=dataset1 1.TYPE=Delete 1.EXT= 1.TRG_CNT=1 1.DF_0=FieldName1 1.DV_0=a 2.DATASET=dataset1 2.TYPE=RowUpdate 2.EXT= 2.SRC_CNT=2 2.SF_0=FieldName1 4 FORCS Co., LTD

5 A Leader of Enterprise e-business Solution 2.SV_0=newvalue 2.SF_1=FieldName2 2.SV_1=oldvalue 2.TRG_CNT=2 2.DF_0=FieldName1 2.DV_0=newvalue 2.DF_1=FieldName2 2.DV_1=oldvalue FXDataModule POST Custom DataAction POST _OZ_DAC_CNT_ <DAC_INDEX>.DATASET <DAC_INDEX>.TYPE <DAC_INDEX>.EXT <DAC_INDEX>.SRC_CNT <DAC_INDEX>.SF_<SRC_INDEX> <DAC_INDEX>.SFT_<SRC_INDEX> <DAC_INDEX>.SV_<SRC_INDEX> <DAC_INDEX>.TRG_CNT <DAC_INDEX>.DF_<TRG_INDEX> <DAC_INDEX>.DFT_<TRG_INDEX> <DAC_INDEX>.DV_<TRG_INDEX> DataAction DataAction (Insert, RowUpdate, Delete) DataAction ext DataAction Source DataAction Source DataAction Source DataAction Source ( null ) DataAction Target DataAction Target DataAction Target DataAction Target ( null ) - Type Object Const FORCS Co., LTD 5

6 OZ Framework User's Guide FX_DT_BIT Boolean -7 "BIT" FX_DT_TINYINT Integer -6 "TINYINT" FX_DT_SMALLINT Integer 5 "SMALLINT" FX_DT_INTEGER Integer 4 "INTEGER" FX_DT_BIGINT Long -5 "BIGINT" FX_DT_FLOAT Double 6 "FLOAT" FX_DT_REAL Float 7 "REAL" FX_DT_DOUBLE Double 8 "DOUBLE" FX_DT_NUMERIC String 2 "NUMERIC" FX_DT_DECIMAL String 3 "DECIMAL" FX_DT_CHAR String 1 "CHAR" FX_DT_VARCHAR String 12 "VARCHAR" FX_DT_LONGVARCHAR String -1 "LONGVARCHAR" FX_DT_DATE Date 91 "DATE" FX_DT_TIME Time 92 "TIME" FX_DT_TIMESTAMP Timestamp 93 "TIMESTAMP" FX_DT_BINARY byte[] -2 "BINARY" FX_DT_VARBINARY byte[] -3 "VARBINARY" FX_DT_LONGVARBINARY byte[] -4 "LONGBINARY" FX_DT_BLOB byte[] 2004 "BLOB" FX_DT_CLOB byte[] 2005 "CLUB" : BINARY, VARBINARY, LONGVARBINARY, BLOB, CLOB BASE64. (enum FX_DataTypes) - Type Object BIT TINYINT SMALLINT INTEGER BIGINT FLOAT Boolean Integer Integer Integer Long Double 6 FORCS Co., LTD

7 A Leader of Enterprise e-business Solution REAL DOUBLE NUMERIC DECIMAL CHAR VARCHAR LONGVARCHAR DATE TIME TIMESTAMP BINARY VARBINARY LONGVARBINARY BLOB CLOB Float Double String String String String String Date Time Timestamp byte[] byte[] byte[] byte[] byte[] : BINARY, VARBINARY, LONGVARBINARY, BLOB, CLOB BASE64. Custom DataModule ( ) Child Parameter, DataSetMeta, DataSet DataModule ( ) Attribute runat "server" Child Parameter, DataSetMeta, DataSet Parameter Attribute name fieldtype FORCS Co., LTD 7

8 OZ Framework User's Guide Text DataSetMeta Attribute Child name mastersetname DataFieldMeta DataFieldMeta Attribute fieldname fieldtype DataSet Attribute name Child Record Record Child Column, DataSet Column Attribute Name Text Send Attribute Child iscompress issdm Error (gzip) (true : SDM, false : XML) 8 FORCS Co., LTD

9 A Leader of Enterprise e-business Solution Error Text Servlet 2.3. DataAction. DataModule runat="server". Custom JSP WAS web.xml Custom. location ozsdmtag.tld. web.xml.... <!-- JSPC servlet mappings start -->... <taglib> <taglib-uri> <taglib-location>/web-inf/ozsdmtag.tld</taglib-location> </taglib>... <servlet-mapping> FORCS Co., LTD 9

10 OZ Framework User's Guide <servlet-name>sample.test </servlet-name> <url-pattern>/test </url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> jsp HTML. URL web.xml URL. taglib uri=" prefix="oz" %> ASP.NET OZSDMAPI aspx HTML. Register TagPrefix="oz" Namespace="oz.fxapi.custom.tag" Assembly="OZSDMAPI" %>. <oz:datamodule runat="server"> <oz:datasetmeta name="ids" > <oz:datafieldmeta fieldname="carid" fieldtype="varchar" /> </oz:datasetmeta> <oz:datasetmeta name="informations" mastersetname="ids" > <oz:datafieldmeta fieldname="maker" fieldtype="varchar" /> <oz:datafieldmeta fieldname="carname" fieldtype="clob" /> <oz:datafieldmeta fieldname="ecarname" fieldtype="varchar" /> </oz:datasetmeta> <oz:parameter name="param1" fieldtype="integer">35</oz:parameter> <oz:dataset name="ids"> <oz:record> <oz:column name="carid" >08</oz:Column> <oz:dataset name="informations" > <oz:record> <oz:column name="maker" >HYUNDAI</oz:Column> <oz:column name="carname" >EF</oz:Column> <oz:column name="ecarname" >EFSONATA</oz:Column> </oz:record> </oz:dataset> </oz:record> <oz:record> <oz:column name="carid" >05</oz:Column> <oz:dataset name="informations" > 10 FORCS Co., LTD

11 A Leader of Enterprise e-business Solution <oz:record> <oz:column name="maker" >HYUNDAI</oz:Column> <oz:column name="carname" ></oz:column> <oz:column name="ecarname" >DYNASTY</oz:Column> </oz:record> </oz:dataset> </oz:record> <oz:record> <oz:column name="carid" >07</oz:Column> <oz:dataset name="informations" > <oz:record> <oz:column name="maker" >HYUNDAI</oz:Column> <oz:column name="carname" ></oz:column> <oz:column name="ecarname" >GRANDEUR</oz:Column> </oz:record> </oz:dataset> </oz:record> <oz:record> <oz:column name="carid" >04</oz:Column> <oz:dataset name="informations" > <oz:record> <oz:column name="maker" >HYUNDAI</oz:Column> <oz:column name="carname" ></oz:column> <oz:column name="ecarname" >EQUUS</oz:Column> </oz:record> </oz:dataset> </oz:record> <oz:record> <oz:column name="carid" >09</oz:Column> <oz:dataset name="informations" > <oz:record> <oz:column name="maker" >HYUNDAI</oz:Column> <oz:column name="carname" ></oz:column> <oz:column name="ecarname" >VERNA</oz:Column> </oz:record> </oz:dataset> </oz:record> </oz:dataset> <oz:send iscompressed="false" issdm="true"> <oz:error>not implemented</oz:error> </oz:send> </oz:datamodule> FORCS Co., LTD 11

12 OZ Framework User's Guide DataModuleFactory DataModuleFactory - getdatamodule public static DataModule getdatamodule(string FetchType) throws OZSDMException. "DM_CONCURRENT_FETCH" getdatamodule CONCURRENT. Argument FetchType DM_CONCURRENT_FETCH / DM_BATCH_FETCH / DM_PER_DATASET :,. OZ Framework. DM_CONCURRENT_FETCH :. DM_BATCH_FETCH :. DM_PER_DATASET :.,. 12 FORCS Co., LTD

13 A Leader of Enterprise e-business Solution DataModule DataModule - init public void init(outputstream out) throws IOException Stream. Argument out Response OutputStream - startbinding public void startbinding() throws IOException, SQLException.. - endbinding public void endbinding() throws IOException, SQLException.. - startset public void startset(string DatasetName) throws IOException.. Argument DatasetName - endset public void endset(string DatasetName) throws IOException. Argument DatasetName - addparameter public void addparameter(string ParamName, int FieldType, Object Value) FORCS Co., LTD 13

14 OZ Framework User's Guide. :., getdatamodule() DM_CONCURRENT_FETCH DM_BATCH_FETCH. Argument ParamName FieldType Value - addsetinfo public void addsetinfo(string DatasetName, String MasterDatasetName, String[] FieldNames, int[] FieldTypes) throws IllegalArgumentException., DM_CONCURRENT_FETCH DM_BATCH_FETCH. DatasetName Argument MasterDatasetName FieldNames FieldTypes, "" - addsetinfo public void addsetinfo(string DatasetName, String[] FieldNames, int[] FieldTypes) throws IllegalArgumentException., DM_PER_DATASET. Argument DatasetName FieldNames FieldTypes - addrow public void addrow(string DatasetName, HashMap hmap) throws IOException, SQLException 14 FORCS Co., LTD

15 A Leader of Enterprise e-business Solution ResultSet Row. DatasetName Argument hmap HashMap Row )... rs = stmt.executequery(query); while(rs.next()) HashMap hmap = new HashMap(); hmap.put(_fn[0], rs.getstring(_fn[0])); hmap.put(_fn[1], rs.getstring(_fn[1])); hmap.put(_fn[2], rs.getstring(_fn[2])); hmap.put(_fn[3], rs.getstring(_fn[3])); hmap.put(_fn[4], rs.getstring(_fn[4])); hmap.put(_fn[5], rs.getstring(_fn[5])); module.addrow("set_1", hmap);... - addrow public void addrow(string DatasetName, List list) throws IOException, SQLException ResultSet Row. Argument DatasetName list ArrayList Row - addrow public void addrow(string DatasetName, String[] arr) throws IOException, SQLException ResultSet Row. Argument DatasetName arr String[] Row - makesdm_set FORCS Co., LTD 15

16 OZ Framework User's Guide public void makesdm_set(string DatasetName, ResultSet rs, OutputStream out) throws OZSDMException, IOException DM_PER_DATASET SDM., Batch. DatasetName Argument rs out ResultSet Response OutputStream - ParseXML public string ParseXML(XMLID) XML SDM. Argument XMLID XML ID Return Success - sendbinderrormessage public void sendbinderrormessage(string msg) throws IOException. :. Argument msg - senderrormessage public void senderrormessage(string msg, OutputStream out) throws IOException. :. Argument msg out Response OutputStream - setdebug 16 FORCS Co., LTD

17 A Leader of Enterprise e-business Solution public void setdebug(boolean isdebug, HttpServletResponse response) throws IOException Debug. : XML SDM Debug. : init,. "setdebug method can't call after init method calling and call only one time". Argument isdebug response Debug - true : Debug - false : Debug () Servlet API - ODI getdatamodule(); init(); addparameter(); addsetinfo(); startbinding(); startset(); * addrow(); endset(); endbinding(); :. - - FORCS Co., LTD 17

18 OZ Framework User's Guide ODI getdatamodule(); init(); addparameter(); addsetinfo(); startbinding(); startset(); * addrow(); * startset(); * * addrow(); * endset(); endset(); endbinding(); :,. - getdatamodule(); init(); addsetinfo(); startbinding(); startset(); * addrow(); endset(); 18 FORCS Co., LTD

19 A Leader of Enterprise e-business Solution endbinding(); :. FXDataModule FX_DataModule - FX_DataModule Argument public FX_DataModule() FXDataModule. addparameter public void addparameter(fx_parameter param). Argument Param addparameters public void addparameters(fx_parameter[] param). Argument Params adddatasetmeta public void adddatasetmeta(fx_datasetmeta meta). Argument Meta write public void write(outputstream out, booleam issdm, boolen iscompress) FORCS Co., LTD 19

20 OZ Framework User's Guide DataModule SDM XML. : XML Response ContentType. (Ex : "text/xml") out OutStream Argument issdm iscompress SDM (false XML ) : true GZip Unzip. Return senderrormessage public void senderrormessage(outputstream out, booleam issdm, boolen iscompress, String error) DataModule SDM XML,. Argument out issdm iscompress error OutStream SDM (false XML ) : true GZip Unzip. Return getdataaction public FX_DataAction getdataaction(httpservletrequest request) Request FX_DataAction. Argument request error Request Return DataAction FX_DataSetMeta FX_ DataSetMeta 20 FORCS Co., LTD

21 A Leader of Enterprise e-business Solution public FX_DataSetMeta(String name) FXDataModule. Argument name FX_DataSetMeta public FX_DataSetMeta(String name, String msetname) FXDataModule. Argument name msetname setmastersetname public void setmastersetname(string msetname). Argument msetname adddatafieldmeta public void adddatafieldmeta(fx_datafieldmeta field). Argument field adddatafieldmeta public void adddatafieldmeta(fx_datafieldmeta[] fields). Argument fields FX_DataFieldMeta FX_DataFieldMeta public FX_DataFieldMeta(String name, int type). Argument name type FX_ DataFieldMeta FORCS Co., LTD 21

22 OZ Framework User's Guide public FX_DataFieldMeta(String name) VARCHAR. Argument name settype public void settype(int type). Argument type FX_DataSet FX_DataSet public FX_DataSet(String name) FXDataModule. Argument name addrecord public void addrecord(fx_record record),. Argument record FX_Record FX_Record public FX_Record(),. addcolumn public void addcolumn(string name, Object value). Argument name value adddetaildataset 22 FORCS Co., LTD

23 A Leader of Enterprise e-business Solution public void adddetaildataset(fx_dataset detail). Argument detail FX_DataAction FX_DataAction public FX_DataAction(String name, String actiontype) DataAcion. Argument name actiontype DataAction FX_DataAction public FX_DataAction(String name, String actiontype, String ext) DataAcion. Argument name actiontype ext DataAction ext getdatasetname Return public String getdatasetname(). getactiontype Return public String getactiontype() DataAction. DataAction (Insert, RowUpdate, Delete) getext Return public String getext() ext. ext FORCS Co., LTD 23

24 OZ Framework User's Guide setext public String setext(string ext) ext. Argument ext ext getsourcefields Return public FX_Parameter[] getsourcefields() Source. Source setsourcefields public void setsourcefields(fx_parameter[] fields) Source. Argument fields Source gettargetfields Return public FX_Parameter[] gettargetfields() Target. Target settargetfields public void settargetfields(fx_parameter[] fields) Target. Argument fields Target FX_Parameter FX_Parameter public FX_Parameter(String name, int type, String value) FXDataModule. Argument name type value 24 FORCS Co., LTD

25 A Leader of Enterprise e-business Solution FX_Parameter public FX_Parameter(String name, String value) FXDataModule VARCHAR. Argument name value getname Return public String getname(). gettype Return public int gettype(). settype public void settype(int type). type getvalue Return public String gettype(). isnull Return public boolean isnull() null. null FORCS Co., LTD 25

26 OZ Framework User's Guide GetWebBrowserWindow Argument object _GetWebBrowserWindow() OCX. : viewer.isframe=false viewer.isframe=true null. 26 FORCS Co., LTD

27 A Leader of Enterprise e-business Solution : Servlet API Framework FXDataModule FX_DataModule FX_DataModule Argument public FX_DataModule() FXDataModule. addparameter public void addparameter(fx_parameter param). Argument Param addparameters public void addparameters(fx_parameter[] param). Argument Params adddatasetmeta Public void adddatasetmeta(fx_datasetmeta meta). Argument Meta write public void write(outputstream output, booleam issdm, boolen iscompress) FORCS Co., LTD 27

28 OZ Framework User's Guide Argument Return DataModule SDM XML. : XML Response ContentType. (Ex : "text/xml") output OutStream issdm SDM (false XML ) iscompress : true GZip Unzip. senderrormessage public void senderrormessage(outputstream output, booleam issdm, boolen iscompress, string error) DataModule SDM XML,. Argument output issdm iscompress error OutStream SDM (false XML ) : true GZip Unzip. Return getdataaction public FX_DataAction getdataaction(httpservletrequest request) Request FX_DataAction. Argument request error Request Return DataAction FX_DataSetMeta FX_ DataSetMeta public FX_DataSetMeta(String name) 28 FORCS Co., LTD

29 A Leader of Enterprise e-business Solution FXDataModule. Argument name FX_DataSetMeta public FX_DataSetMeta(String name, String msetname) FXDataModule. Argument name msetname MasterSetName public string MasterSetNameget; set;. adddatafieldmeta public void adddatafieldmeta(fx_datafieldmeta[] field). Argument field FX_DataFieldMeta FX_DataFieldMeta public FX_DataFieldMeta(string name, int type) Argument name type FX_ DataFieldMeta public FX_DataFieldMeta(String name) VARCHAR. Argument name Type public FX_DataTypes Typeget; set;. FORCS Co., LTD 29

30 OZ Framework User's Guide FX_DataSet FX_DataSet public FX_DataSet(string name) FXDataModule Argument name addrecord public void AddRecord(FX_Record record),. Argument record FX_Record FX_Record public FX_REcord(),. addcolumn public void addcolumn(string name, Object value). Argument name value adddetaildataset public void adddetaildataset(fx_dataset detail). Argument detail FX_DataAction FX_DataAction public FX_DataAction(string name, string actiontype) DataAcion. Argument name 30 FORCS Co., LTD

31 A Leader of Enterprise e-business Solution actiontype DataAction FX_DataAction public FX_DataAction(string name, string actiontype, string ext) DataAcion. Argument name actiontype ext DataAction ext DataSetName public string DataSetNameget;. ActionType public string ActionTypeget; DataAction. (Insert, RowUpdate, Delete) ExtraArgument public string ExtraArgumentget; set; ext. SourceFields public FX_Parameter[] SourceFieldsget; set; Source. TargetFields public FX_Parameter[] TargetFieldsget; set; Target. FX_Parameter FX_Parameter public FX_Parameter(string name, int type, string value) FORCS Co., LTD 31

32 OZ Framework User's Guide FXDataModule. Argument name type value FX_Parameter public FX_Parameter(string name, string value) FXDataModule VARCHAR. Argument name value Name public string Nameget;. Type public FX_DataTypes Typeget; set;. value public string valueget;. IsNull public string gettypeget; set; null. 32 FORCS Co., LTD

33 A Leader of Enterprise e-business Solution 1 : Application - Servlet API Table. Servlet API ozsdmapi.jar WAS UDS ODI. Step 1 ozsdmapi.jar WAS Servlet API ozsdmapi.jar WAS. Tomcat 5.0 webapps\root\web-inf\lib ozsdmapi.jar. Step 2. java DataModuleSampleServlet.class. package sample; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.util.*; import oz.framework.api.datamodule; import oz.uds.rs.listmapresultset; import oz.sdm.datamodulefactory; import oz.uds.rs.listmapresultset; /** * <p>title: OZ SDM API</p> * <p>description: </p> * <p>copyright: Copyright (c) 2005</p> * <p>company: </p> Forcs 1.0 */ public class DataModuleSampleServlet extends HttpServlet FORCS Co., LTD 33

34 OZ Framework User's Guide private static final String _KEY_ODI_FETCH_TYPE = "_OZ_ODIFetchType_"; private static final String _KEY_ODIITEM = "_OZ_ODIITEM_"; private static final String _KEY_ODICATEGORY = "_OZ_ODICATEGORY_"; private static final String _KEY_OZ_DATASET_ = "_OZ_DATASET_"; private Connection m_conn = null; public void init(servletconfig config) throws ServletException super.init(config); System.out.println("init..."); public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); private void process(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException // init connection. try String _URL = "jdbc:odbc:ozdemokr30"; Properties prop = new Properties(); prop.put("user", ""); prop.put("password", ""); Driver driver = (Driver) Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); m_conn = driver.connect(_url, prop); System.out.println("connection ok..."); catch(exception e) System.out.println("connection error..."); DataModule.sendErrorMessage("connection error...",response.getoutputstream()); if (m_conn!= null) try m_conn.close(); catch (Exception e1) throw new ServletException(e.getMessage()); try System.out.println("start "); Enumeration enum = request.getparameternames(); while (enum.hasmoreelements()) String temp = (String) enum.nextelement(); System.out.println("name=" + temp + " value=" + getencode(request.getparameter(temp))); 34 FORCS Co., LTD

35 A Leader of Enterprise e-business Solution // // fetch parameters // "DM_BATCH_FETCH DM_CONCURRENT_FETCH" String odifetchtype = getencode(request.getparameter(_key_odi_fetch_type)); String item = getencode(request.getparameter(_key_odiitem)); String category = getencode(request.getparameter(_key_odicategory)); String dataset = getencode(request.getparameter(_key_oz_dataset_)); // if (odifetchtype == null) odifetchtype = "DM_CONCURRENT_FETCH"; if ( (dataset == null) (dataset.length() == 0)) // ODI FetchUnit DM_PER_DATAMODULE. if (item.equals("jasmin_sample3.odi")) // Master-Detail Sample. Master_Detail_Style(request, response, odifetchtype); else if (item.equals("jasmin_sample2.odi") (item.equals("jasmin_sample4.odi"))) // SET Sample. default_style(request, response, odifetchtype); else System.out.println("unsupported odi error..."); DataModule.sendErrorMessage("unsupported odi error...", response.getoutputstream()); throw new ServletException("Unknown Item :" + item); else // ODI FetchUnit DM_PER_DATASET. // odifetchtype DM_PER_DATASET DM_CONCURRENT_FETCH. //. (batch.) if (odifetchtype.equalsignorecase("dm_concurrent_fetch")) // set #1 setdefaultstyle(request, response, "DM_PER_DATASET"); // set #2 // setresultsetquerystyle(request, response, "DM_CONCURRENT_FETCH"); else System.out.println("unsupported error..."); DataModule.sendErrorMessage("unsupported error...", response.getoutputstream()); throw new ServletException("unsupported"); catch(exception ex) ex.printstacktrace(); // senderrormessage // throw. client DataModule.sendErrorMessage(ex.getMessage(), response.getoutputstream()); throw new ServletException(ex.getMessage()); finally if (m_conn!= null) try m_conn.close(); catch (Exception e) FORCS Co., LTD 35

36 OZ Framework User's Guide System.out.println("end "); private void Master_Detail_Style(HttpServletRequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException Statement stmt1 = null; Statement stmt4 = null; ResultSet rs1 = null; ResultSet rs4 = null; DataModule module = null; // jasmin/jasmin_sample1.odi // SET_1 String[] _FN1 = "FirstName" ; int[] _FT1 = java.sql.types.varchar ; // SET_4 String[] _FN4 = "ContactId", "FirstName", "LastName", "Phone", "Fax", " ", "OrgUnitId", "UserName" ; int[] _FT4 = 4, 12, 12, 12, 12, 12, 5, 12 ; try module = DataModuleFactory.getDataModule(fetchType); module.init(response.getoutputstream()); // set SET Info. module.addsetinfo("set_1", "", _FN1, _FT1); module.addsetinfo("set_4", "SET_1", _FN4, _FT4); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query1 = "select distinct FirstName from contact"; module.startset("set_1"); stmt1 = m_conn.createstatement(); rs1 = stmt1.executequery(query1); while(rs1.next()) String f1 = rs1.getstring(_fn1[0]); HashMap map1 = new HashMap(); map1.put(_fn1[0], f1); module.addrow("set_1", map1); contactid"; String query4 = "select * from contact where FirstName='" + f1 + "' order by module.startset("set_4"); stmt4 = m_conn.createstatement(); rs4 = stmt4.executequery(query4); while(rs4.next()) HashMap map4 = new HashMap(); map4.put(_fn4[0], new Integer(rs4.getInt(_FN4[0]))); map4.put(_fn4[1], rs4.getstring(_fn4[1])); map4.put(_fn4[2], rs4.getstring(_fn4[2])); map4.put(_fn4[3], rs4.getstring(_fn4[3])); map4.put(_fn4[4], rs4.getstring(_fn4[4])); 36 FORCS Co., LTD

37 A Leader of Enterprise e-business Solution map4.put(_fn4[5], rs4.getstring(_fn4[5])); map4.put(_fn4[6], new Integer(rs4.getInt(_FN4[6]))); map4.put(_fn4[7], rs4.getstring(_fn4[7])); module.addrow("set_4", map4); rs4.close(); rs4 = null; stmt4.close(); stmt4 = null; module.endset("set_4"); rs1.close(); rs1 = null; stmt1.close(); stmt1 = null; module.endset("set_1"); module.endbinding(); catch(exception e) e.printstacktrace(); // sendbinderrormessage. if(module!= null) module.sendbinderrormessage(e.tostring()); finally if(rs1!= null) try rs1.close(); catch(exception e) if(stmt1!= null) try stmt1.close(); catch(exception e) if(rs4!= null) try rs4.close(); catch(exception e) if(stmt4!= null) try stmt4.close(); catch(exception e) private void default_style(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("select time=="+system.currenttimemillis()); Statement stmt = null; ResultSet rs = null; DataModule module = null; // jasmin/jasmin_sample2.odi // SET_1 String[] _FN = "CarID", "Maker", "EMaker", "CarName", "ECarName", "CarImageFile"; int[] _FT = java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar ; try module = DataModuleFactory.getDataModule(fetchType); FORCS Co., LTD 37

38 OZ Framework User's Guide module.init(response.getoutputstream()); // module.init(output); // set Parameter Info. module.addparameter("param1", java.sql.types.varchar, getencode(request.getparameter("param1"))); module.addparameter("param2", java.sql.types.varchar, getencode(request.getparameter("param2"))); // set SET Info. module.addsetinfo("set_1", "", _FN, _FT); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query = "select * from car"; module.startset("set_1"); stmt = m_conn.createstatement(); rs = stmt.executequery(query); while(rs.next()) HashMap map = new HashMap(); String a = rs.getstring(_fn[0]); String b = rs.getstring(_fn[1]); String c = rs.getstring(_fn[2]); String d = rs.getstring(_fn[3]); String e = rs.getstring(_fn[4]); String f = rs.getstring(_fn[5]); map.put(_fn[0], a); map.put(_fn[1], b); map.put(_fn[2], c); map.put(_fn[3], d); map.put(_fn[4], e); map.put(_fn[5], f); module.addrow("set_1", map); System.out.print("select FN0="+_FN[0]+" name="+a); System.out.print(" FN1="+_FN[1]+" name="+b); System.out.print(" FN2="+_FN[2]+" name="+c); System.out.print(" FN3="+_FN[3]+" name="+d); System.out.print(" FN4="+_FN[4]+" name="+e); System.out.print(" FN5="+_FN[5]+" name="+f); System.out.println(""); module.endset("set_1"); module.endbinding(); rs.close(); rs = null; stmt.close(); stmt = null; catch(exception e) e.printstacktrace(); // sendbinderrormessage. module.sendbinderrormessage(e.tostring()); finally OutputStream out = response.getoutputstream(); 38 FORCS Co., LTD

39 A Leader of Enterprise e-business Solution if(rs!= null) try rs.close(); catch(exception e) if(stmt!= null) try stmt.close(); catch(exception e) private void setdefaultstyle(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("setDefaultStyle fetchtype =="+fetchtype); Statement stmt = null; ResultSet rs = null; DataModule module = null; // jasmin/jasmin_sample4.odi // SET_1 String[] _FN = "CarID", "Maker", "EMaker", "CarName", "ECarName", "CarImageFile"; int[] _FT = java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar ; try module = DataModuleFactory.getDataModule(fetchType); module.init(response.getoutputstream()); // set SET Info. module.addsetinfo("set_1", _FN, _FT); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query = "select * from car"; module.startset("set_1"); stmt = m_conn.createstatement(); rs = stmt.executequery(query); while(rs.next()) HashMap map = new HashMap(); String a = rs.getstring(_fn[0]); String b = rs.getstring(_fn[1]); String c = rs.getstring(_fn[2]); String d = rs.getstring(_fn[3]); String e = rs.getstring(_fn[4]); String f = rs.getstring(_fn[5]); map.put(_fn[0], a); map.put(_fn[1], b); map.put(_fn[2], c); map.put(_fn[3], d); map.put(_fn[4], e); map.put(_fn[5], f); FORCS Co., LTD 39

40 OZ Framework User's Guide module.addrow("set_1", map); System.out.print("select FN0="+_FN[0]+" name="+a); System.out.print(" FN1="+_FN[1]+" name="+b); System.out.print(" FN2="+_FN[2]+" name="+c); System.out.print(" FN3="+_FN[3]+" name="+d); System.out.print(" FN4="+_FN[4]+" name="+e); System.out.print(" FN5="+_FN[5]+" name="+f); System.out.println(""); module.endset("set_1"); module.endbinding(); rs.close(); rs = null; stmt.close(); stmt = null; catch(exception e) e.printstacktrace(); // sendbinderrormessage. module.sendbinderrormessage(e.tostring()); finally OutputStream out = response.getoutputstream(); if(rs!= null) try rs.close(); catch(exception e) if(stmt!= null) try stmt.close(); catch(exception e) private void setresultsetquerystyle(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("setResultSetQueryStyle..."); Statement stmt = null; ResultSet rs = null; DataModule module = null; try // jasmin/jasmin_sample4.odi // SET_1 String[] _FN = "CarID", "Maker", "EMaker", "CarName", "ECarName", "CarImageFile" ; int[] _FT = java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar,java.sql.types.varchar; module = DataModuleFactory.getDataModule(fetchType); String query = "select * from car"; stmt = m_conn.createstatement(); rs = stmt.executequery(query); module.makesdm_set("set_1",rs,response.getoutputstream()); rs.close(); rs = null; stmt.close(); stmt = null; 40 FORCS Co., LTD

41 A Leader of Enterprise e-business Solution catch(exception e) e.printstacktrace(); // set sendbinderrormessage. // makesdm_set. throw new ServletException(e.getMessage()); finally if(rs!= null) try rs.close(); catch(exception e) if(stmt!= null) try stmt.close(); catch(exception e) public void destroy() super.destroy(); private String getencode(string value) try return new String(value.getBytes("8859_1"), "KSC5601"); catch(exception ex) return value; Step 3 DataModuleSampleServlet.class WAS. DataModuleSampleServlet.class. Tomcat 5.0 webapps\root\web-inf\classes sample. DataModuleSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf web.xml.... <!-- JSPC servlet mappings start -->... <servlet> <servlet-name>sample.datamodulesampleservlet</servlet-name> <servlet-class>sample.datamodulesampleservlet</servlet-class> </servlet> FORCS Co., LTD 41

42 OZ Framework User's Guide... <servlet-mapping> <servlet-name>sample.datamodulesampleservlet</servlet-name> <url-pattern>/sample.datamodulesampleservlet</url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> Step 4 ODI Servlet API (UDS),. POST "_OZ_ODIITEM_".. (UDS).. 42 FORCS Co., LTD

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

44 OZ Framework User's Guide. ( ). URL []. 44 FORCS Co., LTD

45 A Leader of Enterprise e-business Solution "_OZ_ODIITEM_=ODI" [].. ODI "JASMIN_SAMPLE2.odi". Step 5 OZF : Servlet API URL DataModule RegisterUserDataModule JavaScript. JavaScript, Document.GlobalFunction OZF OZF. OZF. OZF "MyFrameworkURLUDS.ozf". MyFrameworkURLUDS.prototype.GetFrameworkURL = MyFrameworkURLUDS_GetFrameworkURL; MyFrameworkURLUDS.prototype.GetCUDFrameworkURL = FORCS Co., LTD 45

46 OZ Framework User's Guide MyFrameworkURLUDS_GetCUDFrameworkURL; MyFrameworkURLUDS.prototype.GetFrameworkPostParam = MyFrameworkURLUDS_GetFrameworkPostParam; MyFrameworkURLUDS.prototype.GetCUDFrameworkPostParam = MyFrameworkURLUDS_GetCUDFrameworkPostParam; function MyFrameworkURLUDS(_url, _cud_url, _url_param, _cud_url_param) this.url = _url; this.cud_url = _cud_url; this.url_param = _url_param; if(this.url_param == null) this.url_param = ""; this.cud_url_param = _cud_url_param; if(this.cud_url_param == null) this.cud_url_param = ""; function MyFrameworkURLUDS_GetFrameworkURL(dataset_name) return this.url; function MyFrameworkURLUDS_GetCUDFrameworkURL(dataset_name) return this.cud_url; function MyFrameworkURLUDS_GetFrameworkPostParam(dataset_name) return "default&"+this.url_param; function MyFrameworkURLUDS_GetCUDFrameworkPostParam(dataset_name) return "default&"+this.cud_url_param; GetFrameworkURL GetCUDFrameworkURL. GetFrameworkURL URL. GetCUDFrameworkURL DataAction URL. URL 46 FORCS Co., LTD

47 A Leader of Enterprise e-business Solution, URL. "JASMIN_SAMPLE2.odi" "MyFrameworkURLUDS.ozf". Board Table Table ODIKey "JASMIN_SAMPLE2", DataSet "SET_1",. Table OnInitialize. var uds = new MyFrameworkURLUDS(" var datamanager = _GetDataManager(); var datamodule = datamanager.getdatamodule("jasmin_sample2"); datamodule.registeruserdatamodule(uds); Step 6 WAS. FORCS Co., LTD 47

48 OZ Framework User's Guide 2 : Application - DataAction Servlet API Table,,. Step 1 ozsdmapi.jar WAS Servlet API ozsdmapi.jar WAS. Tomcat 5.0 webapps\root\web-inf\lib ozsdmapi.jar. Step 2 DataAction DataAction. java DataActionSampleServlet.class. package sample; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.util.*; /** * <p>title: OZ SDM API</p> 48 FORCS Co., LTD

49 A Leader of Enterprise e-business Solution * <p>description: </p> * <p>copyright: Copyright (c) 2005</p> * <p>company: </p> Forcs 1.0 */ public class DataActionSampleServlet extends HttpServlet private static final String _KEY_ODI_FETCH_TYPE = "_OZ_ODIFetchType_"; private static final String _KEY_ODIITEM = "_OZ_ODIITEM_"; private static final String _KEY_ODICATEGORY = "_OZ_ODICATEGORY_"; private static final String _KEY_OZ_DATASET_ = "_OZ_DATASET_"; private static final String _KEY_OZ_DAC_CNT = "_OZ_DAC_CNT"; private static String TABLENAME = "car"; private String dac_insert_query = ""; private String dac_update_query = ""; private String dac_delete_query = ""; private PreparedStatement p_insert_stmt = null; private PreparedStatement p_update_stmt = null; private PreparedStatement p_delete_stmt = null; private Connection m_conn = null; public void init(servletconfig config) throws ServletException super.init(config); public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); private void process(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException try String _URL = "jdbc:odbc:ozdemokr30"; Properties prop = new Properties(); prop.put("user", ""); prop.put("password", ""); Driver driver = (Driver) Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); m_conn = driver.connect(_url, prop); catch(exception ex) response.getoutputstream().write(ex.getmessage().getbytes()); throw new ServletException(ex.getMessage()); FORCS Co., LTD 49

50 OZ Framework User's Guide try dac_insert_query = ""; dac_update_query = ""; dac_delete_query = ""; Enumeration enum = request.getparameternames(); while (enum.hasmoreelements()) String temp = (String) enum.nextelement(); System.out.println("name=" + temp + " value=" + getencode(request.getparameter(temp))); // // fetch parameters // "DM_BATCH_FETCH DM_CONCURRENT_FETCH" String odifetchtype = getencode(request.getparameter( _KEY_ODI_FETCH_TYPE)); String item = getencode(request.getparameter(_key_odiitem)); String category = getencode(request.getparameter(_key_odicategory)); String dataset = getencode(request.getparameter(_key_oz_dataset_)); // System.out.println(" "); if (odifetchtype == null) odifetchtype = "DM_CONCURRENT_FETCH"; m_conn.setautocommit(false); //Action. int dac_cnt = Integer.parseInt(request.getParameter(_KEY_OZ_DAC_CNT)); for (int i = 0; i < dac_cnt; i++) String type = request.getparameter(i + ".TYPE"); if (type.equalsignorecase("insert")) insert(request, response, i); else if (type.equalsignorecase("rowupdate")) update(request, response, i); else if (type.equalsignorecase("delete")) delete(request, response, i); System.out.println(type+" time=="+system.currenttimemillis()); m_conn.commit(); response.getoutputstream().write(new String("OK").getBytes()); catch(exception ex) ex.printstacktrace(); try m_conn.rollback(); catch(exception e) response.getoutputstream().write(ex.getmessage().getbytes()); throw new ServletException(ex.getMessage()); finally if(p_insert_stmt!= null) try p_insert_stmt.close(); catch(exception e) if(p_update_stmt!= null) try p_update_stmt.close(); catch(exception e) if(p_delete_stmt!= null) try p_delete_stmt.close(); catch(exception e) if (m_conn!= null) try m_conn.close(); catch(exception e) 50 FORCS Co., LTD

51 A Leader of Enterprise e-business Solution private void insert(httpservletrequest request, HttpServletResponse response, int cnt) throws Exception int insert_source_fieldcnt = Integer.parseInt(request.getParameter(cnt + ".SRC_CNT")); if (dac_insert_query.equalsignorecase("")) // prepared. dac_insert_query = "INSERT INTO "+TABLENAME+" ("; for (int i = 0; i < insert_source_fieldcnt; i++) String s_fieldname = getencode(request.getparameter(cnt + ".SF_" + i)); if (i == insert_source_fieldcnt - 1) dac_insert_query += s_fieldname; else dac_insert_query += s_fieldname + ","; dac_insert_query += ") VALUES ( "; for (int i = 0; i < insert_source_fieldcnt; i++) if (i == insert_source_fieldcnt - 1) dac_insert_query += "?"; else dac_insert_query += "?,"; dac_insert_query += ")"; System.out.println("dac_insert_query="+dac_insert_query); p_insert_stmt = m_conn.preparestatement(dac_insert_query); for (int i = 0; i < insert_source_fieldcnt; i++) String value = getencode(request.getparameter(cnt + ".SV_" + i)); p_insert_stmt.setstring(i + 1, value); p_insert_stmt.execute(); private void update(httpservletrequest request, HttpServletResponse response, int cnt) throws Exception int update_source_fieldcnt = Integer.parseInt(request.getParameter(cnt + ".SRC_CNT")); int update_target_fieldcnt = 0; try update_target_fieldcnt = Integer.parseInt(request.getParameter(cnt + ".TRG_CNT")); catch(exception ex) if (dac_update_query.equalsignorecase("")) // prepared. dac_update_query = "UPDATE "+TABLENAME+" set "; for (int i = 0; i < update_source_fieldcnt; i++) String s_fieldname = getencode(request.getparameter(cnt + ".SF_" + i)); if (i == update_source_fieldcnt - 1) FORCS Co., LTD 51

52 OZ Framework User's Guide dac_update_query += s_fieldname +" =? "; else dac_update_query += s_fieldname +" =?,"; dac_update_query += " WHERE "; for (int i = 0; i < update_target_fieldcnt; i++) String t_fieldname = getencode(request.getparameter(cnt + ".DF_" + i)); if (i == update_target_fieldcnt - 1) dac_update_query += t_fieldname +" =? "; else dac_update_query += t_fieldname +" =? AND "; System.out.println("dac_update_query="+dac_update_query); p_update_stmt = m_conn.preparestatement(dac_update_query); int i = 0; for (i = 0; i < update_source_fieldcnt; i++) String value = getencode(request.getparameter(cnt + ".SV_" + i)); p_update_stmt.setstring(i + 1, value); for (int j = 0; j < update_source_fieldcnt; j++) String value = getencode(request.getparameter(cnt + ".DV_" + j)); p_update_stmt.setstring(i + 1, value); i++; p_update_stmt.execute(); private void delete(httpservletrequest request, HttpServletResponse response, int cnt) throws Exception int delete_target_fieldcnt = Integer.parseInt(request.getParameter(cnt + ".TRG_CNT")); if (dac_delete_query.equalsignorecase("")) // prepared. dac_delete_query = "DELETE FROM "+TABLENAME+" WHERE "; for (int i = 0; i < delete_target_fieldcnt; i++) String t_fieldname = getencode(request.getparameter(cnt + ".DF_" + i)); if (i == delete_target_fieldcnt - 1) dac_delete_query += t_fieldname +" =? "; else dac_delete_query += t_fieldname +" =? AND "; System.out.println("dac_delete_query="+dac_delete_query); p_delete_stmt = m_conn.preparestatement(dac_delete_query); 52 FORCS Co., LTD

53 A Leader of Enterprise e-business Solution int i = 0; for (i = 0; i < delete_target_fieldcnt; i++) String value = getencode(request.getparameter(cnt + ".DV_" + i)); p_delete_stmt.setstring(i + 1, value); p_delete_stmt.execute(); public void destroy() super.destroy(); private String getencode(string value) try return new String(value.getBytes("8859_1"), "KSC5601"); catch(exception ex) return value; Step 3 " 1" DataModuleSampleServlet.class DataActionSampleServlet.class WAS. DataModuleSampleServlet.class, DataActionSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf\classes sample. DataModuleSampleServlet.class, DataActionSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf web.xml.... <!-- JSPC servlet mappings start -->... <servlet> <servlet-name>sample.datamodulesampleservlet</servlet-name> <servlet-class>sample.datamodulesampleservlet</servlet-class> </servlet> <servlet> <servlet-name>sample.dataactionsampleservlet</servlet-name> FORCS Co., LTD 53

54 OZ Framework User's Guide <servlet-class>sample.dataactionsampleservlet</servlet-class> </servlet>... <servlet-mapping> <servlet-name>sample.datamodulesampleservlet</servlet-name> <url-pattern>/sample.datamodulesampleservlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>sample.dataactionsampleservlet</servlet-name> <url-pattern>/sample.dataactionsampleservlet</url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> Step 4 ODI Servlet API (UDS),. (UDS).. 54 FORCS Co., LTD

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

56 OZ Framework User's Guide. SET_1 [ ], [ ], [ ],,.. INSERT INTO car(#@arg_sf1#, #@ARG_SF2#, #@ARG_SF3#, #@ARG_SF4#, #@ARG_SF5#, #@ARG_SF6#) VALUES('#@ARG_SV1#','#@ARG_SV2#', '#@ARG_SV3#','#@ARG_SV4#', '#@ARG_SV5#', '#@ARG_SV6#'). DELETE FROM car WHERE [#@ARG_DF1#] = '#@ARG_DV1#"; 56 FORCS Co., LTD

57 A Leader of Enterprise e-business Solution. UPDATE car SET = [#@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 "JASMIN_SAMPLE4.odi". Step 5 "JASMIN_SAMPLE4.odi" " 1" "MyFrameworkURLUDS.ozf". Board Table Table ODIKey "JASMIN_SAMPLE4", DataSet "SET_1",. Table,, Table "AllowInsert", "AllowDelete", "AllowUpdate" "True". Table OnInitialize. var uds = new MyFrameworkURLUDS(" var datamanager = _GetDataManager(); var datamodule = datamanager.getdatamodule("jasmin_sample4"); datamodule.registeruserdatamodule(uds); FORCS Co., LTD 57

58 OZ Framework User's Guide Board Button Button OnClick. var result = Table1.CommitQueuedActions(); if(result == "") Table1.GetDataModule().RefreshAllDataSet(); else _MessageBox(result); //var myodiobject = _GetDataManager().GetDataModule("odiName").GetUserDataModule(); //Select // myodiobject.url_param = "key1=value1&key2=value2"; //DataAction // myodiobject.cud_url_param = "key1=value1&key2=value2"; //_GetDataManager().GetDataModule("odiName").RefreshAllDataSet(); Step 7.. Delete.. 58 FORCS Co., LTD

59 A Leader of Enterprise e-business Solution,, DataAction. [CommitQueueActions]. 3 : Report - Servlet API. Servlet API framworkurl (HTTP URL). odi.odi.framworkurl, odi.framworkurl, connection.framworkurl. : Servlet API,. Step 1 ozsdmapi.jar WAS Servlet API ozsdmapi.jar WAS. Tomcat 5.0 webapps\root\web-inf\lib ozsdmapi.jar. Step 2 " 1" DataModuleSampleServlet.class WAS. DataModuleSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf\classes\sample. FORCS Co., LTD 59

60 OZ Framework User's Guide DataModuleSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf web.xml.... <!-- JSPC servlet mappings start -->... <servlet> <servlet-name>sample.datamodulesampleservlet</servlet-name> <servlet-class>sample.datamodulesampleservlet</servlet-class> </servlet>... <servlet-mapping> <servlet-name>sample.datamodulesampleservlet</servlet-name> <url-pattern>/sample.datamodulesampleservlet</url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> Step 3 " 1" JASMIN_SAMPLE2.odi.,. "ODI " "JASMIN_SAMPLE2", "" "SET_1". &.. 60 FORCS Co., LTD

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

62 OZ Framework User's Guide "Sample_ServletAPI.ozr". Step 4. Sample_ServletAPI.htm. <HTML> <BODY> <OBJECT width = "0" height = "0" ID="ZTransferX" CLASSID="CLSID:C7C7225A AC- B0B0-FF3B79D55E67" codebase=" :8088/ozrviewer/ztransferx.cab#version=2,0,1,2"> <PARAM NAME="download.Server" VALUE=" <PARAM NAME="download.Port" VALUE="8088"> <PARAM NAME="download.Instruction" VALUE="ozrviewer.idf"> <PARAM NAME="install.Base" VALUE="<PROGRAMS>/Forcs"> <PARAM NAME="install.Namespace" VALUE="Sample_ServletAPI"> </OBJECT> <OBJECT id = "ozrviewer" CLASSID="CLSID:0DEF32F8-170F-46f8-B1FF-4BF7443F5F25" width="100%" height="100%"> <param name="connection.servlet" value=" <param name="connection.reportname" value="sample_servletapi.ozr"> <param name="odi.odinames" value="jasmin_sample2"> <param name="odi.jasmin_sample2.frameworkurl" value=" <param name="odi.jasmin_sample2.fetchtype" value="batch"> <param name="viewer.isframe" value="false"> <param name="viewer.namespace" value="sample_servletapiozviewer"> </OBJECT> </BODY> </HTML> : Servlet API odi.odi.framworkurl odi.framworkurl connection.framworkurl URL.. 62 FORCS Co., LTD

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

64 OZ Framework User's Guide 4 : XML SDM Servlet API XML SDM. Servlet API XML SDM ozsdmapi.jar, crimson.jar XML SDM WAS UDS ODI. Step 1 ozsdmapi.jar crimson.jar WAS Servlet API ozsdmapi.jar, crimson.jar WAS. Tomcat 5.0 webapps\root\web-inf\lib ozsdmapi.jar, crimson.jar. Step 2 XML SDM XML SDM. java DebugDMSampleServlet.class. package sample; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.util.*; import oz.framework.api.datamodule; import oz.sdm.datamodulefactory; public class DebugDMSampleServlet extends HttpServlet private static final String _KEY_ODI_FETCH_TYPE = "_OZ_ODIFetchType_"; private static final String _KEY_ODIITEM = "_OZ_ODIITEM_"; private static final String _KEY_OZ_DATASET_ = "_OZ_DATASET_"; private static final String _KEY_OZ_DEBUG_ = "_OZ_DEBUG_"; private static final String ODI_NAME_1 = "JASMIN_SAMPLE2.odi"; private static final String ODI_NAME_2 = "JASMIN_SAMPLE3.odi"; private static final String ODI_NAME_3 = "JASMIN_SAMPLE4.odi"; private Connection m_conn = null; public void init(servletconfig config) throws ServletException super.init(config); System.out.println("init..."); public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); 64 FORCS Co., LTD

65 A Leader of Enterprise e-business Solution public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); public void destroy() super.destroy(); System.out.println("destroy..."); private void process(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException try String _URL = "jdbc:odbc:ozdemokr30"; Properties prop = new Properties(); prop.put("user", ""); prop.put("password", ""); Driver driver = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); m_conn = driver.connect(_url, prop); System.out.println("connection ok..."); catch(exception e) System.out.println("connection error..."); System.out.println(e.getMessage()); DataModule.sendErrorMessage("connection error...", response.getoutputstream()); close(m_conn, null, null); throw new ServletException(e.getMessage()); try System.out.println("start "); Enumeration enum = request.getparameternames(); System.out.println("parameter list "); while (enum.hasmoreelements()) String temp = (String) enum.nextelement(); System.out.println("name=" + temp + " value=" + getencode(request.getparameter(temp))); System.out.println(" "); String odifetchtype = getencode(request.getparameter(_key_odi_fetch_type)); String item = getencode(request.getparameter(_key_odiitem)); String dataset = getencode(request.getparameter(_key_oz_dataset_)); if (odifetchtype == null) odifetchtype = "DM_CONCURRENT_FETCH"; if ((dataset == null) (dataset.length() == 0)) if (item.equals(odi_name_2)) Master_Detail_Style(request, response, odifetchtype); else if (item.equals(odi_name_1) item.equals(odi_name_3)) default_style(request, response, odifetchtype); else System.out.println("unsupported odi error..."); DataModule.sendErrorMessage("unsupported odi error...", response.getoutputstream()); throw new ServletException("Unknown Item :" + item); else if (odifetchtype.equalsignorecase("dm_concurrent_fetch") odifetchtype.equalsignorecase("dm_per_dataset")) FORCS Co., LTD 65

66 OZ Framework User's Guide setdefaultstyle(request, response, odifetchtype); //setresultsetquerystyle(request, response, odifetchtype); else System.out.println("unsupported error..."); DataModule.sendErrorMessage("unsupported error...", response.getoutputstream()); throw new ServletException("unsupported"); catch(exception ex) System.out.println(ex.getMessage()); DataModule.sendErrorMessage(ex.getMessage(), response.getoutputstream()); throw new ServletException(ex.getMessage()); finally close(m_conn, null, null); System.out.println("end "); private void Master_Detail_Style(HttpServletRequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException Statement stmt1 = null; Statement stmt4 = null; ResultSet rs1 = null; ResultSet rs4 = null; DataModule module = null; String[] _FN1 = "FirstName"; int[] _FT1 = java.sql.types.varchar; String[] _FN4 = "ContactId", "FirstName", "LastName", "Phone", "Fax", " ", "OrgUnitId", "UserName" ; int[] _FT4 = 4, 12, 12, 12, 12, 12, 5, 12 ; try module = DataModuleFactory.getDataModule(fetchType); // debug true. // init setdebug. module.setdebug(parseboolean(request), response); module.init(response.getoutputstream()); module.addsetinfo("set_1", "", _FN1, _FT1); module.addsetinfo("set_4", "SET_1", _FN4, _FT4); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query1 = "select distinct FirstName from contact"; module.startset("set_1"); stmt1 = m_conn.createstatement(); rs1 = stmt1.executequery(query1); while(rs1.next()) String f1 = rs1.getstring(_fn1[0]); HashMap map1 = new HashMap(); map1.put(_fn1[0], f1); module.addrow("set_1", map1); contactid"; String query4 = "select * from contact where FirstName='" + f1 + "'order by module.startset("set_4"); stmt4 = m_conn.createstatement(); rs4 = stmt4.executequery(query4); 66 FORCS Co., LTD

67 A Leader of Enterprise e-business Solution while(rs4.next()) HashMap map4 = new HashMap(); map4.put(_fn4[0], new Integer(rs4.getInt(_FN4[0]))); map4.put(_fn4[1], rs4.getstring(_fn4[1])); map4.put(_fn4[2], rs4.getstring(_fn4[2])); map4.put(_fn4[3], rs4.getstring(_fn4[3])); map4.put(_fn4[4], rs4.getstring(_fn4[4])); map4.put(_fn4[5], rs4.getstring(_fn4[5])); map4.put(_fn4[6], new Integer(rs4.getInt(_FN4[6]))); map4.put(_fn4[7], rs4.getstring(_fn4[7])); module.addrow("set_4", map4); rs4.close(); stmt4.close(); module.endset("set_4"); module.endset("set_1"); module.endbinding(); catch(exception e) System.out.println(e.getMessage()); if(module!= null) module.sendbinderrormessage(e.tostring()); finally close(null, stmt1, rs1); close(null, stmt4, rs4); private void default_style(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("select time=="+system.currenttimemillis()); Statement stmt = null; ResultSet rs = null; DataModule module = null; String[] _FN = "CarID", "Maker", "EMaker", "CarName", "ECarName", "CarImageFile"; int[] _FT = java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar; try module = DataModuleFactory.getDataModule(fetchType); // debug true. // init setdebug. module.setdebug(parseboolean(request), response); module.init(response.getoutputstream()); module.addparameter("param1", java.sql.types.varchar, getencode(request.getparameter("param1"))); module.addparameter("param2", java.sql.types.varchar, getencode(request.getparameter("param2"))); module.addsetinfo("set_1", "", _FN, _FT); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query = "select * from car"; module.startset("set_1"); stmt = m_conn.createstatement(); rs = stmt.executequery(query); FORCS Co., LTD 67

68 OZ Framework User's Guide while(rs.next()) HashMap map = new HashMap(); String a = rs.getstring(_fn[0]); String b = rs.getstring(_fn[1]); String c = rs.getstring(_fn[2]); String d = rs.getstring(_fn[3]); String e = rs.getstring(_fn[4]); String f = rs.getstring(_fn[5]); map.put(_fn[0], a); map.put(_fn[1], b); map.put(_fn[2], c); map.put(_fn[3], d); map.put(_fn[4], e); map.put(_fn[5], f); module.addrow("set_1", map); System.out.print("select FN0="+_FN[0]+" name="+a); System.out.print(" FN1="+_FN[1]+" name="+b); System.out.print(" FN2="+_FN[2]+" name="+c); System.out.print(" FN3="+_FN[3]+" name="+d); System.out.print(" FN4="+_FN[4]+" name="+e); System.out.print(" FN5="+_FN[5]+" name="+f); System.out.println(""); module.endset("set_1"); module.endbinding(); catch(exception e) System.out.println(e.getMessage()); module.sendbinderrormessage(e.tostring()); finally close(null, stmt, rs); private void setdefaultstyle(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("1setDefaultStyle fetchtype =="+fetchtype); Statement stmt = null; ResultSet rs = null; DataModule module = null; String[] _FN = "CarID", "Maker", "EMaker", "CarName", "ECarName", "CarImageFile"; int[] _FT = java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar, java.sql.types.varchar; try module = DataModuleFactory.getDataModule(fetchType); // debug true. // init setdebug. module.setdebug(parseboolean(request), response); module.init(response.getoutputstream()); module.addsetinfo("set_1", _FN, _FT); catch(exception ex) throw new ServletException(ex.getMessage()); try module.startbinding(); String query = "select * from car"; module.startset("set_1"); stmt = m_conn.createstatement(); 68 FORCS Co., LTD

69 A Leader of Enterprise e-business Solution rs = stmt.executequery(query); while(rs.next()) HashMap map = new HashMap(); String a = rs.getstring(_fn[0]); String b = rs.getstring(_fn[1]); String c = rs.getstring(_fn[2]); String d = rs.getstring(_fn[3]); String e = rs.getstring(_fn[4]); String f = rs.getstring(_fn[5]); map.put(_fn[0], a); map.put(_fn[1], b); map.put(_fn[2], c); map.put(_fn[3], d); map.put(_fn[4], e); map.put(_fn[5], f); module.addrow("set_1", map); System.out.print("select FN0="+_FN[0]+" name="+a); System.out.print(" FN1="+_FN[1]+" name="+b); System.out.print(" FN2="+_FN[2]+" name="+c); System.out.print(" FN3="+_FN[3]+" name="+d); System.out.print(" FN4="+_FN[4]+" name="+e); System.out.print(" FN5="+_FN[5]+" name="+f); System.out.println(""); module.endset("set_1"); module.endbinding(); catch(exception e) System.out.println(e.getMessage()); module.sendbinderrormessage(e.tostring()); finally close(null, stmt, rs); private void setresultsetquerystyle(httpservletrequest request, HttpServletResponse response, String fetchtype) throws ServletException, IOException System.out.println("setResultSetQueryStyle..."); Statement stmt = null; ResultSet rs = null; DataModule module = null; try module = DataModuleFactory.getDataModule(fetchType); // debug true. // init setdebug. module.setdebug(parseboolean(request), response); String query = "select * from car"; stmt = m_conn.createstatement(); rs = stmt.executequery(query); module.makesdm_set("set_1", rs, response.getoutputstream()); catch(exception e) System.out.println(e.getMessage()); throw new ServletException(e.getMessage()); finally close(null, stmt, rs); private String getencode(string value) try FORCS Co., LTD 69

70 OZ Framework User's Guide return new String(value.getBytes("8859_1"), "KSC5601"); catch(exception ex) return value; private void close(connection con, Statement stmt, ResultSet rs) try if(rs!= null) rs.close(); if(stmt!= null) stmt.close(); if(con!= null) con.close(); catch(sqlexception se) private boolean parseboolean(httpservletrequest request) String tmp = (String)request.getParameter(_KEY_OZ_DEBUG_); if("true".equalsignorecase(tmp)) return true; else return false; Step 3 DebugDMSampleServlet.class WAS. DebugDMSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf\classes\sample. DebugDMSampleServlet.class WAS. Tomcat 5.0 webapps\root\web-inf web.xml.... <!-- JSPC servlet mappings start -->... <servlet> <servlet-name>sample.debugdmsampleservlet </servlet-name> <servlet-class>sample.debugdmsampleservlet</servlet-class> </servlet>... <servlet-mapping> 70 FORCS Co., LTD

71 A Leader of Enterprise e-business Solution <servlet-name>sample.debugdmsampleservlet </servlet-name> <url-pattern>/sample.debugdmsampleservlet </url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> Step 4 ODI Servlet API (UDS),. POST "_OZ_ODIITEM_".. (UDS).. FORCS Co., LTD 71

72 OZ Framework User's Guide. [ ]. [].. 72 FORCS Co., LTD

73 A Leader of Enterprise e-business Solution. ( ). URL []. FORCS Co., LTD 73

74 OZ Framework User's Guide "_OZ_ODIITEM_=ODI" [].. ODI "JASMIN_SAMPLE2.odi". Step 5 XML SDM. 74 FORCS Co., LTD

75 A Leader of Enterprise e-business Solution XML SDM URL. &_OZ_DEBUG_=true&_OZ_ODIITEM_=JASMIN_SAMPLE2.odi XML SDM. FORCS Co., LTD 75

76 OZ Framework User's Guide 5 : FXDataModule Servlet API FX Data Accesses "_OZData_" Table,,. XML Servlet API ozsdmapi.jar, crimson.jar WAS. Step 1 ozsdmapi.jar crimson.jar WAS Servlet API ozsdmapi.jar, crimson.jar WAS. Tomcat 5.0 webapps\root\web-inf\lib ozsdmapi.jar, crimson.jar. Step 2 FXDataModule FXDataModule. java Test.class. package sample; import java.io.ioexception; import java.sql.connection; import java.sql.driver; import java.sql.preparedstatement; import java.sql.resultset; import java.sql.statement; import java.util.properties; import javax.servlet.servletexception; import javax.servlet.http.httpservlet; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; import oz.fxapi.core.convertexception; import oz.fxapi.core.dataactionparser; import oz.fxapi.dm.fx_dataaction; import oz.fxapi.dm.fx_datafieldmeta; import oz.fxapi.dm.fx_datamodule; import oz.fxapi.dm.fx_dataset; import oz.fxapi.dm.fx_datasetmeta; import oz.fxapi.dm.fx_datatypes; import oz.fxapi.dm.fx_parameter; import oz.fxapi.dm.fx_record; import oz.fxapi.dm.fx_unmatchingmetaexception; import oz.util.ozsql; import oz.util.ozstring; /** <p>title: Framework test module</p> * <p>description: Tests framework functionality </p> * <p>copyright: Copyright (c) 2006 by FORCS All rights reserved </p> * <p>company: FORCS Co.,LTD.</p> 76 FORCS Co., LTD

77 A Leader of Enterprise e-business Solution kgn */ public class Test extends HttpServlet private static final long serialversionuid = L; public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException process(request, response); private void process(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException String type = request.getparameter("type"); boolean iscompressed = "true".equalsignorecase(request.getparameter("compressed")); if (OZString.isNullOrEmpty(type)) throw new ServletException("Operation type not specified."); try if ("sdm".equalsignorecase(type)) processsdm(request, response, true, iscompressed); else if ("xml".equalsignorecase(type)) processsdm(request, response, false, iscompressed); else if ("dac".equalsignorecase(type)) processdac(request, response); else throw new ServletException("Unknown operation code; " + type); catch (Exception e) e.printstacktrace(); throw new ServletException(e.getMessage()); /** Generate data module which has master-detail relation request response issdm Exception */ private void processsdm(httpservletrequest request, HttpServletResponse response, boolean issdm, boolean iscompressed) throws Exception FX_DataModule dm = new FX_DataModule(); // Access does not support multiple ResultSet Connection con = null; Connection con2 = null; try String url = "jdbc:odbc:ozcar"; Properties prop = new Properties(); FORCS Co., LTD 77

78 OZ Framework User's Guide Driver driver = (Driver) Class.forName( "sun.jdbc.odbc.jdbcodbcdriver").newinstance(); con = driver.connect(url, prop); con2 = driver.connect(url, prop); catch (Exception e) dm.senderrormessage(response.getoutputstream(), issdm, iscompressed, e.getmessage()); OZSQL.close(con); OZSQL.close(con2); throw new ServletException(e.getMessage()); response.setcontenttype(issdm iscompressed? "application/octet-stream" : "text/xml"); FX_DataSetMeta fxmeta = new FX_DataSetMeta("IDs"); fxmeta.adddatafieldmeta(new FX_DataFieldMeta("CarID", FX_DataTypes.FX_DT_VARCHAR)); dm.adddatasetmeta(fxmeta); fxmeta = new FX_DataSetMeta("Informations"); fxmeta.adddatafieldmeta(new FX_DataFieldMeta("Maker", FX_DataTypes.FX_DT_VARCHAR)); fxmeta.adddatafieldmeta(new FX_DataFieldMeta("CarName", FX_DataTypes.FX_DT_VARCHAR)); fxmeta.adddatafieldmeta(new FX_DataFieldMeta("ECarName", FX_DataTypes.FX_DT_VARCHAR)); fxmeta.setmastersetname("ids"); dm.adddatasetmeta(fxmeta); Statement stmt = con.createstatement(); Statement stmt2 = con2.createstatement(); String id; ResultSet master = stmt.executequery("select CarID from car"); try FX_DataSet masterset = new FX_DataSet("IDs"); while (master.next()) FX_Record record = new FX_Record(); id = master.getstring(1); record.addcolumn("carid", id); car where CarID = '" if (!OZString.isNullOrEmpty(id)) ResultSet detail = stmt2.executequery("select Maker, CarName, ECarName from try + id + "'"); FX_DataSet detailset = new FX_DataSet("Informations"); while (detail.next()) FX_Record detailrecord = new FX_Record(); detailrecord.addcolumn("maker", detail.getstring(1)); detailrecord.addcolumn("carname", detail.getstring(2)); detailrecord.addcolumn("ecarname", detail.getstring(3)); detailset.addrecord(detailrecord); 78 FORCS Co., LTD

79 A Leader of Enterprise e-business Solution record.adddetailset(detailset); finally detail.close(); masterset.addrecord(record); dm.adddataset(masterset); catch (Exception e) dm.senderrormessage(response.getoutputstream(), issdm, iscompressed, e.getmessage()); throw e; finally master.close(); stmt.close(); stmt2.close(); OZSQL.close(con); OZSQL.close(con2); try String error = request.getparameter("error"); if(!ozstring.isnullorempty(error)) throw new FX_UnmatchingMetaException(error); dm.write(response.getoutputstream(), issdm, iscompressed); catch(fx_unmatchingmetaexception ue) dm.senderrormessage(response.getoutputstream(), issdm, iscompressed, ue.getmessage()); catch(convertexception ce) dm.senderrormessage(response.getoutputstream(), issdm, iscompressed, ce.getmessage()); catch(ioexception e) // ignore private void processdac(httpservletrequest request, HttpServletResponse response) throws Exception Connection con = null; try String url = "jdbc:odbc:ozcar"; Properties prop = new Properties(); prop.put("user", ""); prop.put("password", ""); Driver driver = (Driver) Class.forName( FORCS Co., LTD 79

80 OZ Framework User's Guide "sun.jdbc.odbc.jdbcodbcdriver").newinstance(); con = driver.connect(url, prop); catch (Exception e) OZSQL.close(con); throw new ServletException(e.getMessage()); FX_DataModule dm = new FX_DataModule(); FX_DataAction[] dacs = dm.getdataaction(request); for (int i = 0; i < dacs.length; i++) FX_DataAction dac = dacs[i]; String type = dac.getactiontype(); if ("insert".equalsignorecase(type)) // do insert insert(dac, con); else if ("delete".equalsignorecase(type)) // do delete delete(dac, con); else if ("rowupdate".equalsignorecase(type)) // to update update(dac, con); else throw new Exception("Illegal data action type; " + type); private String m_insert, m_update, m_delete; private static final String TABLENAME = "car"; private PreparedStatement m_insertstmt, m_deletestmt, m_updatestmt; private void insert(fx_dataaction dac, Connection con) throws Exception FX_Parameter[] srcfields = dac.getsourcefields(); if (OZString.isNullOrEmpty(m_insert)) // prepared. m_insert = "INSERT INTO " + TABLENAME + " ("; for (int i = 0; i < srcfields.length; i++) if (i == srcfields.length - 1) m_insert += srcfields[i].getname(); else m_insert += srcfields[i].getname() + ","; m_insert += ") VALUES ( "; for (int i = 0; i < srcfields.length; i++) if (i == srcfields.length - 1) m_insert += "?"; 80 FORCS Co., LTD

81 A Leader of Enterprise e-business Solution else m_insert += "?,"; m_insert += ")"; m_insertstmt = con.preparestatement(m_insert); for (int i = 0; i < srcfields.length; i++) m_insertstmt.setstring(i + 1, encode(srcfields[i].getvalue())); m_insertstmt.execute(); private void update(fx_dataaction dac, Connection con) throws Exception FX_Parameter[] srcfields = dac.getsourcefields(); FX_Parameter[] destfields = dac.gettargetfields(); if (OZString.isNullOrEmpty(m_update)) // prepared. m_update = "UPDATE " + TABLENAME + " set "; for (int i = 0; i < srcfields.length; i++) if (i == srcfields.length - 1) m_update += srcfields[i].getname() + " =? "; else m_update += srcfields[i].getname() + " =?, "; m_update += " WHERE "; for (int i = 0; i < destfields.length; i++) if (i == destfields.length - 1) m_update += destfields[i].getname() + " =? "; else m_update += destfields[i].getname() + " =? AND "; m_updatestmt = con.preparestatement(m_update); int i = 0; for (i = 0; i < srcfields.length; i++) m_updatestmt.setstring(i + 1, encode(srcfields[i].getvalue())); for (int k = 0; k < destfields.length; k++) m_updatestmt.setstring(i + 1, encode(destfields[k].getvalue())); FORCS Co., LTD 81

82 OZ Framework User's Guide i++; m_updatestmt.execute(); private void delete(fx_dataaction dac, Connection con) throws Exception FX_Parameter[] targetfields = dac.gettargetfields(); if (OZString.isNullOrEmpty(m_delete)) m_delete = "DELETE FROM " + TABLENAME + " WHERE "; for (int i = 0; i < targetfields.length; i++) if (i == targetfields.length - 1) m_delete += targetfields[i].getname() + " =? "; else m_delete += targetfields[i].getname() + " =? AND "; m_deletestmt = con.preparestatement(m_delete); int i = 0; for (i = 0; i < targetfields.length; i++) m_deletestmt.setstring(i + 1, encode(targetfields[i].getvalue())); m_deletestmt.execute(); private String encode(string value) try return new String(value.getBytes("8859_1"), "KSC5601"); catch(exception ex) return value; Step 3 Test.class WAS. Test.class. Tomcat 5.0 webapps\root\web-inf\classes sample. Test.class WAS. Tomcat FORCS Co., LTD

83 A Leader of Enterprise e-business Solution webapps\root\web-inf web.xml.... <!-- JSPC servlet mappings start -->... <servlet> <servlet-name>sample.test</servlet-name> <servlet-class>sample.test</servlet-class> </servlet>... <servlet-mapping> <servlet-name>sample.test </servlet-name> <url-pattern>/test </url-pattern> </servlet-mapping>... <!-- JSPC servlet mappings end --> Step 4 FX Data Accesses "_OZData_" [ FX DataSet] []. [ ]. [ Detail FX DataSet] [] FORCS Co., LTD 83

84 OZ Framework User's Guide. [ ]. -. Step 5 OZA Board Panel, Label, TextBox, Button, Table,. Label Lable "Text" "CarID", "Maker", "CarName", "ECarName". 84 FORCS Co., LTD

85 A Leader of Enterprise e-business Solution Button 4 Button "Text" "XML ", "Insert", "Update", "Delete". TextBox (Location), (Size) TextBox. TextBox1 "ODIKey" "_OZData_", "DataSet" "IDs", "Field" "CarID" "TextBox2", "TextBox3", "TextBox4" "ODIKey" "_OZData_", "DataSet" "Informations" "Field" "Maker", "CarName", "ECarName". Table 2 Table1 "ODIKey" "_OZData_", "DataSet" "IDs", "FireRowCursorChange" "True" Table2 "ODIKey" "_OZData_", "DataSet" "Informations". Table1 "CarID", Table2 "Maker", "CarName", "ECarName". Step 5 XML DataAction. [XML ] "OnClick" XML. _GetFXDataModule().RemoveAllDataSet(); var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // XML, xmlhttp.open("post", " false); xmlhttp.send(""); var dm = _GetFXDataModule(); dm.applydata(xmlhttp.responsestream); if(dm.fxerrormessage!= "") _MessageBox(dm.FXErrorMessage); [Insert] "OnClick" "CarID: K04". _GetFXDataModule().RemoveAllDataSet(); FORCS Co., LTD 85

86 OZ Framework User's Guide var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // XML, xmlhttp.open("post", F_0=CarID&0.SFT_0=VARCHAR&0.SV_0=K04&0.SF_1=Maker&0.SFT_1=VARCHAR&0.SV_1= &0.SF_2=CarName&0.SFT_2=VARCHAR&0.SV_2=&0.SF_3=ECarName&0.SFT_3 =VARCHAR&0.SV_3=SEPHIA, false); xmlhttp.send(""); var dm = _GetFXDataModule(); dm.applydata(xmlhttp.responsestream); if(dm.fxerrormessage!= "") _MessageBox(dm.FXErrorMessage); [Update] 'OnClick' "CarID: K04". _GetFXDataModule().RemoveAllDataSet(); var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // XML, xmlhttp.open("post", " &0.SF_0=ECarName&0.SFT_0=VARCHAR&0.SV_0=SEPHIA2&0.TRG_CNT=1&0.DF_0=CarID&0.D FT_0=VARCHAR&0.DV_0=K04", false); xmlhttp.send(""); var dm = _GetFXDataModule(); dm.applydata(xmlhttp.responsestream); if(dm.fxerrormessage!= "") _MessageBox(dm.FXErrorMessage); [Delete] "OnClick" "CarID: K04". _GetFXDataModule().RemoveAllDataSet(); var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // XML, xmlhttp.open("post", F_0=CarID&0.DFT_0=VARCHAR&0.DV_0=K04, false); xmlhttp.send(""); var dm = _GetFXDataModule(); 86 FORCS Co., LTD

87 A Leader of Enterprise e-business Solution dm.applydata(xmlhttp.responsestream); if(dm.fxerrormessage!= "") _MessageBox(dm.FXErrorMessage); Step 6 WAS. [File] [Preview] ( ). FORCS Co., LTD 87

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 User Data Store Manual... 6 UDS... 6 JDBC UDS... 12 Connection UDS... 17 Connection UDS... 23 DataAction... 31 DataAction... 31 - DataAction... 46... 68 HttpRequest... 76 ResultSet... 83 OZ User Data

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 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

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

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

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

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

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

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 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

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

歯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

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

신림프로그래머_클린코드.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

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

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

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

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

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

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

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

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

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

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

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

자바-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

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

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

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

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

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

개발문서 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

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

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

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

교육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

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

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

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

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

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

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

목차 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

목차 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

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

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

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

mytalk

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

More information

untitled

untitled API... 5 Class Cache... 7 Class ConnectionPool... 12 Class DataBind... 17 Class Log... 21 Class Module... 25 Class Monitor... 43 Class Repository... 47 Class Service... 92 Class Viewer... 96 API... 105

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

Microsoft PowerPoint - web-part03-ch19-node.js기본.pptx

Microsoft PowerPoint - web-part03-ch19-node.js기본.pptx 과목명: 웹프로그래밍응용 교재: 모던웹을 위한 JavaScript Jquery 입문, 한빛미디어 Part3. Ajax Ch19. node.js 기본 2014년 1학기 Professor Seung-Hoon Choi 19 node.js 기본 이 책에서는 서버 구현 시 node.js 를 사용함 자바스크립트로 서버를 개발 다른서버구현기술 ASP.NET, ASP.NET

More information

쉽게 풀어쓴 C 프로그래밊

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

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

untitled

untitled FORCS Co., LTD 1 2 FORCS Co., LTD . Publishing Wizard Publishing Wizard Publishing Wizard Publishing Wizard FORCS Co., LTD 3 Publishing Wizard Publidhing Wizard HTML, ASP, JSP. Publishing Wizard [] []

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

서블릿의라이프사이클 뇌를자극하는 JSP & Servlet

서블릿의라이프사이클 뇌를자극하는 JSP & Servlet 서블릿의라이프사이클 뇌를자극하는 JSP & Servlet Contents v 학습목표 서블릿클래스로부터서블릿객체가만들어지고, 서블릿객체가초기화되어서서블릿이되고, 서블릿이사용되고, 최종적으로소멸되기까지의전과정을서블릿의라이프사이클이라고한다. 이장에서는서브릿의라이프사이클에관련된프로그래밍기술을배워보자. v 내용 서블릿의라이프사이클 서블릿클래스의 init 메서드의 destroy

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) 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

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

@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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 실습문제 Chapter 05 데이터베이스시스템... 오라클로배우는데이터베이스개론과실습 1. 실습문제 1 (5 장심화문제 : 각 3 점 ) 6. [ 마당서점데이터베이스 ] 다음프로그램을 PL/SQL 저장프로시져로작성하고실행해 보시오. (1) ~ (2) 7. [ 마당서점데이터베이스 ] 다음프로그램을 PL/SQL 저장프로시져로작성하고실행해 보시오. (1) ~ (5)

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

교육자료

교육자료 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

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

歯처리.PDF

歯처리.PDF E06 (Exception) 1 (Report) : { $I- } { I/O } Assign(InFile, InputName); Reset(InFile); { $I+ } { I/O } if IOResult 0 then { }; (Exception) 2 2 (Settling State) Post OnValidate BeforePost Post Settling

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

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

untitled

untitled API... 3 Class Cache... 5 Class ConnectionPool... 10 Class DataBind... 15 Class Log... 19 Class Module... 23 Class Monitor... 36 Class Repository... 40 Class Service... 86 Class Viewer... 89 API... 97

More information

untitled

untitled API... 4 Class Cache... 6 Class ConnectionPool... 11 Class DataBind... 23 Class Log... 27 Class Mail... 31 Class Module... 38 Class Monitor... 50 Class Service... 55 Class Viewer... 59 Class Servlet......

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

Dialog Box 실행파일을 Web에 포함시키는 방법

Dialog Box 실행파일을 Web에 포함시키는 방법 DialogBox Web 1 Dialog Box Web 1 MFC ActiveX ControlWizard workspace 2 insert, ID 3 class 4 CDialogCtrl Class 5 classwizard OnCreate Create 6 ActiveX OCX 7 html 1 MFC ActiveX ControlWizard workspace New

More information

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가 혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가웹페이지내에뒤섞여있어서웹페이지의화면설계가점점어려워진다. - 서블릿이먼저등장하였으나, 자바내에

More information

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드]

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드] - Socket Programming in Java - 목차 소켓소개 자바에서의 TCP 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 Q/A 에코프로그램 - EchoServer 에코프로그램 - EchoClient TCP Programming 1 소켓소개 IP, Port, and Socket 포트 (Port): 전송계층에서통신을수행하는응용프로그램을찾기위한주소

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# 21일 완성

초보자를 위한 C# 21일 완성 C# 21., 21 C#., 2 ~ 3 21. 2 ~ 3 21.,. 1~ 2 (, ), C#.,,.,., 21..,.,,, 3. A..,,.,.. Q&A.. 24 C#,.NET.,.,.,. Visual C# Visual Studio.NET,..,. CD., www. TeachYour sel f CSharp. com., ( )., C#.. C# 1, 1. WEEK

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

untitled

untitled API... 3 Class Cache... 5 Class ConnectionPool... 10 Class DataBind... 15 Class Log... 19 Class Module... 23 Class Monitor... 34 Class Repository... 38 Class Service... 84 Class Viewer... 87 API... 95

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

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

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

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

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

ibmdw_rest_v1.0.ppt

ibmdw_rest_v1.0.ppt REST in Enterprise 박찬욱 1-1- MISSING PIECE OF ENTERPRISE Table of Contents 1. 2. REST 3. REST 4. REST 5. 2-2 - Wise chanwook.tistory.com / cwpark@itwise.co.kr / chanwook.god@gmail.com ARM WOA S&C AP ENI

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

Microsoft PowerPoint - 03-TCP Programming.ppt

Microsoft PowerPoint - 03-TCP Programming.ppt Chapter 3. - Socket in Java - 목차 소켓소개 자바에서의 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 에코프로그램 - EchoServer 에코프로그램 - EchoClient Q/A 1 1 소켓소개 IP,, and Socket 포트 (): 전송계층에서통신을수행하는응용프로그램을찾기위한주소 소켓 (Socket):

More information

뇌를 자극하는 JSP & Servlet 슬라이드

뇌를 자극하는 JSP & Servlet 슬라이드 서블릿의라이프사이클 JSP & Servlet 2/39 Contents 학습목표 서블릿클래스로부터서블릿객체가만들어지고, 서블릿객체가초기화되어서서블릿이되고, 서블릿이사용되고, 최종적으로소멸되기까지의전과정을서블릿의라이프사이클이라고한다. 이장에서는서브릿의라이프사이클에관련된프로그래밍기술을배워보자. 내용 서블릿의라이프사이클 서블릿클래스의 init 메서드의 destroy

More information

Microsoft PowerPoint - aj-lecture7.ppt [호환 모드]

Microsoft PowerPoint - aj-lecture7.ppt [호환 모드] Servlet 이해하기 웹 MVC 524730-1 2019 년봄학기 4/29/2019 박경신 Servlet 자바플랫폼에서컴포넌트기반의웹애플리케이션개발기술 JSP는서블릿기술에기반함 Servlet의프리젠테이션문제를해결하기위해 JSP가등장 이로인해웹애플리케이션의유지보수어려움심각. JSP 모델2가주목받으며다시서블릿에대한중요성부각 Servlet 변천 1 서블릿문제점대두

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

3장

3장 C H A P T E R 03 CHAPTER 03 03-01 03-01-01 Win m1 f1 e4 e5 e6 o8 Mac m1 f1 s1.2 o8 Linux m1 f1 k3 o8 AJAX

More information

OCaml

OCaml OCaml 2009.. (khheo@ropas.snu.ac.kr) 1 ML 2 ML OCaml INRIA, France SML Bell lab. & Princeton, USA nml SNU/KAIST, KOREA 3 4 (let) (* ex1.ml *) let a = 10 let add x y = x + y (* ex2.ml *) let sumofsquare

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

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

untitled

untitled FORCS Co., LTD 1 OZ Query Designer User's Guide 2 FORCS Co., LTD FORCS Co., LTD 3 OZ Query Designer User's Guide 4 FORCS Co., LTD FORCS Co., LTD 5 OZ Query Designer User's Guide UI. (ODI)., ODI. 6 FORCS

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

제목을 입력하세요.

제목을 입력하세요. 1. 4 1.1. SQLGate for Oracle? 4 1.2. 4 1.3. 5 1.4. 7 2. SQLGate for Oracle 9 2.1. 9 2.2. 10 2.3. 10 2.4. 13 3. SQLGate for Oracle 15 3.1. Connection 15 Connect 15 Multi Connect 17 Disconnect 18 3.2. Query

More information

03장

03장 CHAPTER3 ( ) Gallery 67 68 CHAPTER 3 Intent ACTION_PICK URI android provier MediaStore Images Media EXTERNAL_CONTENT_URI URI SD MediaStore Intent choosepictureintent = new Intent(Intent.ACTION_PICK, ë

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

Polly_with_Serverless_HOL_hyouk

Polly_with_Serverless_HOL_hyouk { } "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "polly:synthesizespeech", "dynamodb:query", "dynamodb:scan", "dynamodb:putitem", "dynamodb:updateitem", "sns:publish", "s3:putobject",

More information