Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Siebel Java Data Bean: Query first record

Following codes will show you how to query the first record from DB using Java Data Bean. package com ;
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() ;

String acctName = m_busComp.getFieldValue("Name");
System.out.println(acctName);

// log off
m_dataBean.logoff();
}
catch (SiebelException e)
{
System.out.


Ïà¹ØÎĵµ£º

JavaÈëÃŽ̳Ì

×î½üÎÒ·¢ÏÖ²»ÉÙ³õѧÕߣ¬Ñ§Ï°javaµÄʱºò£¬¿´Á˺öàjavaµÄÀúÊ·¡¢ÓŵãºÍÓ¦Ó÷¶Î§¡£¶ÔÓÚÕâЩ֪ʶ£¬²¢²»ÄÑÀí½â¡£ÎÒÒ²µ±È»Í¬ÒâjavaÊÇÒ»ÖÖÓÅÐãµÄ¼ÆËã»úÓïÑÔ¡£µ«ÊǶÔÓÚÎÒÃÇÀ´ËµÒªÁ˽âµÄ²¢²»ÊÇ£¬ÕâЩÀúÊ·µÈ֪ʶ¡£¶øÊÇÕÆÎÕjavaÕâÌ×¼¼Êõ¡£ÒªÏëÕÆÎÕÕâÌ×¼¼Êõʵ¼ùÊǷdz£ÖØÒªµÄ¡£ÄÇôºÜ¶à³õѧÕߣ¬ÔÚµÚÒ»²½Êµ¼ùµÄʱºò¾ÍÓöµ½ÁËÀ§ÄÑ£¬¾ÍÊÇÅäÖà ......

Java ¶àÏ̱߳à³ÌÖ®Áù£ºÏß³ÌÖ®¼äµÄͨÐÅ£¨¸½Ô´´úÂ룩

Java ¶àÏ̱߳à³ÌÖ®Áù£ºÏß³ÌÖ®¼äµÄͨÐÅ£¨¸½Ô´´úÂ룩
Ô´´úÂëÏÂÔØ
       
¶àÏ̱߳à³ÌÖУ¬Ïß³ÌÖ®¼äµÄͨÐÅÊÇÒ»¸ö±È½Ï¸´ÔÓµÄÎÊÌâ¡£´ó¼ÒÍùÍù¸ã²»¶®Ê²Ã´ÊǾºÕù×ÊÔ´£¿Ê²Ã´Ê±ºò¿¼ÂÇͬ²½£¿Ôõô½øÐÐͬ²½£¿Ê²Ã´ÊÇÏß³ÌͨÐÅ£¿Ôõô½øÐÐͨÐÅ£¿ºÜ
¶àÅóÓÑÃæÊÔµÄʱºò¶¼Óöµ½¹ýÕâÑùÀàËƵÄÒ»¸ö±à³ÌÌ⣺¸ø¶ ......

JAVA¹æ·¶Ñ§Ï°——static³ÉÔ±³õʼ»¯

class Super { static int taxi = 1729; }
class Sub extends Super {
static { System.out.print("Sub "); }
}
class Test {
public static void main(String[] args) {
System.out.println(Sub.taxi);
}
}
Êä³ö£º1729
֪ʶҪµã£º
A reference to a class field causes initialization of ......

java ¼òµ¥¹¤³§Éè¼Æģʽ

ÏÈд³ÌÐò£¬ÔÚÀ´½âÊͼòµ¥¹¤³§ºÍ¹¤³§·½·¨Ä£Ê½¡£
1¡¢¶¨ÒåÒ»¸öÆû³µ½Ó¿Ú
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 2:35:15 PM
* Version:1.0
*/
public interface Car {
public void start() ;
}

½Ó¿ÚÀïÃ涨ÒåÒ»¸ö·½·¨£ºstart( ......

java½Ó¿ÚºÍ³éÏóÀàµÄÇø±ð

¼òµ¥À´Ëµ£¬ ½Ó¿ÚÊǹ«¿ªµÄ£¬ÀïÃæ²»ÄÜÓÐ˽Óеķ½·¨»ò±äÁ¿£¬ÊÇÓÃÓÚÈñðÈËʹÓõģ¬¶ø³éÏóÀàÊÇ¿ÉÒÔÓÐ˽Óз½·¨»ò˽ÓбäÁ¿µÄ£¬ÁíÍ⣬ʵÏÖ½Ó¿ÚµÄÒ»¶¨ÒªÊµÏÖ½Ó¿ÚÀﶨÒåµÄËùÓз½·¨£¬¶øʵÏÖ³éÏóÀà¿ÉÒÔÓÐÑ¡ÔñµØÖØдÐèÒªÓõ½µÄ·½·¨¡£
Ò»°ãµÄÓ¦ÓÃÀ×¼¶µÄÊǽӿڣ¬È»ºóÊdzéÏóÀàʵÏÖ½Ó¿Ú£¬×îºó²Åµ½¾ßÌåÀàʵÏÖ¡£
»¹ÓУ¬½Ó¿Ú¿ÉÒÔʵÏÖ¶àÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ