Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.persistence.meta
Class Types.Identifiable<X>

    java.lang.Object
      org.apache.openjpa.persistence.meta.Types.BaseType<X>
          org.apache.openjpa.persistence.meta.AbstractManagedType<X>
              org.apache.openjpa.persistence.meta.Types.Identifiable<X>

Type Parameters:
  `X` -

All Implemented Interfaces:
  IdentifiableType<X>, ManagedType<X>, Type<X>

Direct Known Subclasses:
  Types.Entity, Types.MappedSuper

Enclosing class:
  Types

    public abstract static class Types.Identifiable<X>

extends AbstractManagedType<X>
implements IdentifiableType<X>

Represents an abstract persistent type that has a persistent identity.

Author:
  Pinaki Poddar

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.openjpa.persistence.meta.AbstractManagedType
`AbstractManagedType.AttributeNameFilter<X>, AbstractManagedType.AttributeTypeFilter<X,Y>, AbstractManagedType.DeclaredAttributeFilter<X>, AbstractManagedType.ElementTypeFilter<X,E>, AbstractManagedType.EntryTypeFilter<X,K,V>, AbstractManagedType.Filter<T>, AbstractManagedType.IdAttributeFilter<X>, AbstractManagedType.PluralCategoryFilter<X>, AbstractManagedType.SingularAttributeFilter<X>, AbstractManagedType.VersionAttributeFilter<X>`

Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type
`Type.PersistenceType`

Field Summary

Fields inherited from class org.apache.openjpa.persistence.meta.AbstractManagedType
`meta, model`

Fields inherited from class org.apache.openjpa.persistence.meta.Types.BaseType
`cls`

Constructor Summary
`Types.Identifiable(ClassMetaData meta, MetamodelImpl model)`

Method Summary
`Type<?>` | `getIdType()` Return the type that represents the type of the id.
`IdentifiableType<? super X>` | `getSupertype()` Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.
`boolean` | `hasIdAttribute()`
`boolean` | `hasSingleIdAttribute()` Whether or not the identifiable type uses an attribute to represents its persistent identity.
`boolean` | `hasVersionAttribute()` Whether or not the identifiable type has a version attribute.

Methods inherited from class org.apache.openjpa.persistence.meta.AbstractManagedType
`assertType, filter, filter, filter, filter, getAttribute, getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredId, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getDeclaredVersion, getField, getField, getField, getField, getId, getIdClassAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, getVersion, pick, pick, pick, pick, wrap`

Methods inherited from class org.apache.openjpa.persistence.meta.Types.BaseType
`getJavaType, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface javax.persistence.metamodel.IdentifiableType
`getDeclaredId, getDeclaredVersion, getId, getIdClassAttributes, getVersion`

Methods inherited from interface javax.persistence.metamodel.ManagedType
`getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes`

Methods inherited from interface javax.persistence.metamodel.Type
`getJavaType, getPersistenceType`

Constructor Detail

### Types.Identifiable

    public Types.Identifiable(ClassMetaData meta,
                              MetamodelImpl model)

Method Detail

### hasVersionAttribute

    public boolean hasVersionAttribute()

  Whether or not the identifiable type has a version attribute.

  Specified by:
    `hasVersionAttribute` in interface `IdentifiableType<X>`
  Returns:
    boolean indicating whether or not the identifiable type has a version attribute

### getSupertype

    public IdentifiableType<? super X> getSupertype()

  Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.

  Specified by:
    `getSupertype` in interface `IdentifiableType<X>`
  Returns:
    super type of identifiable type or null if no such super type

### hasIdAttribute

    public boolean hasIdAttribute()

### hasSingleIdAttribute

    public boolean hasSingleIdAttribute()

  Whether or not the identifiable type uses an attribute to represents its persistent identity. Returns true for a simple or embedded identifier. Returns false for an classes that use separate identifier class for its persistent identity.

  Specified by:
    `hasSingleIdAttribute` in interface `IdentifiableType<X>`
  Returns:
    boolean indicating whether or not the identifiable type represents its persistent identity via a single identifier attribute.

### getIdType

    public Type<?> getIdType()

  Return the type that represents the type of the id.

  Specified by:
    `getIdType` in interface `IdentifiableType<X>`
  Returns:
    type of identifier

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.