org.hibernate.jpamodelgen.xml
Class XmlMetaEntity

java.lang.Object
  extended by org.hibernate.jpamodelgen.xml.XmlMetaEntity
All Implemented Interfaces:
ImportContext, MetaEntity
Direct Known Subclasses:
XmlMetaEmbeddable

public class XmlMetaEntity
extends Object
implements MetaEntity

Author:
Hardy Ferentschik

Field Summary
protected  AccessTypeInformation accessTypeInfo
           
protected  String clazzName
           
protected  Context context
           
protected  String defaultPackageName
           
protected  TypeElement element
           
protected  ImportContext importContext
           
protected  boolean isMetaComplete
           
protected  List<MetaAttribute> members
           
protected  String packageName
           
 
Constructor Summary
protected XmlMetaEntity(Embeddable embeddable, String defaultPackageName, TypeElement element, Context context)
           
  XmlMetaEntity(Entity ormEntity, String defaultPackageName, TypeElement element, Context context)
           
protected XmlMetaEntity(MappedSuperclass mappedSuperclass, String defaultPackageName, TypeElement element, Context context)
           
 
Method Summary
 String generateImports()
           
 List<MetaAttribute> getMembers()
           
 String getPackageName()
           
 String getQualifiedName()
           
 String getSimpleName()
           
 TypeElement getTypeElement()
           
 String importType(Name qualifiedName)
           
 String importType(String fqcn)
          Add fqcn to the import list.
protected  void init()
           
 boolean isMetaComplete()
           
 String staticImport(String fqcn, String member)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clazzName

protected final String clazzName

packageName

protected final String packageName

defaultPackageName

protected final String defaultPackageName

importContext

protected final ImportContext importContext

members

protected final List<MetaAttribute> members

element

protected final TypeElement element

context

protected final Context context

isMetaComplete

protected final boolean isMetaComplete

accessTypeInfo

protected AccessTypeInformation accessTypeInfo
Constructor Detail

XmlMetaEntity

public XmlMetaEntity(Entity ormEntity,
                     String defaultPackageName,
                     TypeElement element,
                     Context context)

XmlMetaEntity

protected XmlMetaEntity(MappedSuperclass mappedSuperclass,
                        String defaultPackageName,
                        TypeElement element,
                        Context context)

XmlMetaEntity

protected XmlMetaEntity(Embeddable embeddable,
                        String defaultPackageName,
                        TypeElement element,
                        Context context)
Method Detail

init

protected final void init()

getSimpleName

public String getSimpleName()
Specified by:
getSimpleName in interface MetaEntity

getQualifiedName

public String getQualifiedName()
Specified by:
getQualifiedName in interface MetaEntity

getPackageName

public String getPackageName()
Specified by:
getPackageName in interface MetaEntity

getMembers

public List<MetaAttribute> getMembers()
Specified by:
getMembers in interface MetaEntity

generateImports

public String generateImports()
Specified by:
generateImports in interface ImportContext
Specified by:
generateImports in interface MetaEntity

importType

public String importType(String fqcn)
Description copied from interface: ImportContext
Add fqcn to the import list. Returns fqcn as needed in source code. Attempts to handle fqcn with array and generics references.

e.g. java.util.Collection imports java.util.Collection and returns Collection org.marvel.Hulk[] imports org.marvel.Hulk and returns Hulk

Specified by:
importType in interface ImportContext
Specified by:
importType in interface MetaEntity
Parameters:
fqcn - Fully qualified class name of the type to import.
Returns:
import string

staticImport

public String staticImport(String fqcn,
                           String member)
Specified by:
staticImport in interface ImportContext
Specified by:
staticImport in interface MetaEntity

importType

public String importType(Name qualifiedName)
Specified by:
importType in interface MetaEntity

getTypeElement

public TypeElement getTypeElement()
Specified by:
getTypeElement in interface MetaEntity

isMetaComplete

public boolean isMetaComplete()
Specified by:
isMetaComplete in interface MetaEntity

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011. All Rights Reserved.