Siebel Java Data Bean: Query muti record
Following code is used for retrive all the record of Business Component from DataBase. package com.muti.records ;
import com.siebel.data.*;
import com.siebel.data.SiebelException;
public class DataBeanDemo {
private SiebelDataBean m_dataBean = null;
private SiebelBusObject m_busObject = null;
private SiebelBusComp m_busComp = null;
public static void main(String[] args)
{
DataBeanDemo demo = new DataBeanDemo();
}
public DataBeanDemo()
{
try
{
// instantiate the Siebel Data Bean
m_dataBean = new SiebelDataBean();
// log in to the server
//the name or IP address of your Siebel Server
String SiebelServerhost = "192.168.1.120" ;
//listening port number for the SCBroker component (default 2321)
String SCBPort = "2321" ;
String enterpriseServer = "SBA_81" ;
String AppObjMgr_enu = "EAIObjMgr_enu" ;
m_dataBean.login("Siebel://"+SiebelServerhost+":"+SCBPort+"/"+enterpriseServer+"/"+AppObjMgr_enu, "SADMIN", "SADMIN", "enu");
// get the business object
m_busObject = m_dataBean.getBusObject("Account");
// get the business component
m_busComp = m_busObject.getBusComp("Account");
m_busComp.clearToQuery() ;
m_busComp.setSearchExpr("[Name] like '*'");
m_busComp.executeQuery(true) ;
m_busComp.firstRecord() ;
System.out.println(m_busComp.getFieldValue("Name"));
while(m_busComp.nextRecord())
{
String acctName = m_busComp.getFieldValue("Name");
System.out.printl
Ïà¹ØÎĵµ£º
1. ÉùÃ÷(Declarations)
5.1 ÿÐÐÉùÃ÷±äÁ¿µÄÊýÁ¿(Number Per Line)
ÍƼöÒ»ÐÐÒ»¸öÉùÃ÷£¬ÒòΪÕâÑùÒÔÀûÓÚдעÊÍ¡£Ò༴£¬
int level; // indentation level
int size; // size of table
ÒªÓÅÓÚ£¬
int level, size;
²»Òª½«²»Í¬ÀàÐͱäÁ¿µÄÉùÃ÷·ÅÔÚͬһÐУ¬ÀýÈ磺
int foo, foo ......
1. ±à³Ì¹ßÀý(Programming Practices)
9.1 Ìṩ¶ÔʵÀýÒÔ¼°Àà±äÁ¿µÄ·ÃÎÊ¿ØÖÆ(Providing Access to Instance and Class Variables)
ÈôûÓÐ×ã¹»ÀíÓÉ£¬²»Òª°ÑʵÀý»òÀà±äÁ¿ÉùÃ÷Ϊ¹«ÓС£Í¨³££¬ÊµÀý±äÁ¿ÎÞÐèÏÔʽµÄÉèÖÃ(set)ºÍ»ñÈ¡(gotten)£¬Í¨³£Õâ×÷Ϊ·½·¨µ÷ÓõıßԵЧӦ (side effect ......
package thread;
public class ThreadTest {
public static void main(String args[])
{
//new TestThread ().start();
TestThread tt= new TestThread();//´´½¨TestThreadÀàµÄÒ»¸öʵÀý
Thread t= new Thread(tt);//´´½¨Ò»¸öThreadÀàµÄʵÀý
t.start();//ʹÏ߳̽øÈëRunnable״̬
new Thread(tt).star ......
Ò»¡¢Ï̸߳ÅÊö
Ïß³ÌÊdzÌÐòÔËÐеĻù±¾Ö´Ðе¥Ôª¡£µ±²Ù×÷ϵͳ(²»°üÀ¨µ¥Ï̵߳IJÙ×÷ϵͳ£¬Èç΢ÈíÔçÆÚµÄDOS)ÔÚÖ´ÐÐÒ»¸ö³ÌÐòʱ£¬»áÔÚϵͳÖн¨Á¢Ò»¸ö½ø³Ì£¬¶øÔÚÕâ¸ö½ø³ÌÖУ¬±ØÐëÖÁÉÙ½¨Á¢Ò»¸öỊ̈߳¨Õâ¸öÏ̱߳»³ÆΪÖ÷Ị̈߳©À´×÷ΪÕâ¸ö³ÌÐòÔËÐеÄÈë¿Úµã¡£Òò´Ë£¬ÔÚ²Ù×÷ϵͳÖÐÔËÐеÄÈκγÌÐò¶¼ÖÁÉÙÓÐÒ»¸öÖ÷Ï̡߳£
½ø³ÌºÍÏß³ÌÊÇÏÖ´ú²Ù× ......
JavaÖÐͨ¹ýimplements SerializableÀ´ÊµÏÖ¶ÔÏóµÄÐòÁл¯¡£ÆäʵSerializable½Ó¿ÚÖв¢Ã»ÓÐÐèҪʵÏֵķ½·¨£¬×¢Ã÷ij¸öÀàimplements SerializableÖ»ÊÇΪÁ˱êʶ»ò±íÃ÷Õâ¸öÀà¿ÉÒÔ±»ÐòÁл¯¡£
ÄÇôʲôÊÇÐòÁл¯ÄØ£¬ÐòÁл¯ÓÖÓÐʲô×÷ÓÃÄØ£¿
Ò»¸öÀ࣬»ò ......