2012年3月11日
摘要: 匿名类是不能有名称的类,所以没办法引用它们。必须在创建时,作为new语句的一部分来声明它们。 这就要采用另一种形式的new语句,如下所示: new <类或接口> <类的主体> 这种形式的new语句声明一个新的匿名类,它对一个给定的类进行扩展,或者实现一个给定的接口。它还创建那个类的一个新实例,并把它作为语句的结果而返回。要扩展的类和要实现的接口是new语句的操作数,后跟匿名类的主体。 如果匿名类对另一个类进行扩展,它的主体可以访问类的成员、覆盖它的方法等等,这和其他任何标准的类都是一样的。如果匿名类实现了一个接口,它的主体必须实现接口的方法。如下所示的例子:接口:1 p 阅读全文
posted @ 2012-03-11 20:09 Coldest Winter 阅读(1054) 评论(0) 推荐(0) 编辑
摘要: 以下是本文的参考网址:http://www.javacamp.org/designPattern/http://coolxing.iteye.com/blog/1446760http://luchar.iteye.com/blog/179619构造模式是一种对象的创建方式,它可以将一个复杂对象的内部构造特征与内部的构建过程完全分开,构造模式的种类很多,(有多种实现方式,每个实现方式不同,但是原理是相同的)可以总结出,构造模式主要设计四个角色:1、客户端角色(Client):调用具体的构造器,完成对象的构建,注意,这个角色只负责构造器的创建和选择,对于产品的具体信息不知晓。2、抽象构造器角色(B 阅读全文
posted @ 2012-03-11 07:52 Coldest Winter 阅读(362) 评论(0) 推荐(0) 编辑
  2012年3月10日
摘要: ThreadLocal模式是为了解决多线程程序中,数据共享的问题,ThreadLocal模式贯穿了整个Struts2和Xwork框架。 阅读全文
posted @ 2012-03-10 20:44 Coldest Winter 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 进程:它是程序的一次动态执行过程,它需要经历从代码加载,到代码执行,到执行完毕的一个完整过程,这个过程也是进程从产生、发展到最终消亡的过程。线程:线程是比进程更小的执行单位,它是在进程的基础上进一步划分,所谓多线程,是指一个进程在执行的过程可以产生多个更小的程序单元,这些更小的单元-称为线程。这些线程可以同时存在,同时运行,一个进程可能产生多个同时执行的线程。----------java中进程的实现:1、继承Thread类实现多线程: 1 package com.dyj.test; 2 3 public class TestThread extends Thread { 4 5 p... 阅读全文
posted @ 2012-03-10 19:59 Coldest Winter 阅读(544) 评论(0) 推荐(0) 编辑
摘要: Oracle 修改表的限制 To make a NOT NULL column nullable, use the alter table command with the NULL clause,as follows:alter table TROUBLE modify(Condition NULL);The Rules for Adding or Modifying a ColumnThese are the rules for modifying a column: (在任何情况下) 1、You can increase a character column’s wi... 阅读全文
posted @ 2012-03-10 14:18 Coldest Winter 阅读(279) 评论(0) 推荐(0) 编辑
摘要: http://orafaq.com/node/854ORACLE锁: Oracle uses locks to control concurrent access to data. A lock gives you temporary ownership of a database resource such as a table or row of data. Thus, data cannot be changed by other users until you finish with it. You need never explicitly lock a resource becau 阅读全文
posted @ 2012-03-10 12:06 Coldest Winter 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 注意:国际通用的日期中;周末才是一个周的第一天ROUND and TRUNC Date Functionsnext lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, 'DD', returns the date rounded or truncated to the day with a time of midnight.Date F 阅读全文
posted @ 2012-03-10 11:55 Coldest Winter 阅读(641) 评论(0) 推荐(0) 编辑
摘要: CASE expression perform if-then-else logic in SQL without having to use PL/SQL.CASE works in a similar manner to DECODE().CASE is ANSI-compliant.There are two types of CASE expressions: Simple case expressions use expressions to determine the returned value. Searched case expressions use condi... 阅读全文
posted @ 2012-03-10 09:44 Coldest Winter 阅读(848) 评论(0) 推荐(2) 编辑
  2012年3月8日
摘要: 本文参考网址:http://psoug.org/reference/with.html http://www.oracle-base.com/articles/misc/with-clause.php http://gennick.com/with.html------Understanding the WITH Claus 参考文档下载地址:http://ishare.iask.sina.com.cn/f/21674385.html The WITH query_name clause lets you assign a nam... 阅读全文
posted @ 2012-03-08 20:56 Coldest Winter 阅读(3917) 评论(0) 推荐(1) 编辑
  2012年3月7日
摘要: As of Oracle Database 10g, you can use the flashback table and flashback databasecommands to simplify your data-recovery efforts. The flashback table commandautomates the process of restoring a full table to its prior state. The flashbackdatabase command flashes back an entire database, and it req.. 阅读全文
posted @ 2012-03-07 22:38 Coldest Winter 阅读(352) 评论(0) 推荐(0) 编辑