|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OrmPersistentType
orm.xml persistent type
Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.PersistentType |
|---|
PersistentType.Owner |
| Field Summary | |
|---|---|
static java.lang.String |
JAVA_PERSISTENT_TYPE_PROPERTY
|
static java.lang.String |
SPECIFIED_ATTRIBUTES_LIST
|
static java.lang.String |
VIRTUAL_ATTRIBUTES_LIST
|
| Fields inherited from interface org.eclipse.jpt.jpa.core.context.PersistentType |
|---|
MAPPING_PROPERTY, NAME_PROPERTY, SUPER_PERSISTENT_TYPE_PROPERTY |
| Fields inherited from interface org.eclipse.jpt.jpa.core.context.AccessHolder |
|---|
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY |
| Method Summary | |
|---|---|
OrmPersistentAttribute |
addSpecifiedAttribute(java.lang.String mappingKey,
java.lang.String attributeName)
|
java.util.ListIterator<OrmReadOnlyPersistentAttribute> |
attributes()
Return a combination of the persistent type's specified and virtual attributes. |
void |
changeMapping(OrmPersistentAttribute ormPersistentAttribute,
OrmAttributeMapping oldMapping,
OrmAttributeMapping newMapping)
This is called whenever the specified persistent attribute's mapping is changed as specified. |
boolean |
contains(int textOffset)
|
OrmPersistentAttribute |
convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute)
Add the specified persistent attribute to the orm.xml. |
OrmPersistentAttribute |
convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute,
java.lang.String mappingKey)
Add the specified persistent attribute to the orm.xml with
the specified mapping. |
OrmReadOnlyPersistentAttribute |
convertAttributeToVirtual(OrmPersistentAttribute specifiedAttribute)
Convert the specified attribute to a virtual attribute. |
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> |
createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
If this PersistentType.isFor(String) the given IType, create a text
DeleteEdit for deleting the type mapping element and any text that precedes it. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createMoveTypeEdits(org.eclipse.jdt.core.IType originalType,
org.eclipse.jdt.core.IPackageFragment newPackage)
Create ReplaceEdits for moving any references to the originalType to the newPackage. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createRenamePackageEdits(org.eclipse.jdt.core.IPackageFragment originalPackage,
java.lang.String newName)
Create ReplaceEdits for renaming any references to the originalPackage to the newName. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createRenameTypeEdits(org.eclipse.jdt.core.IType originalType,
java.lang.String newName)
Create ReplaceEdits for renaming any references to the originalType to the newName. |
OrmReadOnlyPersistentAttribute |
getAttributeNamed(java.lang.String attributeName)
Return the persistent attribute with the specified name, if it exists locally on the persistent type (as opposed to in its inheritance hierarchy). |
java.lang.String |
getDefaultPackage()
Return the persistent type's default package, as set in its entity mappings. |
JavaPersistentType |
getJavaPersistentType()
Return the Java persistent type that is referred to by the orm.xml persistent type. |
OrmTypeMapping |
getMapping()
Return the persistent type's mapping. |
EntityMappings |
getParent()
Return the JPA node's parent. |
void |
mappingClassChanged(java.lang.String oldClass,
java.lang.String newClass)
This is called by the persistent type's mapping when its class (name) changes. |
java.util.ListIterator<OrmPersistentAttribute> |
specifiedAttributes()
Return the persistent type's specified attributes. |
int |
specifiedAttributesSize()
Return the number of the persistent type's specified attributes. |
java.util.ListIterator<OrmReadOnlyPersistentAttribute> |
virtualAttributes()
Return virtual orm.xml persistent attributes. |
int |
virtualAttributesSize()
Return the number of virtual orm.xml persistent attributes. |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.PersistentType |
|---|
allAttributeNames, allAttributes, ancestors, attributeNames, attributesSize, getMappingKey, getName, getOwnerDefaultAccess, getOwnerOverrideAccess, getSimpleName, getSuperPersistentType, getValidationTextRange, inheritanceHierarchy, isFor, isIn, isMapped, resolveAttribute, setMappingKey, validate |
| Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode |
|---|
dispose, getId, getResourceType, getSelectionTextRange, getStructureNode |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.AccessHolder |
|---|
getDefaultAccess, getSpecifiedAccess, setSpecifiedAccess |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyAccessHolder |
|---|
getAccess |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.PersistentType.Owner |
|---|
getDefaultPersistentTypeAccess, getOverridePersistentTypeAccess |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.XmlContextNode |
|---|
getValidationTextRange, validate |
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode |
|---|
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, synchronizeWithResourceModel, update |
| Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode |
|---|
getJpaProject, stateChanged |
| Methods inherited from interface org.eclipse.jpt.common.utility.model.Model |
|---|
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.jpt.common.core.IResourcePart |
|---|
getResource |
| Field Detail |
|---|
static final java.lang.String SPECIFIED_ATTRIBUTES_LIST
static final java.lang.String VIRTUAL_ATTRIBUTES_LIST
static final java.lang.String JAVA_PERSISTENT_TYPE_PROPERTY
| Method Detail |
|---|
EntityMappings getParent()
JpaNode
getParent in interface JpaNodeOrmTypeMapping getMapping()
PersistentTypePersistentType.setMappingKey(String).
getMapping in interface PersistentTypejava.util.ListIterator<OrmReadOnlyPersistentAttribute> attributes()
orm.xml file; while the
virtual attributes are those derived from the corresponding
Java persistent type.
attributes in interface PersistentTypeOrmReadOnlyPersistentAttribute getAttributeNamed(java.lang.String attributeName)
PersistentType
getAttributeNamed in interface PersistentTypejava.util.ListIterator<OrmPersistentAttribute> specifiedAttributes()
int specifiedAttributesSize()
OrmPersistentAttribute addSpecifiedAttribute(java.lang.String mappingKey,
java.lang.String attributeName)
java.util.ListIterator<OrmReadOnlyPersistentAttribute> virtualAttributes()
orm.xml persistent attributes. These
are attributes that exist in the corresponding Java class, but are not
specified in the orm.xml.
int virtualAttributesSize()
orm.xml persistent attributes.
virtualAttributes()OrmReadOnlyPersistentAttribute convertAttributeToVirtual(OrmPersistentAttribute specifiedAttribute)
orm.xml file. Return the new
(virtual) attribute.
Return null if the specified attribute does not correspond
to an attribute in the Java persistent type.
Throw an IllegalArgumentException if the attribute is already
virtual.
OrmPersistentAttribute.convertToVirtual()OrmPersistentAttribute convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute)
orm.xml.
The attribute will be added to the orm.xml and moved
from the list of virtual attributes to the list
of specified attributes. It will keep the same mapping it had, either
specified in a Java annotation or the default.
Throw an IllegalArgumentException if the attribute is already
specified.
OrmReadOnlyPersistentAttribute.convertToSpecified()
OrmPersistentAttribute convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute,
java.lang.String mappingKey)
orm.xml with
the specified mapping. The attribute will be added to the
orm.xml and moved from the list of virtual attributes to
the list of specified attributes.
Throw an IllegalArgumentException if the attribute is already
specified.
OrmReadOnlyPersistentAttribute.convertToSpecified(String)
void changeMapping(OrmPersistentAttribute ormPersistentAttribute,
OrmAttributeMapping oldMapping,
OrmAttributeMapping newMapping)
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
PersistentType.isFor(String) the given IType, create a text
DeleteEdit for deleting the type mapping element and any text that precedes it.
Otherwise return an EmptyIterable.
Though this will contain 1 or 0 DeleteEdits, using an Iterable
for ease of use with other createDeleteEdit API.
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameTypeEdits(org.eclipse.jdt.core.IType originalType,
java.lang.String newName)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveTypeEdits(org.eclipse.jdt.core.IType originalType,
org.eclipse.jdt.core.IPackageFragment newPackage)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenamePackageEdits(org.eclipse.jdt.core.IPackageFragment originalPackage,
java.lang.String newName)
boolean contains(int textOffset)
void mappingClassChanged(java.lang.String oldClass,
java.lang.String newClass)
JavaPersistentType getJavaPersistentType()
orm.xml persistent type.
Return null if it is missing.
java.lang.String getDefaultPackage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||