java Annotation Æ´×°SQLÓï¾ä
ÉùÃ÷×Ö¶ÎÓ³Éä
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FiledRef
{
String fieldName();
}
ÉùÃ÷±íÓ³Éä
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TableRef
{
String tableName();
}
²âÊÔÀà
@TableRef(tableName = "MobDevice")
public class ReflectTest
{
@FiledRef(fieldName = "ID")
private Long id;
@FiledRef(fieldName = "DEVICE_NAME")
private String name;
@FiledRef(fieldName = "DEVICE_CODE")
private String code;
public ReflectTest(Long id, String name, String code)
{
this.id = id;
this.name = name;
this.code = code;
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getCode()
{
return code;
}
public void setCode(String code)
{
this.code = code;
}
/**
* @description
* @author zhangml
 
Ïà¹ØÎĵµ£º
Ö÷Òª´úÂë²Î¿¼ÁËbeansoftµÄZipUtil,Ìí¼ÓÁËÒ»¸ö·½·¨£¬
¿ÉÒ԰Ѳ»Í¬Ä¿Â¼ÎļþÌí¼Óµ½zipÖÐ,²¢×öÁËһЩ¸Ä½ø£¬Ê¹ÓÃÁËapacheµÄzipÀ࣬(ÔΪjdkµÄzipÀà)£¬Ê¹Ö§³ÖÖÐÎÄÎļþÃû¡£
apacheµÄzipÀà¿ÉÒÔ´ÓantÖгéÈ¡¡£apacheºÃÏñûÓÐÌṩµ¥¶ÀÏÂÔØ¡£
package com.order;
import java.io.*;
import java.util.List;
import org.apache.tool ......
Ò»¡¢ÀûÓÃjdk web·þÎñapiʵÏÖ£¬ÕâÀïʹÓûùÓÚ SOAP message µÄ Web ·þÎñ
¡¡¡¡1.Ê×ÏȽ¨Á¢Ò»¸öWeb services EndPoint£º
¡¡¡¡Java´úÂë
¡¡¡¡package Hello;
¡¡¡¡import javax.jws.WebService;
¡¡¡¡import javax.jws.WebMethod;
¡¡¡¡import javax.xml.ws.Endpoint;
¡¡¡¡@WebService
¡¡¡¡public class Hello {
¡¡¡¡@WebMet ......
ʹÓÃÀ༯²»½ö¿ÉÒÔ±íʾ³öÒ»¶ÔÒ»µÄ¹Øϵ£¬Ò²¿ÉÒÔ±íʾ³ö¶à¶Ô¶àµÄ¹Øϵ¡£ÀýÈ磬һ¸öѧÉú¿ÉÒÔÑ¡¶àÃſγ̣¬Ò»Ãſγ̿ÉÒÔÓжà¸öѧÉú²Î¼Ó£¬ÄÇôÕâ¾ÍÊÇÒ»¸öµäÐ͵Ķà¶Ô¶à¹Øϵ¡£
ÒªÍê³É±¾³ÌÐò£¬Ê×ÏÈÓ¦¸Ã¶¨ÒåÁ½¸öÀࣺѧÉúÐÅÏ¢ÀàStudent¡¢¿Î³ÌÐÅÏ¢ÀàCourse¡£ÔÚÒ»¸öѧÉúÀàÖдæÔÚÒ»¸ö¼¯ºÏ£¬±£´æÈ«²¿µÄ¿Î³Ì£»¶øÔڿγÌÀàÖ ......
SQLÖÐobject_idº¯ÊýµÄÓ÷¨ ÊÕ²Ø
int object_id('objectname');
´Ë·½·¨·µ»ØÊý¾Ý¿â¶ÔÏó±êʶºÅ¡£
ÆäÖУ¬²ÎÊýobjectname ±íʾҪʹÓõĶÔÏó£¬ÆäÊý¾ÝÀàÐÍΪnchar»òchar£¨Èç¹ûΪchar£¬ÏµÍ³½«Æäת»»Îªnchar£©
·µ»ØÀàÐÍΪint£¬±íʾ¸Ã¶ÔÏóÔÚϵͳÖеıàºÅ¡£
±ÈÈ磺
use wf_timesheet
select object_id('usp_check_excess ......
select sql_text, spid, v$session.program, process
from v$sqltext, v$session, v$process
where v$sqltext.address = v$session.sql_address
and v$sqltext.hash_value = v$session.sql_hash_value
and v$session.paddr = v$process.addr
and v$process.spid in (4335);
×¢Ò ......