- 浏览: 42457 次
- 性别:
- 来自: 杭州
最新评论
文章列表
public class IDCardFactory extends Factory {
private Vector owners = new Vector();
protected Product createProduct(String owner) {
return new IDCard(owner);
}
protected void registerProduct(Product product) {
owners.add(((IDCard)product).getOwner());
}
...
public class IDCardFactory extends Factory {
private Vector owners = new Vector();
protected Product createProduct(String owner) {
return new IDCard(owner);
}
protected void registerProduct(Product product) {
owners.add(((IDCard)product).getOwner());
}
...
import FactoryMethod.Sample.framework.Factory;
import FactoryMethod.Sample.framework.Product;
public class IDCardFactory extends Factory {
private Vector owners = new Vector();
protected Product createProduct(String owner) {
return new IDCard(owner);
}
protected voi ...
import AbstractFactory.Sample.factory.*;
public class Main
{
public static void main(String[] args)
{
if (args.length != 1)
{
System.out.println("Usage: java Main class.name.of.ConcreteFactory");
System.out.println("Example ...
import java.util.Iterator;
import AbstractFactory.Sample.factory.Factory;
public class ListFactory extends Factory {
public Link createLink(String caption, String url) {
return new ListLink(caption, url);
}
public Tray createTray(String caption) {
return new ListTr ...
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Vector;
public abstract class Factory
{
public static Factory getFactory(String classname)
{
Factory factory = null;
try
{
factory = (Factory)Class.for ...
public class Singleton
{
// private static Singleton singleton = null;
//
// private Singleton()
// {
// }
//
// public static Singleton getInstance()
// {
// if (singleton == null)
// {
// singleton = new Singleton();
// }
// ...
public class Main
{
public static void main(String[] args)
{
PrinterProxy p = new PrinterProxy("Alice");
System.out.println(p.getPrinterName());
p.setPrinterName("Bob");
System.out.println(p.getPrinterName());
p.print(" ...
public class Book
{
private String name;
public Book(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public static void main(String[] args)
{
BookShelf bookShelf = new BookShelf(3) ...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframewo ...
A:内信息表结构更改
1.1. 创建站内信息表RANGE分区表
-- Create table
create table US_INTERNALINFO_BACK
(
MSGID NUMBER(19) not null,
RECMSISDN VARCHAR2(11) not null,
SENDMSISDN VARCHAR2(11) not null,
TYPE VARCHAR2(2) not null,
ISREAD VARCHAR2(1) not null,
SENDTIME DATE not null,
...
全卸载Oracle方法:
软件环境:
1、Windows XP + Oracle 10g
2、Oracle安装路径为:d:\Oracle
1、如果数据库配置了自动存储管理(ASM),应该先删除聚集同步服务CSS(cluster Synchronization Services).删除CSS服务的方法是在DOS命令行中执行如下命令: localconfig delete
2、在“服务”窗口中停止Oracle的所有服务。
3、在“开始”菜单中依次选择“程序”/“Oracle-OraDb10g_home1"/"Oracle Installation Products”/ ...
语法:(其中as可以省略)
MERGE INTO table_name AS table_alias
USING (table|view|sub_query) AS alias
ON (join condition)
WHEN MATCHED THEN
UPDATE SET
col1 = col_val1,
col2 = col2_val --9i 不可以有where条件,10g 可以
WHEN NOT MATCHED THEN
INSERT (column_list)—多个列以逗号分割 //可以不指定列
VALUES (column_values); --9i 不可以有where条件,10g ...
[Q]怎么快速查找锁与锁等待
[A]数据库的锁是比较耗费资源的,特别是发生锁等待的时候,我们必须找到发生等待的锁,有可能的话,杀掉该进程。
这个语句将查找到数据库中所有的DML语句产生的锁,还可以发现,任何DML语句其实产生了两个锁,一个是表锁,一个是行锁。
可以通过alter system kill session ‘sid,serial#’来杀掉会话
SELECT /*+ rule */ s.username,
decode(l.type,'TM','TABLE LOCK',
'TX','ROW LOCK',
...
package com.albert.spring.proxy;
import java.lang.reflect.Method;
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
public class CglibProxy implements MethodInterceptor
{
private Object target;
...