diff options
author | kmoore | 2009-11-11 20:30:28 +0000 |
---|---|---|
committer | kmoore | 2009-11-11 20:30:28 +0000 |
commit | b4d6cd800e2a2eb4186e3139c850d115947d123a (patch) | |
tree | 6ddf873956eaf32f05f053a4020206ef9b28071d /jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java | |
parent | ebecd172771c606d1e2f8aa81cf0acdc40675e3b (diff) | |
download | webtools.dali-b4d6cd800e2a2eb4186e3139c850d115947d123a.tar.gz webtools.dali-b4d6cd800e2a2eb4186e3139c850d115947d123a.tar.xz webtools.dali-b4d6cd800e2a2eb4186e3139c850d115947d123a.zip |
294899 - refactoring in an effort to support default Cacheable again
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java new file mode 100644 index 0000000000..2e7130f1d7 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java @@ -0,0 +1,110 @@ +/******************************************************************************* +* Copyright (c) 2009 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.core.internal.jpa2.context.persistence.connection; + +import java.util.Map; +import org.eclipse.jpt.core.context.persistence.PersistenceUnit; +import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnitProperties; +import org.eclipse.jpt.core.jpa2.context.persistence.connection.JpaConnection2_0; + +/** + * GenericConnection2_0 + */ +public class NullConnection2_0 extends AbstractPersistenceUnitProperties + implements JpaConnection2_0 +{ + + + // ********** constructors ********** + public NullConnection2_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 + } + + // ********** Driver ********** + public String getDriver() { + return null; + } + + public void setDriver(String newDriver) { + throw new UnsupportedOperationException(); + } + + public String getDefaultDriver() { + return DEFAULT_JDBC_DRIVER; + } + + // ********** URL ********** + public String getUrl() { + return null; + } + + public void setUrl(String newUrl) { + throw new UnsupportedOperationException(); + } + + public String getDefaultUrl() { + return DEFAULT_JDBC_URL; + } + + // ********** User ********** + public String getUser() { + return null; + } + + public void setUser(String newUser) { + throw new UnsupportedOperationException(); + } + + public String getDefaultUser() { + return DEFAULT_JDBC_USER; + } + + // ********** Password ********** + public String getPassword() { + return null; + } + + public void setPassword(String newPassword) { + throw new UnsupportedOperationException(); + } + + public String getDefaultPassword() { + return DEFAULT_JDBC_PASSWORD; + } +} |