diff options
author | kmoore | 2008-02-25 16:20:08 +0000 |
---|---|---|
committer | kmoore | 2008-02-25 16:20:08 +0000 |
commit | 799475ec15f7f5d8838fef3d8397d38fde082111 (patch) | |
tree | 45e8be97e6d1f3db423baf767a669e8955790b84 /jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java | |
parent | b7f9a0cb92fdf23807be30cb6ca97b579f7a7a8b (diff) | |
download | webtools.dali-799475ec15f7f5d8838fef3d8397d38fde082111.tar.gz webtools.dali-799475ec15f7f5d8838fef3d8397d38fde082111.tar.xz webtools.dali-799475ec15f7f5d8838fef3d8397d38fde082111.zip |
Refactored packages into public API, renamed interfaces
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java new file mode 100644 index 0000000000..7eb6f75bd1 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2006, 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.context; + +import org.eclipse.jpt.core.JpaStructureNode; + + +public interface PersistentAttribute extends JpaContextNode, JpaStructureNode +{ + String getName(); + String NAME_PROPERTY = "nameProperty"; + + /** + * Return the key for the attribute's mapping. + * The key may be for either the "specified" mapping or, if the "specified" + * mapping is missing, the "default" mapping. + */ + String mappingKey(); + + /** + * Return the key for the attribute's "default" mapping. + */ + String defaultMappingKey(); + + /** + * Return the attribute's "specified" mapping, or if it is null + * return the "default" mapping. WIll not return null. + */ + AttributeMapping getMapping(); + + /** + * Return the attribute's "specified" mapping, could be null + */ + AttributeMapping getSpecifiedMapping(); + + /** + * Clients should call this method to set the attribute's mapping. + * Passing in a null key will cause the "specified" mapping to be + * cleared and the attribute's mapping to be its "default" mapping. + */ + void setSpecifiedMappingKey(String key); + String SPECIFIED_MAPPING_PROPERTY = "specifiedMappingProperty"; + String DEFAULT_MAPPING_PROPERTY = "defaultMappingProperty"; + + TypeMapping typeMapping(); + + PersistentType persistentType(); + + /** + * If the attribute is mapped to a primary key column, return the + * column's name, otherwise return null. + */ + String primaryKeyColumnName(); + + /** + * Return whether the attribute's "attribute" mapping can be overridden. + */ + boolean isOverridableAttribute(); + + /** + * Return whether the attribute's "association" mapping can be overridden. + */ + boolean isOverridableAssociation(); + + /** + * Return whether the attribute's "attribute" mapping is for an ID. + */ + boolean isIdAttribute(); + + /** + * Return whether this attribute actually has a textual representation + * in its underlying resource (false = no) + */ + boolean isVirtual(); +} |