diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalType.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalType.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalType.java deleted file mode 100644 index add5a13e9a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalType.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 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.resource.java; - - -public enum TemporalType { - - DATE, - TIME, - TIMESTAMP; - - - public static TemporalType fromJavaAnnotationValue(Object javaAnnotationValue) { - if (javaAnnotationValue == null) { - return null; - } - if (javaAnnotationValue.equals(JPA.TEMPORAL_TYPE__DATE)) { - return DATE; - } - if (javaAnnotationValue.equals(JPA.TEMPORAL_TYPE__TIME)) { - return TIME; - } - if (javaAnnotationValue.equals(JPA.TEMPORAL_TYPE__TIMESTAMP)) { - return TIMESTAMP; - } - return null; - } - - public static String toJavaAnnotationValue(TemporalType temporalType) { - if (temporalType == null) { - return null; - } - switch (temporalType) { - case DATE : - return JPA.TEMPORAL_TYPE__DATE; - case TIME : - return JPA.TEMPORAL_TYPE__TIME; - case TIMESTAMP : - return JPA.TEMPORAL_TYPE__TIMESTAMP; - default : - throw new IllegalArgumentException("unknown temporal type: " + temporalType); - } - } -} |