public class PreDeleteEvent extends AbstractPreDatabaseOperationEvent { private Object[] deletedState; /** * * Constructs an event containing the pertinent information. * * @param entity The entity to be deleted. * @param id The id to use in the deletion. * @param deletedState The entity's state at deletion time. * @param persister The entity's persister. * @param source The session from which the event originated. */ public PreDeleteEvent( Object entity, Serializable id, Object[] deletedState, EntityPersister persister, EventSource source) { super( source, entity, id, persister ); this.deletedState = deletedState; } /** * Getter for property 'deletedState'. This is the entity state at the * time of deletion (useful for optomistic locking and such). * * @return Value for property 'deletedState'. */ public Object[] getDeletedState() { return deletedState;
public class PreInsertEvent extends AbstractPreDatabaseOperationEvent { private Object[] state; /** * Constructs an event containing the pertinent information. * * @param entity The entity to be inserted. * @param id The id to use in the insertion. * @param state The state to be inserted. * @param persister The entity's persister. * @param source The session from which the event originated. */ public PreInsertEvent( Object entity, Serializable id, Object[] state, EntityPersister persister, EventSource source) { super( source, entity, id, persister ); this.state = state; } /** * Getter for property 'state'. These are the values to be inserted. * * @return Value for property 'state'. */ public Object[] getState() { return state;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/PreDeleteEvent.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/PreInsertEvent.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class PreDeleteEvent extends AbstractPreDatabaseOperationEvent {
1
public class PreInsertEvent extends AbstractPreDatabaseOperationEvent {
2
	private Object[] deletedState;
2
	private Object[] state;
3
	/**
3
	/**
4
	 *
4
	
5
	 * Constructs an event containing the pertinent information.
5
 * Constructs an event containing the pertinent information.
6
	 *
6
	 *
7
	 * @param entity The entity to be deleted.
7
	 * @param entity The entity to be inserted.
8
	 * @param id The id to use in the deletion.
8
	 * @param id The id to use in the insertion.
9
	 * @param deletedState The entity's state at deletion time.
9
	 * @param state The state to be inserted.
10
	 * @param persister The entity's persister.
10
	 * @param persister The entity's persister.
11
	 * @param source The session from which the event originated.
11
	 * @param source The session from which the event originated.
12
	 */
12
	 */
13
	public PreDeleteEvent(
13
	public PreInsertEvent(
14
			Object entity,
14
			Object entity,
15
			Serializable id,
15
			Serializable id,
16
			Object[] deletedState,
16
			Object[] state,
17
			EntityPersister persister,
17
			EntityPersister persister,
18
			EventSource source) {
18
			EventSource source) {
19
	    super( source, entity, id, persister );
19
		super( source, entity, id, persister );
20
		this.deletedState = deletedState;
20
		this.state = state;
21
	}
21
	}
22
	/**
22
	/**
23
	 * Getter for property 'deletedState'.  This is the entity state at the
23
	 * Getter for property 'state'.  These are the
24
	 * time of deletion (useful for optomistic locking and such).
24
 values to be inserted.
25
	 *
25
	 *
26
	 * @return Value for property 'deletedState'.
26
	 * @return Value for property 'state'.
27
	 */
27
	 */
28
	public Object[] getDeletedState() {
28
	public Object[] getState() {
29
		return deletedState;
29
		return state;
30
	
30
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0