Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4ef13a055e1cf98034c228a327fd5ef4852f262f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*******************************************************************************
* Copyright (c) 2009, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
* 
* Contributors:
*     Oracle - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.options;

import java.util.Map;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnitProperties;
import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.JpaOptions2_0;

/**
 * JPA 2.0 options
 */
public class NullOptions2_0 extends AbstractPersistenceUnitProperties
	implements JpaOptions2_0
{
	

	// ********** constructors **********
	public NullOptions2_0(PersistenceUnit parent) {
		super(parent);
	}

	// ********** initialization **********
	/**
	 * Initializes properties with values from the persistence unit.
	 */
	@Override
	protected void initializeProperties() {
		//do nothing
	}

	// ********** behavior **********
	
	public void propertyValueChanged(String propertyName, String newValue) {
		//do nothing
	}

	public void propertyRemoved(String propertyName) {
		//do nothing
	}

	/**
	 * Adds property names key/value pairs, where: 
	 * 		key = PU property key
	 * 		value = property id
	 */
	@Override
	protected void addPropertyNames(Map<String, String> propertyNames) {
		//do nothing
	}

	// ********** LockTimeout **********
	public Integer getLockTimeout() {
		return null;
	}

	public void setLockTimeout(Integer newLockTimeout) {
		throw new UnsupportedOperationException();
	}

	public Integer getDefaultLockTimeout() {
		return DEFAULT_LOCK_TIMEOUT;
	}

	// ********** QueryTimeout **********
	public Integer getQueryTimeout() {
		return null;
	}

	public void setQueryTimeout(Integer newQueryTimeout) {
		throw new UnsupportedOperationException();
	}

	public Integer getDefaultQueryTimeout() {
		return DEFAULT_QUERY_TIMEOUT;
	}


	// ********** ValidationGroupPrePersists **********
	public ListIterable<String> getValidationGroupPrePersists() {
		return EmptyListIterable.instance();
	}
	
	public int getValidationGroupPrePersistsSize() {
		return 0;
	}
	
	public boolean validationGroupPrePersistExists(String validationGroupPrePersistClassName) {
		return false;
	}
	
	public String addValidationGroupPrePersist(String newValidationGroupPrePersistClassName) {
		throw new UnsupportedOperationException();
	}
	
	public void removeValidationGroupPrePersist(String validationGroupPrePersistClassName) {
		throw new UnsupportedOperationException();
	}

	// ********** ValidationGroupPreUpdates **********
	public ListIterable<String> getValidationGroupPreUpdates() {
		return EmptyListIterable.instance();
	}
	
	public int getValidationGroupPreUpdatesSize() {
		return 0;
	}
	
	public boolean validationGroupPreUpdateExists(String validationGroupPreUpdateClassName) {
		return false;
	}
	
	public String addValidationGroupPreUpdate(String newValidationGroupPreUpdateClassName) {
		throw new UnsupportedOperationException();
	}
	
	public void removeValidationGroupPreUpdate(String validationGroupPreUpdateClassName) {
		throw new UnsupportedOperationException();
	}

	// ********** ValidationGroupPreRemoves **********
	public ListIterable<String> getValidationGroupPreRemoves() {
		return EmptyListIterable.instance();
	}
	
	public int getValidationGroupPreRemovesSize() {
		return 0;
	}
	
	public boolean validationGroupPreRemoveExists(String validationGroupPreRemoveClassName) {
		return false;
	}
	
	public String addValidationGroupPreRemove(String newValidationGroupPreRemoveClassName) {
		throw new UnsupportedOperationException();
	}
	
	public void removeValidationGroupPreRemove(String validationGroupPreRemoveClassName) {
		throw new UnsupportedOperationException();
	}

}

Back to the top