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.hibernate.metamodel.domain
Class AbstractAttributeContainer

    java.lang.Object
      org.hibernate.metamodel.domain.AbstractAttributeContainer

All Implemented Interfaces:
  AttributeContainer, Hierarchical, Type

Direct Known Subclasses:
  Component, Entity, NonEntity, Superclass

    public abstract class AbstractAttributeContainer

extends Object
implements AttributeContainer, Hierarchical

Convenient base class for `AttributeContainer`. Because in our model all `AttributeContainers` are also `Hierarchical` we also implement that here as well.

Nested Class Summary
`static class` | `AbstractAttributeContainer.IndexedPluralAttributeImpl`
`static class` | `AbstractAttributeContainer.PluralAttributeImpl`
`static class` | `AbstractAttributeContainer.SingularAttributeImpl`

Constructor Summary
`AbstractAttributeContainer(String name, String className, Value<Class<?>> classReference, Hierarchical superType)`

Method Summary
`protected void` | `addAttribute(Attribute attribute)`
`Set<Attribute>` | `attributes()` Retrieve the attributes contained in this container.
`PluralAttribute` | `createBag(String name)`
`SingularAttribute` | `createComponentAttribute(String name, Component component)`
`IndexedPluralAttribute` | `createList(String name)`
`IndexedPluralAttribute` | `createMap(String name)`
`protected PluralAttribute` | `createPluralAttribute(String name, PluralAttributeNature nature)`
`PluralAttribute` | `createSet(String name)`
`SingularAttribute` | `createSingularAttribute(String name)`
`SingularAttribute` | `createVirtualSingularAttribute(String name)`
`String` | `getClassName()` Obtain the java class name for this type.
`Class<?>` | `getClassReference()` Obtain the java `Class` reference for this type
`Value<Class<?>>` | `getClassReferenceUnresolved()`
`String` | `getName()` Obtain the name of the type.
`String` | `getRoleBaseName()` Obtain the name of this container in terms of creating attribute role names.
`Hierarchical` | `getSuperType()` Retrieve the super type.
`Attribute` | `locateAttribute(String name)` Retrieve an attribute by name.
`PluralAttribute` | `locateBag(String name)`
`SingularAttribute` | `locateComponentAttribute(String name)`
`IndexedPluralAttribute` | `locateList(String name)`
`IndexedPluralAttribute` | `locateMap(String name)`
`PluralAttribute` | `locatePluralAttribute(String name)`
`PluralAttribute` | `locateSet(String name)`
`SingularAttribute` | `locateSingularAttribute(String name)`
`String` | `toString()`

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

Methods inherited from interface org.hibernate.metamodel.domain.Type
`isAssociation, isComponent`

Constructor Detail

### AbstractAttributeContainer

    public AbstractAttributeContainer(String name,
                                      String className,
                                      Value<Class<?>> classReference,
                                      Hierarchical superType)

Method Detail

### getName

    public String getName()

  Description copied from interface: `Type`
  Obtain the name of the type.

  Specified by:
    `getName` in interface `Type`
  Returns:
    The name

### getClassName

    public String getClassName()

  Description copied from interface: `Type`
  Obtain the java class name for this type.

  Specified by:
    `getClassName` in interface `Type`
  Returns:
    The class name

### getClassReference

    public Class<?> getClassReference()

  Description copied from interface: `Type`
  Obtain the java `Class` reference for this type

  Specified by:
    `getClassReference` in interface `Type`
  Returns:
    The `Class` reference

### getClassReferenceUnresolved

    public Value<Class<?>> getClassReferenceUnresolved()

  Specified by:
    `getClassReferenceUnresolved` in interface `Type`

### getSuperType

    public Hierarchical getSuperType()

  Description copied from interface: `Hierarchical`
  Retrieve the super type.

  Specified by:
    `getSuperType` in interface `Hierarchical`
  Returns:
    The super type, or null if no super type.

### attributes

    public Set<Attribute> attributes()

  Description copied from interface: `AttributeContainer`
  Retrieve the attributes contained in this container.

  Specified by:
    `attributes` in interface `AttributeContainer`
  Returns:
    The contained attributes

### getRoleBaseName

    public String getRoleBaseName()

  Description copied from interface: `AttributeContainer`
  Obtain the name of this container in terms of creating attribute role names.

  NOTE : A role uniquely names each attribute. The role name is the name of the attribute prefixed by the "path" to its container.

  Specified by:
    `getRoleBaseName` in interface `AttributeContainer`
  Returns:
    The container base name for role construction.

### locateAttribute

    public Attribute locateAttribute(String name)

  Description copied from interface: `AttributeContainer`
  Retrieve an attribute by name.

  Specified by:
    `locateAttribute` in interface `AttributeContainer`
  Parameters:
    `name` - The name of the attribute to retrieve.
  Returns:
    The attribute matching the given name, or null.

### locateSingularAttribute

    public SingularAttribute locateSingularAttribute(String name)

  Specified by:
    `locateSingularAttribute` in interface `AttributeContainer`

### createSingularAttribute

    public SingularAttribute createSingularAttribute(String name)

  Specified by:
    `createSingularAttribute` in interface `AttributeContainer`

### createVirtualSingularAttribute

    public SingularAttribute createVirtualSingularAttribute(String name)

  Specified by:
    `createVirtualSingularAttribute` in interface `AttributeContainer`

### locateComponentAttribute

    public SingularAttribute locateComponentAttribute(String name)

  Specified by:
    `locateComponentAttribute` in interface `AttributeContainer`

### createComponentAttribute

    public SingularAttribute createComponentAttribute(String name,
                                                      Component component)

  Specified by:
    `createComponentAttribute` in interface `AttributeContainer`

### locatePluralAttribute

    public PluralAttribute locatePluralAttribute(String name)

  Specified by:
    `locatePluralAttribute` in interface `AttributeContainer`

### createPluralAttribute

    protected PluralAttribute createPluralAttribute(String name,
                                                    PluralAttributeNature nature)

### locateBag

    public PluralAttribute locateBag(String name)

  Specified by:
    `locateBag` in interface `AttributeContainer`

### createBag

    public PluralAttribute createBag(String name)

  Specified by:
    `createBag` in interface `AttributeContainer`

### locateSet

    public PluralAttribute locateSet(String name)

  Specified by:
    `locateSet` in interface `AttributeContainer`

### createSet

    public PluralAttribute createSet(String name)

  Specified by:
    `createSet` in interface `AttributeContainer`

### locateList

    public IndexedPluralAttribute locateList(String name)

  Specified by:
    `locateList` in interface `AttributeContainer`

### createList

    public IndexedPluralAttribute createList(String name)

  Specified by:
    `createList` in interface `AttributeContainer`

### locateMap

    public IndexedPluralAttribute locateMap(String name)

  Specified by:
    `locateMap` in interface `AttributeContainer`

### createMap

    public IndexedPluralAttribute createMap(String name)

  Specified by:
    `createMap` in interface `AttributeContainer`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### addAttribute

    protected void addAttribute(Attribute attribute)

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 © 2001-2012 Red Hat, Inc. All Rights Reserved.