`
liuxinglanyue
  • 浏览: 572155 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
一、流程定义 1.部署流程定义    ProcessEngine processEngine = new Configuration().buildProcessEngine();    RepositoryService repositoryService = processEngine.getRepositoryService();   例:布署文件中的流程    //布署当前目录下pd.jpdl.xml文件    String deploymentId = repositoryService.createDeployment()                          .addR ...
COMPOSITE (Object Structural) Purpose Facilitates the creation of object hierarchies where each object can be treated independently or as a set of nested objects through the same interface. Use When 1 Hierarchical representations of objects are needed.. 2 Objects and compositions of objects should be ...
OBSERVER (Object Behavioral) Purpose Lets one or more objects be notified of state changes in other objects within the system. Use When 1 State changes in one or more objects should trigger behavior   in other objects 2 Broadcasting capabilities are required. 3 An understanding exists that objects wi ...
PROXY (Object Structural) Purpose Allows for object level access control by acting as a pass through entity or a placeholder object. Use When 1 The object being represented is external to the system. 2 Objects need to be created on demand. 3 Access control for the original object is required. 4 Added ...
TEMPLATE METHOD (Class Behavioral) Purpose Identifies the framework of an algorithm, allowing implementing classes to define the actual behavior. Use When 1 A single abstract implementation of an algorithm is needed. 2 Common behavior among subclasses should be localized to a   common class. 3 Parent ...
ABSTRACT FACTORY (Object Creational) Purpose Provide an interface that delegates creation calls to one or more concrete classes in order to deliver specific objects. Use When n The creation of objects should be independent of the system utilizing them. 1 Systems should be capable of using multiple fa ...
STATE (Object Behavioral) Purpose Ties object circumstances to its behavior, allowing the object to behave in different ways based upon its internal state. Use When     1 The behavior of an object should be influenced by its state.     2 Complex conditions tie object behavior to its state.     3 Tran ...
STRATEGY  (Object Behavioral) Purpose Defines a set of encapsulated algorithms that can be swapped to carry out a specific behavior. Use When     1 The only difference between many related classes is their        behavior.     2 Multiple versions or variations of an algorithm are required.     3 Algo ...
DECORATOR (Object Structural) Purpose     Allows for the dynamic wrapping of objects in order to modify their existing responsibilities and behaviors. Use When     1 Object responsibilities and behaviors should be dynamically        modifiable.     2 Concrete implementations should be decoupled from  ...
SINGLETON (Object Creational) Purpose     Ensures that only one instance of a class is allowed within a system. Use When    1 Exactly one instance of a class is required.    2 Controlled access to a single object is necessary. Example     Most languages provide some sort of system or environment o ...
(一)7种设计坏味道 1.僵化性: 很难对系统进行改动,因为每个改动都会迫使许多对系统其他部分的其它改动。 2.脆弱性: 对系统的改动会导致系统中和改动的地方在概念上无关的许多地方出现问题。 3.牢固性: 很难解开系统的纠结,使之成为一些可在其他系统中重用的组件。 4.粘滞性: 做正确的事情比做错误的事情要困难。 5.复杂性(不必要的): 设计中包含有不具任何直接好处的基础结构。 6.重复性(不必要的): 设计中包含有重复的结构,而该重复的结构本可以使用单一的抽象进行统一。 7.晦涩性: 很难阅读、理解。没有很好地表现出意图。 (二)11种原则 - Pr ...
package com.diyi.util; import java.io.File; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.standard.St ...
Hibernate工作原理及为什么要用? 原理: 1.读取并解析配置文件 2.读取并解析映射信息,创建SessionFactory 3.打开Sesssion 4.创建事务Transation 5.持久化操作 6.提交事务 7.关闭Session 8.关闭SesstionFactory 为什么要用: 1. 对JDBC访问数据库的代码做了封装,大大简化了数据访问层繁琐的重复性代码。 2. Hibernate是一个基于JDBC的主流持久化框架,是一个优秀的ORM实现。他很大程度的简化DAO层的编码工作 3. hibernate使用J ...
  1、面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。抽象包括两个方面,一是过程抽象,二是数据抽象。 2.继承: 继承是一种联结类的层次模型,并且允许和鼓励类的重用,它提供了一种明确表述共性的方法。对象的一个新类可以从现有的类中派生,这个过程称为类继承。新类继承了原始类的特性,新类称为原始类的派生类(子类),而原始类称为新类的基类(父类)。派生类可以从它的基类那里继承方法和实例变量,并且类可以修改或增加新的方法使之更适合特殊的需要。 ...
1.基本结构 CREATE OR REPLACE PROCEDURE 存储过程名字 (     参数1 IN NUMBER,     参数2 IN NUMBER ) IS|AS 变量1 INTEGER :=0; 变量2 DATE; BEGIN END 存储过程名字 说明:is也可换成as 2.SELECT INTO STATEMENT   将select查询的结果存入到变量中,可以同时将多个列存储多个变量中,必须有一条   记录,否则抛出异常(如果没有记录抛出NO_DATA_FOUND)   例子:   BEGIN   SELECT col1,col2 into 变量1,变量2 FROM typ ...
Global site tag (gtag.js) - Google Analytics